Cheatsheet

Nmap

Running an Nmap Script

nmap --script <SCRIPT_NAME> -p<PORT> <DOMAIN/IPADDRESS>
nmap -sV --script=banner <DOMAIN/IPADDRESS>
netcat <IP_ADDRESS> <PORT>
nc -nv <IP_ADDRESS> <PORT>
curl -IL <DOMAIN>

Windows File Transfer Methods (Download Operations)

PowerShell Base64 Encode & Decode

Downloading from Linux machine to Windows machine using Base64

On Linux Machine

cat <FILE> | base64 -w 0;echo

On Windows Machine

PowerShell Web Downloads

PowerShell DownloadFile Method

PowerShell DownloadString - Fileless Method

Executes directly to the memory

PowerShell Invoke-WebRequest

Alternative (Fast)

PowerShell Cradles

From HarmJ0y, https://gist.github.com/HarmJ0y/bb48307ffa663256e239arrow-up-right

UseBasicParsing Error

Could not establish relationship (SSL/TLS Certificate is not trusted)

SMB Downloads

No Authentication

On Linux, create SMB Server

On Windows, copy the file from SMB Server

With Authentication

On Linux, create SMB Server with username and password

On Windows, mount SMB Server with username and password

FTP Downloads

Using pyftpdlib

On Linux, set up FTP Server

On Windows, transfer files from FTP Server using PowerShell

Create a Command File for the FTP Client and Download the Target File

Windows File Transfer Methods (Upload Operations)

Last updated