title: Commands for Fast Memo Shell
commands:
  - cmd: nmap -p- --min-rate 10000  192.168.56.30 -Pn
    lang: sh
    tags: Pentest
    desc: Fast scan all ports 
  - cmd: nmap -p 53,88,135,139,389,445,464,593,636,3268,3269,5985,5986,9389,49668,49670,49671,49673,49674,49687,49750 -sCV 192.168.56.30 -Pn
    lang: sh
    tags: Pentest
    desc: Scan with services and versions
  - cmd: nmap -p80,443 --script http-title 192.168.218.0/24 --open -Pn
    lang: sh
    tags: Pentest
    desc: TCP scan HTTP/S and get page titles
  - cmd: find /usr/share/nmap/scripts/ -type f | sk --preview 'bat -l lua --color=always {}'
    lang: sh
    tags: Pentest
    desc: search a NSE script
  - cmd: gobuster dir -u http://<IP|HOST>/ -w /usr/share/wordlists/dirb/common.txt -t 5
    lang: sh
    tags: Pentest
    desc: enumerate pages on webserver
  - cmd: feroxbuster --url http://<IP|Host>/
    lang: sh
    tags: Pentest
    desc: enumerate pages on webserver
  - cmd: feroxbuster --url http://<IP|Host>/ -x pdf,php,txt
    lang: sh
    tags: Pentest
    desc: enumerate pages on webserver (check for pdf, php, txt files)
  - cmd: smbclient --no-pass -L //192.168.194.10
    lang: sh
    tags: Pentest
    desc: list unprotected SMB shares
  - cmd: snmpwalk -c public -v1 -t 10 192.168.50.151
    lang: sh
    tags: Pentest
    desc: SNMP enumeration
  - cmd: rlwrap -cAr nc -lnvp 443
    lang: sh
    tags: Pentest
    desc: Bind netcat for reverse shell with completion
  - cmd: impacket-psexec hackade.org/ben:fakepass@192.168.99.80
    lang: sh
    tags: Pentest
    desc: Using psexec to get an interactive shell
  - cmd: systeminfo
    lang: ps1
    tags: Pentest
    desc: Information about the operating system and architecture
  - cmd: ipconfig /all
    lang: ps1
    tags: Pentest
    desc: Information about the network configuration
  - cmd: route print
    lang: ps1
    tags: Pentest
    desc: Routing table
  - cmd: exiftool -a -u old.pdf
    lang: sh
    tags: Pentest
    desc: Print all metadata from a file
  - cmd: mitmproxy --set console_mouse=false --set anticache -p 8080
    lang: sh
    tags: Linux
    desc: launch mitmproxy with options
  - cmd: find / -xdev -type f \( -exec grep -xq "{}" /var/lib/dpkg/info/*.list \; -or -print \)
    lang: sh
    tags: Linux
    desc: search for files not owned by any package
  - cmd: sudo -l
    lang: sh
    tags: Linux
    desc: Inspecting current user's sudo permissions
  - cmd: socat -ddd TCP-LISTEN:2345,fork TCP:10.4.50.215:5432
    lang: sh
    tags: Pentest Linux
    desc: Running the Socat port forward command.
  - cmd: sudo lsof -nP -i tcp
    lang: sh
    tags: Linux
    desc: list process listing tcp socket
  - cmd: sudo lsof -u 1000
    lang: sh
    tags: Linux
    desc: list files used by UID 1000
  - cmd: sudo lsof -p 2658
    lang: sh
    tags: Linux
    desc: list files used by PID 2658
  - cmd: mysql -u root -p'root' -h 192.168.50.16 -P 3306
    lang: sh
    tags: Linux
    desc: connect to mysql
  - cmd: sudo setcap 'cap_net_bind_service=+ep' /usr/bin/python3.11
    lang: sh
    tags: Linux
    desc: Allow bind for port < 1024, set capability CAP_NET_BIND_SERVICE
  - cmd: vim --clean
    lang: sh
    tags: Linux
    desc: launch vim without options and config files
  - cmd: curl -s --head 'https://github.com/lotabout/skim/releases/latest' | grep '^location' | rev | cut -d'/' -f 1 | rev | tr -d '\r'
    lang: sh
    tags: Linux
    desc: check the last tag from a github project 
  - cmd: grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}"
    lang: sh
    tags: Linux
    desc: grep ip address
  - cmd: grep -E -o "[[:alnum:]]{30,34}"
    lang: sh
    tags: Linux
    desc: grep NTLM hash
  - cmd: Set-WinUserLanguageList -Force 'fr-FR'
    lang: ps1
    tags: powershell winsetup
    desc: change Keyboard Layout in French
  - cmd: tail --pid=$(pgrep procname) -f /dev/null && ntf send finished
    lang: sh
    tags: Linux
    desc: wait and send message when a process is fish
  - cmd: cat ips | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}" | sort | sponge ips
    lang: sh
    tags: Linux
    desc: extract ips from file
  - cmd: ping -M do -s <mtu-value> 192.168.1.1
    lang: sh
    tags: Linux
    desc: check for the correct MTU value