In this blog post, I will discuss how I manually exploited an SQL injection vulnerability in an INSERT query statement.
Windows Password Cracking Attack
Whoami
Gaining access to a development web application's source code through an exposed .git repository, I discovered a time-limited file upload vulnerability through static code analysis. I exploited this vulnerability to gain access as the www-data user. By exploiting a setuid binary and the input() function behavior in Python 2, I was able to locally pivot to the developer user. Finally, I elevated my privileges to root by exploiting the easy_setup utility.
Exploiting NoSQL injection to bypass the login page and gain access to Josh's credentials. Using Josh's credentials, we were able to access the internal chat web app, where we were able to obtain Jeager's leaked credentials and gain access to the machine. A weak password manager C++ application was used to gain access to a Docker container with the user deploy. Once we were inside the Docker container, we were able to escape from it to gain access as the root user.
Exploiting Command injection vuln to gain access to the machine then exploiting a script that we can run as root without password to gain root access.
Logs Analysis
Upon initial analysis, it was discovered that the system in question was vulnerable to a file read and directory traversal exploit. Subsequently, it was also identified that an additional exploit, a File read vulnerability, existed. This allowed for the acquisition of a binary file through the website's file upload feature. Further examination revealed that the binary was susceptible to a buffer overflow exploit, which could be leveraged by utilizing the aforementioned file upload vulnerability. By utilizing Return-Oriented Programming (ROP), the stack was made executable, allowing for the execution of reverse shell shellcode. This resulted in the acquisition of a shell, which was then utilized to introduce a symbolic link within a backup directory, leading to the retrieval of an SSH key. To attain root access, the system's "binfmt_misc" function was abused.