Urgent.News

What's breaking now, across thousands of outlets.

Tech

SQL Injection with SQLmap on Kali: From Login Form to Database

The Sqlmap tool is an open-source tool that automates SQL injection testing. It can handle what's done manually with a few commands. SQL injection: simply put, if a web application sends the input it takes from the user straight to the database without filtering it, you can write SQL code there. It could be a login form, a search box, a URL parameter, etc. The application runs that code and the…

SQLmap is a powerful open-source tool for automating SQL injection testing. Essentially, if a web application neglects to filter user input before sending it to the database, SQL injection attacks become possible. These attacks involve targeting login forms, search boxes, or URL parameters to manipulate the database.

For demonstration purposes, we'll use a self-hosted instance of the Damn Vulnerable Web Application (DVWA) running via Docker. To begin, ensure Docker is installed and running, then launch DVWA with the command `docker run --rm -d -p 80:80 vulnerables/web-dvwa`. After accessing the application via your browser at `http://localhost/login.php` and logging in as "admin" with the password "password", navigate to the SQL injection page by selecting it from DVWA's left menu.

SQLmap requires the session cookie to act as if the application is logged in. Retrieve this cookie from your browser's developer tools and transmit it along with the target URL, security level, and database specifications when executing `sqlmap`. Use the `-u` flag for the URL, `--cookie` for the session cookie, `--dbs` to enumerate databases, and `--batch` to automate the process.

Upon identifying the DVWA database, list the available tables using `-D` followed by the database name. The `users` table is expected to contain username and password fields. To extract the stored user data, execute `sqlmap` again with the `-T` flag pointing to the target table, and use `--dump` to extract the information. SQLmap will automatically attempt to crack MD5 hashes using a dictionary attack, revealing potential login credentials in the process. Always ensure you have authorization before conducting any such tests on live systems.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Is flisk.sh a Small CLI or a Big Thing?

People keep asking the wrong size question about flisk.sh . Is it a platform? A Kubernetes replacement? A new way to build companies? No. It is a CLI.

  • flisk.sh is a CLI that generates Docker and Tilt wiring for services
  • Simplifies local development for small to medium-sized projects (10-50 services)
  • Still requires management of Dockerfiles, env config, routing rules

Your Stack Has a Size. Flisk Only Fits One of Them.

"We have microservices" is not a sizing input. Twelve services in one Compose file is a different job from twelve services that each own a manifest, a route, and a health check.

  • Flisk specializes in managing stacks with 2-5 containerized services
  • It streamlines deployment by generating Docker Compose file and running Tilt loop
  • Flisk falls short for larger stacks due to scaling memory requirements

More from Wednesday 21 October →