Medium OSCP RCE SQL INJECTION

UNION-based SQL injection INTO OUTFILE

Vulnerability: UNION-based SQL injection in the storefront's product `id` parameter where backend errors leak the application path, allowing `SELECT ... INTO OUTFILE` to drop a PHP webshell into the webroot for remote code execution. Objective: Exploit the SQL injection to write a PHP webshell via INTO OUTFILE, gain remote command execution, upgrade to a reverse shell, and read the flag from local.txt on the server.

getting_started.sh

# 1. Extract the archive you just downloaded — on your own box, not a server.

you@host:~$ unzip union-based-sql-injection-into-outfile.zip && cd union-based-sql-injection-into-outfile

# 2. Boot the vulnerable machine. It prints the IP it was assigned.

you@host:~$ sudo bash deploy.sh union-based-sql-injection-into-outfile.tar

# 3. Point your tools at that IP. Ctrl+C here tears it back down when you're done.

Rating —
Downloads 0
Published Nov 18, 2026
Log in to download

Don't have an account? Sign up free

Learn more

Read the theory behind this lab before diving in.

Submit flags

Log in to submit flags and track your progress.

Comments (0)

Log in to join the discussion.

No comments yet. Be the first to ask something.