ShellSpells
  • 🧙‍♂️Welcome!
    • ShellSpells
    • FAQs
    • License & Disclaimer
  • 🐧Linux
    • System Ops
      • Transcripts
      • Help
      • System Info
        • Date/Time
        • System Details
        • Patches & Updates
        • Init System Identification
        • Hostname / Host ID
        • Variables
        • Hardware & Resources
      • Filesystem
        • Traverse & Enumerate
        • Drives & Partitions
        • Shares
        • Packages
        • Connected Devices
        • Kernel Modules (Drivers)
      • Users & Groups
        • Enumerate
        • Modify
      • Network
        • Enumerate
        • Modify
      • Scheduled Jobs
        • Enumerate
        • Modify
      • Processes
        • Enumerate
        • Modify
        • Custom Script and Shared Object
        • Process I/O Redirection
      • Services
        • Enumerate
        • Modify
        • Create a Service
      • Startup/Boot Scripts
        • Enumerate
        • Modify
      • Security
        • Antivirus
        • Firewall
        • SSH Keys
      • History & Logs
        • History
        • Logs
    • File Ops
      • Search
        • Filename
        • Content
        • Users (Owners)
        • Time
        • Size
        • Permission
        • Hidden Files
        • Inode
        • Find + Exec
        • Notes
      • Enumerate Metadata
      • Modify Metadata
      • Read Content
      • Modify Content
      • Extract Content
      • Sort / Compare / Count
      • Move
      • Copy
      • Execute
      • Hash
      • Encode/Decode
      • Compress/Decompress
      • Working With Weird Filenames
    • Terminal Ops
      • Keyboard Shortcuts
      • Tmux Shortcuts
  • 🪟Windows
    • System Ops
      • Transcripts
      • Help
      • System Info
        • One-liners
        • Date/Time
        • System Details
        • Hotfixes
        • Domain or Workgroup
        • Data Execution Prevention
        • Variables
        • Hardware & Resources
      • Filesystem
        • Traverse & Enumerate
        • Drives & Partitions
        • Installed Software
        • Drivers
        • Shares
      • Registry
        • Enumerate
        • Modify
        • Forensically Relevant Keys
      • Users & Groups
        • Enumerate
        • Modify
      • Network
        • Enumerate
        • Modify
      • Scheduled Tasks
      • Processes
        • Enumerate
        • Modify
      • Services
        • Enumerate
        • Modify
      • Autorun / Startup
        • Enumerate
        • Modify
      • Security
        • Permissions
          • Enumerate
          • Page
        • Antivirus
        • Firewall
          • Enumerate
          • Modify
        • Audit Policies
        • Remoting
          • Enumerate
          • Modify
          • Registry Locations
        • Stored Credentials
      • Remote Command Execution
      • Active Directory
        • Enumerate
        • Modify
      • History & Logs
        • History
        • Logs
      • PowerShell Config
      • Scripting
      • WMIC Notes
    • File Ops
      • Search
        • Filename
        • Time
        • Size
        • Permissions
        • Attributes
        • Wildcarding
      • Enumerate Metadata
        • One Liners
        • Users (Owners)
        • Timestamps
        • Size
        • Permissions
        • Attributes
      • Modify Metadata
        • Change Owner
        • Timestamps
        • Size
        • Attributes
      • Read Content
      • Modify Content
        • Overwrite
        • Insert
        • Append
        • Replace / Remove
        • Convert Case
        • Alternate Data Streams
      • Extract Content
      • Sort / Compare / Count
        • Sort
        • Count
        • Compare
      • Move
      • Copy
      • Execute
      • Hash
      • Encode/Decode
      • Compress/Decompress
      • Working With Weird Filenames
      • Output Formatting / Filtering
      • File Formatting
      • Operators
  • ⛓️Network
    • Traffic Manipulation
      • iptables
        • Option List
        • General Commands
        • Filter Tables
        • NAT
        • Mangle
        • Filter for SSH Traffic (Example)
      • nftables
    • Packet Capture
      • Syntax
      • TCPDump Examples
    • Packet Analysis
      • Wireshark
  • 🚗Maneuver
    • SSH
    • Control Sockets
    • RDP
    • Windows Port Proxy
  • 🛩️Data Transfer
    • SCP
    • FTP
    • Netcat
      • Netcat Relays
    • Server Interactions
    • Alternate Methods
  • 🪄REGEX
    • Examples
Powered by GitBook
On this page
  • Commands
  • Registry Locations
  • Network Profile Registry Values
  • All

Was this helpful?

  1. Windows
  2. System Ops
  3. Network

Modify

Commands

ipconfig /flushdns

Purge DNS Resolver Cache

arp -d 192.168.0.1

Remove ARP mappings for 192.168.0.1 + on all interfaces.

nbtstat -RR

(Flush NetBIOS Cache) Sends Name Release packets to WINS and starts Refresh

netsh interface ip set

Sets IP and default gateway for specified interface.

netsh interface ipv4 set

Sets IP and default gateway for specified IPv4 interface.

netsh interface ipv6 set

Sets IP and default gateway for specified IPv6 interface.

netsh interface ip set dnsservers

Sets DNS servers for specified interface.

netsh interface ipv4 set dnsservers

Sets IPv4 DNS servers for specified interface.

netsh interface ipv6 set dnsservers

Sets IPv6 DNS servers for specified interface.

netsh wlan set hostednetwork

Sets Hosted network settings.

netsh interface ip add

Adds IP to specified interface.

netsh interface ipv4 add

Adds IPv4 to specified interface.

netsh interface ipv6 add

Adds IPv6 to specified interface.

netsh interface ip delete

Deletes IP from specified interface.

netsh interface ipv4 delete

Deletes IPv4 from specified interface.

netsh interface ipv6 delete

Deletes IPv6 from specified interface.

Set-NetIPAddress

Modifies IP config properties.

Set-NetAdapter

Modifies basic network interface properties.

New-NetIPAddress

Adds IP to network interface.

Remove-NetIPAddress

Removes IP from network interface.

Set-DnsClientServerAddress

Sets DNS servers for interface.

Enable-NetAdapter

Enables a network interface.

Disable-NetAdapter

Disables a network interface.

Enables static IP for network interface:

wmic nicconfig where "IPEnabled = true" call EnableStatic

Enables DHCP on network interface:

wmic nicconfig where "IPEnabled = true" call EnableDHCP

Sets DNS server search order for network interface:

wmic nicconfig where "IPEnabled = true" call SetDNSServerSearchOrder

Removes static DNS entry of 192.168.118.1 on the local interface:

netsh interface ip delete dns local 192.168.118.1

Set static IP Address; Subnet; Gateway; GatewayMetric:

netsh interface ip set address local static 192.168.18.111 255.255.255.0 192.168.18.254 1

Set a static DNS for local interface:

netsh interface ip set dns name=local source=static addr=192.168.118.101

Registry Locations

Network Profile Registry Values

Queries current network profiles:

Get-ChildItem 'HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\NetworkList\\Profiles'
Network Location Category
Data Value

Public

0 (ZERO)

Private

1

Domain

2

All

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

This key contains a variety of settings that affect the TCP/IP protocol, including DNS, IP, and WINS settings.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces{Interface GUID}

Contains settings specific to each network interface, such as IP address, subnet mask, and DNS server addresses.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters

Settings for NetBIOS over TCP/IP (NetBT) configuration.

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient

Contains DNS client configuration settings, often used in Group Policy settings.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters

Similar to the Tcpip\Parameters key, but specifically for IPv6 configuration.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards

Information about each network card installed on the system.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings

Contains settings related to Internet Explorer and overall internet connectivity settings, including proxy settings.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp

Contains settings for the Remote Desktop Protocol (RDP), including port configuration.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy

Configuration settings for the Windows Firewall.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Rpc\Internet

Contains settings for configuring RPC over Internet ports.

PreviousEnumerateNextScheduled Tasks

Last updated 1 year ago

Was this helpful?

🪟