akde/infosec

Information security is ultimately about managing risk


  • Down­load: https://github.com/droope/droopescan droopescan scan drupal -u http://$target/ -t 32 Or just install via pip pip install droopescan


  • Weevely https://tools.kali.org/maintaining-access/weevely Erzeugt PHP-Skript auf Serv­er, mit dem man eine Shell wieder bekom­men kann. Various scripts Shelter (win32) Dynam­ic shell injec­tion tool into nor­mal Win­dows binaries. https://tools.kali.org/maintaining-access/shellter Create own (normal) shell HTTPTunnel Needs PHP; cre­ates file on a serv­er which acts as SSH proxy. Nishang Col­lec­tion of Pow­er­Shell scripts for back­doors and more. Kali:/usr/share/nishang dns2tcp Cre­ates a TCP…


  • https://tools.kali.org/exploitation-tools/commix Cre­at­ed SQL injec­tions on the fly.


  • Directory enumeration Hints: General search nikto -host $victim gobuster dir -u http://$target/ -a 'Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0' -w /usr/share/wordlists/seclists/Discovery/Web-Content/common.txt -t 60 gobuster dir -u http://$target/ -a 'Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0' -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 60 gobuster dir -u http://$target/ -p socks5://127.0.0.1:9991 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 60 HTTP_PROXY="socks4://127.0.0.1:9990/" gobuster dir -u http://$target/…


  • Union-based injections Blind SQL injections If no out­put is giv­en from a state­ment, try to use time-based approaches. Enumerating in inserts Assum­ing the INSERT state­ment is INSERT INTO $tablename (email,name) VALUES ("email", "name"); Then try a tim­ing attack to deter­mine if a cer­tain val­ue is in a field: INSERT INTO newsletter (name,email) VALUES ('name', ' ' AND…


  • General objectives Organizing template Web ressources Tools Notes


  • List with a ton of one-lin­er web servers in var­i­ous languages HTTP python -m SimpleHTTPServer 8000 python3 -m http.server 8000 HTTPS ruby -r webrick/https -e ' WEBrick::HTTPServer.new( Port: 8000, DocumentRoot: ".", SSLEnable: true, SSLCertName: [%w[CN localhost]]).start'


  • (!) See also Pass­word spray­ing to check a obtained pass­word against usernames. Note: Use http://rumkin.com/tools/cipher/ if you have to encode/decrypt/decipher some­thing on the fly. Wordlist optimization If there is a pass­word pol­i­cy known: Check password policy In Win­dows, type net accounts to get infor­ma­tions about account lock­ing, lock­out threash­olds etc. Cloud-based performance cracking See NPK Default passwords Hashcat Am…


  • Dis­plays all avail­able net­work shares: showmount -e $target Nor­mal mount mount -t nfs $target:/home /mnt Mount­ing with nfspy — with the hide option, it mounts and unmounts for the serv­er so the vic­tim can­not see the new con­nec­tion via showmount. nfspy -o server=192.168.1.124:/home,hide,allow_other,ro,intr /mnt Mount via SSH ssh -N -L 3049:localhost:2049 user@hostname mount -t nfs -o port=3049…


  • tcp/135 udp/135 — and as (Microsoft) Remote Pro­ce­dure Call on tcp/593 as web service. Enumeration Obtain gen­er­al information # rpcinfo -p $target # rpcinfo -s $target Con­nect. Hint: auto com­ple­tion works; enum<tab> returns all enum commands. rpcclient -U "" $target Enu­mer­ate through all API end­points with one of the fol­low­ing options. python /usr/local/bin/rpcdump.py $target |…


  • Enumeration Aktuell angemeldete Benutzer anzeigen finger @ip Benutzer-Enu­mer­a­tion for username in $(cat cirt-default-usernames.txt); do finger $username@10.10.10.76 >> /tmp/finger; done Enu­mer­a­tion mit Metasploit: msf5 > use auxiliary/scanner/finger/finger_users msf5 auxiliary(scanner/finger/finger_users) > set rhosts 10.10.10.76 rhosts => 10.10.10.76 msf5 auxiliary(scanner/finger/finger_users) > run Exploits Auf sehr alten Sys­te­men kon­nte man https://insecure.org/sploits_all.html zufolge Befehle aus­führen, etwa mit finger "|/bin/id@host'


  • Use the bof1_web.py or bof1_socket.py to start. Use bof1_socket_10.py to deter­mine the posi­tion of the EIP. Use bof2_socket_20.py with the found EIP off­set to ver­i­fy that the EIP was over­writ­ten with B’s. Use bof3_socket_10.py with the found EIP and find all bad chars. Find with Mona a JMP address. Cre­ate pay­load, add it and €prof­it. 0. Confirm vulnerability Down­load…


  • Note that ipt­a­bles and ip6tables should be used always together! Tables Ipt­a­bles man­ages a set of tables which act as ACL Access Con­trol Lists. Actions Actions are defined via the -j option. Examples Show all rules iptables -Lip6tables -L Ignore all pack­ets from a network: iptables -A INPUT -s 192.168.5.1/32 -j DROPip6tables -A INPUT -s fd75:943b:5f2e:0:a4:45a1:b753:4152 -j…


  • tcpdump Get incom­ing ICMP packets: sudo tcpdump -i any icmp and src host $target Nützliche Parameter Domains nicht auflösen, IPs anzeigen -n Dump der Dat­en anzeigen -X Paket in ASCII anzeigen -A Umgang mit Dateien Dump in Datei schreiben tcpdump -w file Dump aus Datei lesen tcpdump -r file Standard-Abfragen tcpdump -n src|dst 10.10.10.10 and port…


  • See a pack­et in its context Kontextmenü, Follow auswählen Show only ICMP pack­ets from a host tcpdump host 10.11.1.128 and icmp -i tun0 Show oth­er sys­tems com­mu­ni­cat­ing out­side the own address ip.addr == 10.11.1.0/24 && !(ip.addr == 192.168.119.0/24) && ! dns && !browser && !ssdp && !nbns && !llmnr Record audio Wire­shark can trans­form cap­tured audio…


  • Screen-Sitzung mit Namen starten screen -S name Screen-Sitzun­gen auflisten screen -ls Screen-Sitzung fort­set­zen screen -xS name


  • Con­nect: mysql --host=10.10.10.13 -P4444 -u admin admin Var­i­ous commands: Enumeration Nmap scripts nmap -sV -p 3306 --script mysql-audit,mysql-databases,mysql-dump-hashes,mysql-empty-password,mysql-enum,mysql-info,mysql-query,mysql-users,mysql-variables,mysql-vuln-cve2012-2122 $victim proxychains4 -q nmap -sV -sT -Pn -p 3306 --script mysql-audit,mysql-databases,mysql-dump-hashes,mysql-empty-password,mysql-enum,mysql-info,mysql-query,mysql-users,mysql-variables,mysql-vuln-cve2012-2122 $victim Exploitation Read and write Read with the cur­rent process id: SELECT load_file('/etc/passwd'); Write as the dae­mon process id: CREATE TABLE bbb(content TEXT); INSERT INTO bbb (content)…


  • Before < 2.2.10 : SQL injec­tion pos­si­ble (https://packetstormsecurity.com/files/152356/CMS-Made-Simple-SQL-Injection.html)


  • Use dash, which does­n’t drop privileges. Argu­ments ls Order by the last recent mod­i­fied file: ls -t Better history Add this to .bashrc HISTSIZE=10000 HISTTIMEFORMAT='%F %T ' Han­dling from files with starting - cp -- -file.txt file.txt STDOUT, STDIN and STDERR (redirection) Out­put STDERR (2) also on STDOUT (1) cmd 2>&1 man Seach­ing for a key­word in…


About

Personal collection of some infosec stuff. Primary purpose of this site is to collect and organize for myself.

Note: Some content is not publicly visible due to copyright issues. Therefore, some links could be broken.

Checklists

Categories

Checklists: Ports

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

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