Pentest Chronicles
• Application response:
At this stage, we managed to locate an endpoint accessible to the application without authorization, which returns appropriate content depending on the value sent for the GET id parameter.
2. In response, the application returns the correct file name with ID no. 1:
3. Then, for the same identifier, a query is sent to return FALSE statement (one does not equal two):
4. The application does not return the file name for the query from the previous step:
At this stage, the sqlmap tool was used to automate the tedious process of querying the database. Based on the tool's results, we were able to recreate the database structure, including the PostgreSQL tables and columns used. As expected, the table containing user accounts in the application was called user.
However, this query was unsuccessful. Analysis of several failed attempts revealed that the application does not accept HTTP requests containing apostrophes or quotation marks. However, using decimal format and SQL concatenation, it was possible to create a target SQL query that was not blocked:
At this stage, all that is left is to log in to the administrator account using the new password:
As a result, we have been successfully logged in:
After carefully reviewing the available administrative functions, it was determined that the endpoint serving as the attack vector (/panel/download_file.php) is used for internal file sharing by application administrators. ” The cherry on top” – reduntant PostgreSQL user permissions Despite gaining access to the administrator account, I decided to return to the database itself and its configuration. To better understand the audited environment, it's always worth reviewing the permissions available to the user being audited – excessive permissions could potentially lead to reading and writing to files on the HTTP server being tested, as well as the operating system itself.
By automating the process of reading the results for the above SQL query, sqlmap tool was used which returned the following response:
Therefore, the database user from which the previous database queries were executed has the following roles assigned in PostgreSQL:

In today's world, ensuring the security of our accounts is more crucial than ever. Just as keys protect the doors to our homes, passwords serve as the first line of defense for our data and assets. It's easy to assume that technical individuals, such as developers and IT professionals, always use strong, unique passwords to keep ...

SOCMINT is the process of gathering and analyzing the information collected from various social networks, channels and communication groups in order to track down an object, gather as much partial data as possible, and potentially to understand its operation. All this in order to analyze the collected information and to achieve that goal by making …

PyScript – or rather Python in your browser + what can be done with it? A few days ago, the Anaconda project announced the PyScript framework, which allows Python code to be executed directly in the browser. Additionally, it also covers its integration with HTML and JS code. An execution of the Python code in …