Intro
information gathering using active (scans) and passive (use of third-party providers) methods.
Enumeration Mythology

Infrastructure Based Enumeration
Domain Information
passively gathering information to understand the company better.
getting first impression of its presence on the internet using their SSL certificate
another source to find more subdomains is crt.sh
1 | |
Shodan can be used to find devices and systems permanently connected to the internet
1 | |
see all available DNS records
1 | |
Cloud Resources
1 | |
cloud storage can be found in DNS; During IP lookup, its possible to find an IP that belongs to cloud service
using google dorks we can find cloud storages using inurl:amazonaws.com intext:companyname for AWS and inurl:blob.core.windows.net intext:companyname for Azure
webpage source codes can also have mentions
domain.glass can tell us about the company’s infrastructure
GrayHatWarfare can do different searches, discover cloud storages, files and SSH keys
Staff
employees can be identified on business networks like Linkedin, Xing, etc
from job posts we can tell what technologies the company uses (Java, MySQL, Flask, etc)
from employee profile, we can get linked sites to personal projects, github page, etc
from technical employees profiles we can also get infrastructure and technology the company is likely using
Host Based Enumeration
FTP
FTP runs on application layer
for FTP connection, client & server establish channel through port 21 - client sends commands to server & the server returns status code - then participants establish data channel on port 20
FTP can be in active and passive mode
- in active, when client establishes connection it also informs the server via which client side port the server can transmit the response (less secure because client has to open ports)
- in passive, the server announces a port through which the client can establish the data channel
TFTP
TFTP (Trivial FTP) is simpler than FTP, uses UDP instead of TCP and doesn’t require user authentication
most used FTP server on Linux distros is vsFTPd and config can be found in /etc/vsftpd.conf- some settings are predefined by default
Dangerous settings:
anonymous_enable=YESanon_upload_enable=YESanon_mkdir_write_enable=YESno_anon_password=YESanon_root=/home/username/ftpwrite_enable=YESAnonymous Login / Status / Detailed Output
1 | |
- Footprinting
1
2
3
4
5
6
7
8
9
10
11
12# list nmap ftp scripts
find / -type f -name ftp* 2>/dev/null | grep scripts
# nmap scan using version scan (-sV), aggressive scan (-A), and the default script scan (-sC)
sudo nmap -sV -p21 -sC -A 10.129.14.136
# service interaction
nc -nv 10.129.14.136 21
telnet 10.129.14.136 21
# ftp server with TLS/SSL
openssl s_client -connect 10.129.14.136:21 -starttls ftp
SMB
is a client-server protocol for sharing files, printers and other network resources for Windows system
- Samba is an alternative implementation of SMB for Unix operating systems which uses the Common Internet File System (CIFS) network protocol
- default configuration can be found at
/etc/samba/smb.conf
1 | |
Dangerous Settings:
browseable = yes
read only = no
writable = yes
guest ok = yes
enable privileges = yes
create mask = 0777
directory mask = 0777
logon script = script.sh
magic script = script.sh
magic output = script.outFootprinting
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52# list shares
smbclient -N -L //10.129.14.128
# connect to share
smbclient //10.129.14.128/notes
# download from share
get prep-prod.txt
# !<cmd> to execute local system commands
!ls
# on smb server to see status
smbstatus
# nmap scan services
sudo nmap 10.129.14.128 -sV -sC -p139,445
# we can use tools like rpcclient to perform MS-RPC functions
rpcclient -U "" 10.129.14.128
# rpcclient - enum
srvinfo
enumdomains
querydominfo
netshareenumall
netsharegetinfo <share>
enumdomusers
queryuser <RID>
# rpcclient - user enum
enumdomusers
queryuser 0x3e9
#rpcclient - group info
querygroup 0x201
# brute force user RIDs
for i in $(seq 500 1100);do rpcclient -N -U "" 10.129.14.128 -c "queryuser 0x$(printf '%x\n' $i)" | grep "User Name\|user_rid\|group_rid" && echo "";done
# alternative to to bruteforcing - Impacket script samrdump.py
samrdump.py 10.129.14.128
# info we obtained from rpc client can be obtained using:
# SMBMap and CrackMapExec
smbmap -H 10.129.14.128
crackmapexec smb 10.129.14.128 --shares -u '' -p ''
# older tool, enum4linux
# automates many of the queries, but not all
./enum4linux-ng.py 10.129.14.128 -A
NFS
has the same purpose of SMB for Linux and Unix systems
the protocol has no authentication or authorization; instead RPC protocol is used for authentication and authorization is derived from file system information
most common authentication is via UNIX UID/GID and group memberships
/etc/exports contains a table of physical filesystems on an NFS server; it also contains examples of configuring NFS shares
Dangerous Settings
rwinsecurenohideno_root_squashFootprinting
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26sudo nmap 10.129.14.128 -p111,2049 -sV -sC
# nmap with NFS scripts
sudo nmap --script nfs* 10.129.14.128 -sV -p111,2049
# show avaialable NFS shares
showmount -e 10.129.14.128
# create empty folder to mount the share
# mount share to folder
mkdir target-NFS
sudo mount -t nfs 10.129.14.128:/ ./target-NFS/ -o nolock
cd target-NFS
tree .
# we can get access by creating the same usernames, group names, UIDs and GUIDs in our system to view and modify the files
# list content with username and group names
ls -l mnt/nfs/
# list contents with uids and guids
ls -n mnt/nfs/
# unmount
cd ..
sudo umount ./target-NFS
# if root_sqauash is set we cannot edit even as root
DNS
- is used to resolve domain names to IP addresses
- types of DNS servers:
- DNS root server
- Authoritative name server
- Non-authoritative name server
- Caching server
- Forwarding server
- Resolver
- DNS queries are unencrypted by default but can be encrypted using DoT, DoH or DNSCrypt network protocol
- it stores information about services associated with the domain like mail server, etc
- different DNS records are used for DNS queries:
AReturns an IPv4 address of the requested domain as a result. AAAAReturns an IPv6 address of the requested domain. MXReturns the responsible mail servers as a result. NSReturns the DNS servers (nameservers) of the domain. TXTThis record can contain various information. CNAMEThis record serves as an alias for another domain name PTRThe PTR record works the other way around (reverse lookup). It converts IP addresses into valid domain names. SOAProvides information about the corresponding DNS zone and email address of the administrative contact.
all DNS servers work with 3 different types of config files:
- local DNS configuration files
- zone files
- reverse name resolution files
Bind9 server is often used on Linux based distros; the local config file
named.confis divided into:named.conf.local
named.conf.optionsnamed.conf.log
zones are divided into individual files and is used to describe a zone completely; found in
/etc/bind/db.domain.comreverse name resolution zone files are used for PTR records to map IP address to FQDN; found in
/etc/bind/db.10.129.14dangerous settings:
allow-queryallow-recursionallow-transferzone-statistics
- Footprinting
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20# query NS using specific DNS server with @
dig ns inlanefreight.htb @10.129.14.128
# query version
dig CH TXT version.bind 10.129.120.85
# query all records
dig any inlanefreight.htb @10.129.14.128
# AXFR zone transfer
dig axfr inlanefreight.htb @10.129.14.128
# AXFR zone transfer - internal
dig axfr internal.inlanefreight.htb @10.129.14.128
# subdomain brute force
for sub in $(cat /opt/useful/seclists/Discovery/DNS/subdomains-top1million-110000.txt);do dig $sub.inlanefreight.htb @10.129.14.128 | grep -v ';\|SOA' | sed -r '/^\s*$/d' | grep $sub | tee -a subdomains.txt;done
# enumerate subdomains using DNSEnum
dnsenum --dnsserver 10.129.14.128 --enum -p 0 -s 0 -o subdomains.txt -f /opt/useful/seclists/Discovery/DNS/subdomains-top1million-110000.txt inlanefreight.htb
SMTP
Simple Mail Transfer Protocol is a protocol for sending emails; used between an email client and an outgoing server or between two SMTP servers
is often combined with IMAP or POP3 protocols
its unencrypted and transmits all data in plaintext and uses port 25
newer SMTP servers which are ESMTP are encrypted with SSL/TLS and use port 465 or 587; use AUTH PLAIN for authentication
mail workflow:
Client (MUA)➞Submission Agent (MSA)➞Open Relay (MTA) ➞Mail Delivery Agent (MDA) ➞ Mailbox (POP3/IMAP)default config can be found in
/etc/postfix/main.cfinteracting with an SMTP server:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28# connect to a server
telnet 10.129.14.128 25
# init a session
HELO mail1.inlanefreight.htb
# VRFY can be used to enumerate users
# server may issue code 252 and cofirm existence of user that doesn't exist
VRFY root
VRFY username
# send an email
MAIL FROM: <cry0l1t3@inlanefreight.htb>
RCPT TO: <mrb3n@inlanefreight.htb> NOTIFY=success,failure
DATA
From: <cry0l1t3@inlanefreight.htb>
To: <mrb3n@inlanefreight.htb>
Subject: DB
Date: Tue, 28 Sept 2021 16:32:51 +0200
Hey man, I am trying to access our XY-DB but the creds dont work.
Did you make any changes there?
# terminate session
QUITdangerous settings:
- open relay config:
mynetworks = 0.0.0.0/0- the server can send fake emails and init communicaton between multiple parties; can also spoof an email and read it
- open relay config:
Footprinting
1
2
3
4
5# default nmap script includes smtp-commands
sudo nmap 10.129.14.128 -sC -sV -p25
# to identify the SMTP target as open relay
sudo nmap 10.129.14.128 -p25 --script smtp-open-relay
IMAP / POP3
- Internet Message Access Protocol (IMAP) is used to access emails from a mail server; it allows online management of emails and supports folder structures
- Post Office Protocol (POP3) only provides listing, retrieving and deleting emails as function
- IMAP is unencrypted by default and uses port 143; can be encrypted with SSL/TLS on port 993
- POP3 uses ports 110 and 995 by default; can be encrypted on port 995
- dangerous settings:
auth_debugauth_debug_passwordsauth_verboseauth_verbose_passwordsauth_anonymous_username
- Footprinting
1
2
3
4
5
6
7
8
9
10
11
12
13sudo nmap 10.129.14.128 -sV -p110,143,993,995 -sC
# login to the mail server with credentials
curl -k 'imaps://10.129.14.128' --user user:p4ssw0rd
# with verbose, to see version of TLS, SSL certificate, banner, and version of the mail server
curl -k 'imaps://10.129.14.128' --user cry0l1t3:1234 -v
# we can use openssl or ncat to ineract with IMAP or POP3 over SSL
openssl s_client -connect 10.129.14.128:pop3s
openssl s_client -connect 10.129.14.128:imaps
SNMP
- Simple Network Management Protocol (SNMP) is used to monitor network devices, configure tasks and change settings remotely
- the client can transmit control commands to the server using agents on UDP port 161
- SNMP can also enable traps over UDP 162 which sends data packets from the SNMP server to the client without being requested
- MIB contains at least one Object Identifier (OID) which contains unique address and a name, also contains information about type, access rights and description of the SNMP object
- OIDs represent nodes in a hierarchical namespace and are identified by a unique sequence of numbers and usually concatenated by dot notations
- SMNPv1 supports information retrieval and configuring of network devices; no built-in authentication mechanism and no encryption
- SMNPv2 has many version but ‘v2c’ is more common; is extended with additional functions; community string (which provides security) is transmitted in plain text; no encryption
- SMNPv3 has security feature such as authentication using username and password and transmission encryption of the data (via pre-shared key)
- default configuration can be found at
/etc/snmp/snmpd.conf - dangerous settings:
rwuser noauthrwcommunity <community string> <IPv4 address>rwcommunity6 <community string> <IPv6 address>
- Footprinting
1
2
3
4
5
6
7
8
9
10
11# query the OIDs with their information
snmpwalk -v2c -c public 10.129.14.128
# brute-force names of the community string
onesixtyone -c /opt/useful/seclists/Discovery/SNMP/snmp.txt 10.129.14.128
# brute-force indiviual OIDs and enumerate the information behind them
# we need to know a community string first
sudo apt install braa
braa <community string>@<IP>:.1.3.6.* # Syntax
braa public@10.129.14.128:.1.3.6.*
MySQL
- MySQL is an opensource SQL relational database management system
- databases are stored in a single
.sqlfile - clients can retrieve and edit data using SQL based language queries
- default configuration can be found at
/etc/mysql/mysql.conf.d/mysqld.cnf - dangerous settings:
- user
- password
- admin_address
- debug
- sql_warnings
- secure_file_priv
- Footprinting
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20# nmap using mysql scripts
sudo nmap 10.129.14.128 -sV -sC -p3306 --script mysql*
# login to mysql server
mysql -u root -pP4SSw0rd -h 10.129.14.128
# queries
show databases;
select version();
use mysql;
show tables;
show columns from <table>;
select * from <table>;
select * from <table> where <column> = "<string>";
MSSQL
- is Microsft’s SQL-based relational database management system
- mostly used in Windows operating systems
- SQL Server Management Studio is usually used to manage the databases
- many clients can used to access databases running on MSSQL like:
mssql-cliSQL Server PowershellHeidiSQLSQLProimpacket-mssqlclient
- dangerous settings:
- not using encryption when connecting to MSSQL server
- using self-signed certificates
- using name pipes
- weak and default
sacredentials
- Footprinting
1
2
3
4
5
6
7
8
9
10
11
12
13
14# nmap mssql script scan
sudo nmap --script ms-sql-info,ms-sql-empty-password,ms-sql-xp-cmdshell,ms-sql-config,ms-sql-ntlm-info,ms-sql-tables,ms-sql-hasdbaccess,ms-sql-dac,ms-sql-dump-hashes --script-args mssql.instance-port=1433,mssql.username=sa,mssql.password=,mssql.instance-name=MSSQLSERVER -sV -p 1433 10.129.201.248
# mssql ping in metasploit
msf6 auxiliary(scanner/mssql/mssql_ping) > set rhosts 10.129.201.248
msf6 auxiliary(scanner/mssql/mssql_ping) > run
# connecting with mssqlclient
impacket-mssqlclient Administrator@10.129.201.248 -windows-auth
select name from sys.databases
Orcale TNS
- Oracle TNS is server a to facilitate communication between Oracle databases and applications over networks
- listener uses port
TCP/1521by default, and supportsIPX/SPX,UDPandAppleTalk - has built-in encryption mechanisms and supports
IPv6andSSL/TLSencryption - configuration files are called
tnsnames.oraandlistener.oraare located at$ORACLE_HOME/network/admin - Orcale 9 has a default password
CHANGE_ON_INSTALL, and DBSNMP service uses default passworddbsnmp - packages and tools to enumerate TNS listener and interact with it:
1 | |
- testing ODAT (ODAT is pentesting tool designed to enumerate and exploit vulnerabilities in Oracle database)
1 | |
- Footprinting
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35sudo nmap -p1521 -sV 10.129.204.235 --open
# SID is used to identify DB instances
# brutefoce SID
sudo nmap -p1521 -sV 10.129.204.235 --open --script oracle-sid-brute
# odat can scan to enumerate the orcale db
./odat.py all -s 10.129.204.235
# connect to db and interact if we have creds
sqlplus scott/tiger@10.129.204.235/XE
select table_name from all_tables;
select * from user_role_privs;
# test if user has sysdba access
# we can retreive password hashes and try to crack them offline
sqlplus scott/tiger@10.129.204.235/XE as sysdba
select name, password from sys.user$;
# we can upload webshell
# target needs to have a web server running
# linux default path /var/www/html
# windows default path C:\inetpub\wwwroot
echo "Oracle File Upload Test" > testing.txt
./odat.py utlfile -s 10.129.204.235 -d XE -U scott -P tiger --sysdba --putFile C:\\inetpub\\wwwroot testing.txt ./testing.txt
curl -X GET http://10.129.204.235/testing.txt
# if came across this error: sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory
sudo sh -c "echo /usr/lib/oracle/12.2/client64/lib > /etc/ld.so.conf.d/oracle-instantclient.conf";sudo ldconfig
IPMI
- Intelligent Platform Management Interface is a set of standardized specifications for hardware based host management
- used for system management and monitoring even when host is powered down and or has system failure
- Footprinting
1
2
3
4
5
6
7
8
9
10
11
12
13sudo nmap -sU --script ipmi-version -p 623 ilo.inlanfreight.local
# metasploit version scan
use auxiliary/scanner/ipmi/ipmi_version
set rhosts 10.129.5.224
show options
run
# retreive IMPI hashes
use auxiliary/scanner/ipmi/ipmi_dumphashes
# crack ipmi hashed password
hashcat -m 7300 hash.txt --wordlist /usr/share/wordlists/rockyou.txt
Remote Management Protocols
Linux
SSH
SSH enables two computers to establish an encrypted and direct connection on port
tcp/22SSH servers can be configured to only allows connections from specific clients
linux distributions use the opensource OpenBSD SSH (
OpenSSH)SSH-2 is more advanced encryption, speed, stability and security than SSH-1
the most common authentication method used is Public-key authenticated; OpenSSH has 6 different authentication methods:
- Password
- Public-key
- Host-based
- Keyboard
- Challenge-response
- GSSAPI
default configuration can be found
/etc/ssh/sshd_configdangerous settings:
PasswordAuthentication yesPermitEmptyPasswords yesPermitRootLogin yesProtocol 1X11Forwarding yesAllowTcpForwarding yesPermitTunnelDebianBanner yes
Footprinting
1
2
3
4
5
6
7
8
9# fingerprint the SSH server
git clone https://github.com/jtesta/ssh-audit.git && cd ssh-audit
./ssh-audit.py 10.129.14.132
# can output authentication methods used
ssh -v cry0l1t3@10.129.14.132
# for brute-froce attacks we can specify authentication method
ssh -v cry0l1t3@10.129.14.132 -o PreferredAuthentications=password
Rysnc
Rsync is a fast efficient tool for location and remotely copying files
it is often used for backup and monitoring
by default, it uses port
tcp/873and can be configured to use SSH for secure file transfersFootprinting
1
2
3
4
5
6
7
8# scan for rysnc
sudo nmap -sV -p 873 127.0.0.1
# probe accessible shares
nc -nv 127.0.0.1 873
# enumerate an open share
rsync -av --list-only rsync://127.0.0.1/dev
R-services
R-services are suite of services hosted to enable remote access or issue commands between Unix hosts over TCP/IP
is only accessible through a suite of programs known as
r-commands; they span across the ports512,513, and514r-commands consists of the following:
- rcp (
remote copy) - rexec (
remote execution) - rlogin (
remote login) - rsh (
remote shell) - rstat
- ruptime
- rwho (
remote who)
- rcp (
most abused commands are
rcp,rsh,rexecandrloginlist of trusted hosts can be found at
/etc/hosts.equivFootprinting
1
2
3
4
5
6
7
8
9
10
11# scan
sudo nmap -sV -p 512,513,514 10.0.17.2
# login if .rhosts is misconfigured
rlogin 10.0.17.2 -l htb-student
# if logged in, list authenticated users using rwho
rwho
# list authenticated users with Rusers
rusers -al 10.0.17.5
Windows
RDP
- Remote Desktop Protocol is created by Microsoft for remote access to computers running Windows
- allows display and control commands to be transmitted via GUI encrypted over IP networks
- works at the application layer and uses port
tcp/3389 - has handled
TLS/SSLwhich means all data is encrypted - Footprinting
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16nmap -sV -sC 10.129.201.248 -p3389 --script rdp*
# --packet-trace can be used to track the individual packages and inspect their contents manually
nmap -sV -sC 10.129.201.248 -p3389 --packet-trace --disable-arp-ping -n
# rdp-sec-check.pl can unauthnetically identify the security settings of RDP servers
sudo cpan
cpan[1]> install Encoding::BER
git clone https://github.com/CiscoCXSecurity/rdp-sec-check.git && cd rdp-sec-check
./rdp-sec-check.pl 10.129.201.248
# xfreerdp / rdesktop / Remmina can be used to RDP with GUI
xfreerdp /u:cry0l1t3 /p:"P455w0rd!" /v:10.129.201.248
WinRM
- is a simple windows integrated remote management protocol based on the command line
- uses the Simple Object Access Protocol (
SOAP) to establish connections on porttcp/5985andtcp/5986for HTTPS - Windows Remote Shell (
WinRS) is a component in WinRM that lets us execute arbitrary commands on the remote system - Footprinting
1
2
3
4nmap -sV -sC 10.129.201.248 -p5985,5986 --disable-arp-ping -n
# interact with winrm
evil-winrm -i 10.129.201.248 -u Cry0l1t3 -p P455w0rD!
WMI
- Windows Management Instrumentation is an extension CIM; a core functionality of the standardized WBEM for the windows platform
- allows read and write access to almost all settings on windows systems
- is accessed via PowerShell, VBScript, or WMIC
- consists of several programs and various databases known as repositories
- initialization takes place on port
tcp/135; moves to random port after successful connection - Footprinting
1
/usr/share/doc/python3-impacket/examples/wmiexec.py Cry0l1t3:"P455w0rD!"@10.129.201.248 "hostname"
Footprinting Lab - Easy
We were commissioned by the company
Inlanefreight Ltdto test three different servers in their internal network. The company uses many different services, and the IT security department felt that a penetration test was necessary to gain insight into their overall security posture.The first server is an internal DNS server that needs to be investigated. In particular, our client wants to know what information we can get out of these services and how this information could be used against its infrastructure. Our goal is to gather as much information as possible about the server and find ways to use that information against the company. However, our client has made it clear that it is forbidden to attack the services aggressively using exploits, as these services are in production.
Additionally, our teammates have found the following credentials “ceil:qwer1234”, and they pointed out that some of the company’s employees were talking about SSH keys on a forum.
The administrators have stored a
flag.txtfile on this server to track our progress and measure success. Fully enumerate the target and submit the contents of this file as proof.
Let’s scan the network first
1 | |
Trying to login to SSH, it requires a private key
Using the credentials provided we login to FTP on port 21 but no files are present in the FTP server.
Logging to port 2121, we’re able to find the .ssh folder
1 | |
Download the private key
1 | |
We’ll now SSH using that key and grab the flag found at /home/flag
1 | |
Footprinting Lab - Medium
This second server is a server that everyone on the internal network has access to. In our discussion with our client, we pointed out that these servers are often one of the main targets for attackers and that this server should be added to the scope.
Our customer agreed to this and added this server to our scope. Here, too, the goal remains the same. We need to find out as much information as possible about this server and find ways to use it against the server itself. For the proof and protection of customer data, a user named
HTBhas been created. Accordingly, we need to obtain the credentials of this user as proof.
1 | |
Connecting to share fails
1 | |
NFS shows us one available
1 | |
Let’s create a folder and mount share
1 | |
We don’t have permissions to view the share
1 | |
Looks like root credentials are not squashed, which means we can access the directory as root
1 | |
Let’s change our user to root and access the server
1 | |
The share contains a bunch of text files
1 | |
The description mentions a user named HTB has been created, so we’re going to attempt to find that
1 | |
The ticket we found contains the credentials for the user alex
1 | |
Using these credentials we’re able to access the SMB shares
1 | |
Connecting to the devshare Share, we found important.txt which contains credentials.
The username sa tells us that’s its probably credentials for Microsoft SQL Server Management Studio
1 | |
Going to RDP to the server using xfreerdp3
1 | |
After connecting to the server, we see MSSMS on the desktop
We’ll run the application as Administrator (Right Click > Run as Administrator) and enter the password 87N1ns@slls83
There’s only one database called accounts
We’re going to Query the database and find the user HTB
1 | |
Footprinting Lab - Hard
The third server is an MX and management server for the internal network. Subsequently, this server has the function of a backup server for the internal accounts in the domain. Accordingly, a user named
HTBwas also created here, whose credentials we need to access.
1 | |
IMAP and POP3 both require credentials for us to do anything with them.
We’re going to scan UDP ports
1 | |
SNMP is open, we can start footprinting the service.
We’ll use onesixtyone to brute-force community string names
1 | |
We found the community string backup
Querying the OIDs using snmpwalk, we found user credentials
1 | |
We can now login to IMAP or POP3 using these credentials: tom:NMds732Js2761
1 | |
The email we found contains an SSH key
1 | |
We’re going to save the key to a file
1 | |
Fix file permissions.
1 | |
SSH login using the key
1 | |
We find MySQL present in local system accounts
1 | |
Let’s try to login using the credentials we have for tom
1 | |
Login was successful.
Enumerating the database, we found HTB‘s credentials
1 | |