Linux

Generate /etc/shadow Password

openssl passwd -6 -salt salty Password123$
genpasswd() { openssl passwd -6 -salt $1 $2 }
genpasswd salty Password123$

Extract all URLs

grep -Eo "https?://[a-zA-Z0-9./?=_%:;#&-]*" inlanefreight | sort -u
...
https://www.inlanefreight.com/index.php/wp-json/
https://www.inlanefreight.com/index.php/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fwww.inlanefreight.com%2F
https://www.inlanefreight.com/index.php/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fwww.inlanefreight.com%2F&format=xml
https://www.inlanefreight.com/index.php/wp-json/wp/v2/pages/7
https://www.inlanefreight.com/wp-content/themes/ben_theme/css/animate.css?ver=5.6.14
...

Hydra

HTTP Form Login

hydra -l <username> -P <path/to/passwords> <IP> http-post-form "/route/to/login:username=^USER^&password=^PASS^:<Message If Login Is Incorrect>"

Use login as password

SSH

Find all the SUID/SGID executables

Port Scan with Bash

SSH

Upgrade to SSH

Local

Remote

Always agree to PublicKey on ssh connect

Connect to ssh with password

circle-info

Note:Also works with other services like ftp

Upgrade netcat (nc)

  1. Get PTY

    • python3 -c 'import pty;pty.spawn("/bin/bash")'

      • or

    • script /dev/null -qc /bin/bash

  2. Background the process

    • Ctrl+Z

  3. Get your terminals rows and columns

    • tput lines;tput cols

  4. Enter command and then press ENTER twice to bring the session back

    • stty raw -echo;fg

  5. For better text wrapping

    • stty rows <rows> cols <columns>

  6. To be able to use the clear command

    • export TERM=xterm

circle-info

Note:This doesn't work with rlwraparrow-up-right!

Last updated