Here's a place to store my notes/commands which I keep on forgetting because I never use them enough to memorise it. Sometimes the man pages are just too verbose and too long to look through :(
Might move it to a self-hosted wiki in the future, who knows?
I could probably improve the look of this page but that'll probably happen soon.
Login with an SSH private key with ssh -i sshPrivateKey user@8.8.8.8
File transfer when ssh'd into a server scp fileName username@hostname:~/Location
Find any files without the "Permission Denied" error occuring. find / -type f -name "fileName" 2>&1 | grep -v -i "permission denied"
Works by redirecting STDERR (2) to STDOUT (1)
HDMI output off:
xrandr --output HDMI-1-1 --auto --output eDP-1-1 --auto
HDMI output on:
xrandr --output eDP-1-1 --mode 1920x1080 --output HDMI-1-1 --off
Remember to switch audio output with Pavucontrol.
Follow these links to factor super duper large numbers, here, and here
Also Yafu deserves a good mention here, will update on how to use it when I next use it.
Simple enough to use: binwalk -e fileName
; steghide --extract -sf fileName
; foremost fileName
;
zsteg fileName
; exiftool fileName
;
Use objdump -d binaryName
to disassemble the binary into assembly instructions.
Use objdump -t binaryName
to print out the symbols (also function names).
Use strace -s 64
and ltrace -s 64
to look at system and library calls. Or do both with ltrace -S
.
nmap -sV -sC -vv ipAddr
where the arguments represent:
-sV
for version detection;
-sC
to use the default set of scripts;
-vv
for verbose output.
Probably the only link apart that will be useful apart from Google: OSINT framework
The different attack modes are:
-a = 0
: Dictionary mode
-a = 1
: Combination mode, uses two dictionaries
-a = 4
: Mask mode, brute force with a given character set
-a = 6
: Hybrid mode, dictionaries with masks
There's a lot of hashes out there, here are all of them.
An plain standard command is:
# dictionary mode with a SHA512 hash and rockyou.txt
./hashcat -a 0 -m 1800 exampleHash.txt /usr/share/dict/rockyou.txt
Below is one example of mask mode being used, here are more.
# mask mode with a bcrypt/blowfish hash with a prehash in regex form [A-Z0-9]{4}
./hashcat -a 3 -m 3200 exampleHash.txt -1 ?l?d?u ?1?1?1?1
Use the relevant binary such as ./unshadow
,./ssh2john
./zip2john
to get the relevant hash and store it in some file. Then use JTR with:
./john --wordlist=/usr/share/dict/rockyou.txt exampleHash.txt