Created
November 2, 2014 23:30
-
-
Save cmbaughman/b0677c548475f1e235d4 to your computer and use it in GitHub Desktop.
Pentest from Bash Commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
netstat -tulpn | |
Show Linux network ports with process ID's (PIDs) | |
watch ss -stplu | |
Watch TCP, UDP open ports in real time with socket summary. | |
lsof -i | |
Show established connections. | |
macchanger -m MACADDR INTR | |
Change MAC address on KALI Linux. | |
ifconfig eth0 192.168.2.1/24 | |
Set IP address in Linux. | |
ifconfig eth0:1 192.168.2.3/24 | |
Add IP address to existing network interface in Linux. | |
ifconfig eth0 hw ether MACADDR | |
Change MAC address in Linux using ifconfig. | |
ifconfig eth0 mtu 1500 | |
Change MTU size Linux using ifconfig, change 1500 to your desired MTU. | |
dig -x 192.168.1.1 | |
Dig reverse lookup on an IP address. | |
host 192.168.1.1 | |
Reverse lookup on an IP address, in case dig is not installed. | |
dig @192.168.2.2 domain.com -t AXFR | |
Perform a DNS zone transfer using dig. | |
host -l domain.com nameserver | |
Perform a DNS zone transfer using host. | |
nbtstat -A x.x.x.x | |
Get hostname for IP address. | |
ip addr add 192.168.2.22/24 dev eth0 | |
Adds a hidden IP address to Linux, does not show up when performing an ifconfig. | |
tcpkill -9 host google.com | |
Blocks access to google.com from the host machine. | |
echo "1" > /proc/sys/net/ipv4/ip_forward | |
Enables IP forwarding, turns Linux box into a router - handy for routing traffic through a box. | |
echo "8.8.8.8" > /etc/resolv.conf | |
Use Google DNS. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment