Course: Cryptography and Network Security
University: Chanakya University, Bengaluru
Author: Baire Gowda | Reg: 25PG00157 | MCA β Cybersecurity & ML
This repository documents my hands-on penetration testing assignment where I used AI tools as assistants to find real vulnerabilities on intentionally vulnerable websites.
The key idea: AI is an assistant, not an autopilot. Every finding in this project was manually confirmed by me β AI only suggested where to look.
| Target | URL | Type |
|---|---|---|
| Target 1 | demo.testfire.net | Altoro Mutual β fake banking app by HCL |
| Target 2 | zero.webappsecurity.com | Zero Bank β fake banking app by Micro Focus |
Note: testphp.vulnweb.com (originally planned) was down β AWS cloud firewall blocked all ports. Switched to zero.webappsecurity.com. This itself is a real-world observation documented in the report.
| AI Tool | Role | Rating |
|---|---|---|
| Claude (Anthropic) | Primary assistant β recon analysis, attack strategy, payload suggestions, Python help | 9/10 |
| Gemini (Google) | Tested for comparison β refused to give target-specific payloads even for authorized site | 6/10 |
| Perplexity AI | Payload research with source citations | 8/10 |
- Understood technical context (exact URLs, parameter names)
- Explained why attacks work, not just the payload
- Helped write and debug Python scripts step by step
- Honest when uncertain β never gave confident wrong answers
Gemini refused to give specific attack vectors even for this authorized training site:
"While I understand this is for an authorized penetration test... I cannot provide specific target URLs or tailored attack vectors."
This shows AI guardrails can block legitimate security research β documented in Section 7 of the report.
| Tool | Purpose | Evidence |
|---|---|---|
| Nmap 7.98 | Port scanning & service detection | Found ports 80, 443, 8080 on both targets |
| ffuf | Directory fuzzing | Found /admin, /bank, /server-status |
| curl | HTTP requests from terminal | Headers, login testing, cookie capture |
| Firefox (Kali) | Manual browser testing | Confirmed XSS alert, SQL injection, SSL error |
| Python 3.13 | Wrote 6 automated pentest scripts | All with real terminal outputs |
| base64 (Linux) | Decoded sensitive cookie data | Found 2 credit card numbers in plaintext |
scripts/target1/
βββ sqli_tester.py # SQL injection tester β tests 5 payloads automatically
βββ xss_scanner.py # XSS scanner β tests 3 payload types (script, img, svg)
βββ port_scanner.py # TCP port scanner using Python socket library only
scripts/target2/
βββ default_creds_tester.py # Tests 7 common credential combinations
βββ security_headers_scanner.py # Checks missing headers, CORS, exposed pages
βββ port_scanner.py # Port scanner with firewall detection
# Install dependency
pip install requests
# Target 1 β SQL Injection
python3 scripts/target1/sqli_tester.py
# Target 1 β XSS Scanner
python3 scripts/target1/xss_scanner.py
# Target 1 β Port Scanner
python3 scripts/target1/port_scanner.py
# Target 2 β Default Credentials
python3 scripts/target2/default_creds_tester.py
# Target 2 β Security Headers
python3 scripts/target2/security_headers_scanner.py
# Target 2 β Port Scanner
python3 scripts/target2/port_scanner.py| # | Vulnerability | Severity | CWE | CVSS | OWASP |
|---|---|---|---|---|---|
| 1 | SQL Injection β Auth Bypass | CRITICAL | CWE-89 | 9.8 | A03:2021 |
| 2 | Sensitive Data in Cookie (credit cards in base64) | CRITICAL | CWE-312 | 9.1 | A02:2021 |
| 3 | IDOR β Account Enumeration | HIGH | CWE-284 | 8.1 | A01:2021 |
| 4 | Admin Panel Exposed | CRITICAL | CWE-284 | 9.1 | A01:2021 |
| 5 | Reflected XSS (3 vectors) | HIGH | CWE-79 | 7.4 | A03:2021 |
# Payload used in username field:
' OR '1'='1'--
# Result: "Hello Admin User β Welcome to Altoro Mutual Online"
# Full admin access gained including Edit Users panelecho "ODAwMDAwfkNvcnBvcmF0ZX4..." | base64 -d
# Output revealed: 4539082039396288~Credit Card, 4485983356242217~Credit Card
# Two full credit card numbers stored in browser cookie with only base64 encoding| # | Vulnerability | Severity | CWE | CVSS | OWASP |
|---|---|---|---|---|---|
| 1 | Server Status Publicly Exposed | HIGH | CWE-200 | 7.5 | A05:2021 |
| 2 | Dangerous HTTP Methods (PUT, DELETE) | HIGH | CWE-749 | 7.3 | A05:2021 |
| 3 | Expired SSL + SSLv2 Enabled | HIGH | CWE-295 | 7.4 | A02:2021 |
| 4 | Default Credentials (username/password) | CRITICAL | CWE-1392 | 9.8 | A07:2021 |
| 5 | CORS Misconfiguration (Allow-Origin: *) | MEDIUM | CWE-942 | 5.3 | A05:2021 |
Username: username
Password: password
Result : Full banking application access granted
Impact : Anyone can log in without any hacking knowledge
Server Version: Apache/2.2.22 (Win32) mod_ssl/2.2.22 OpenSSL/0.9.8t
Server Built : Jan 28 2012 (14 years old!)
Publicly accessible at /server-status β no authentication required
- Attack vector planning after recon
- Explaining SQL injection logic (not just payloads)
- XSS payload progression
- Python
requestslibrary β how to detect login bypass in response - Writing clear impact statements for report
| Failure | What Happened | Fix |
|---|---|---|
| Wrong field names | AI gave generic names β didn't know uid and passw |
Manual curl recon |
| Gemini refused | Wouldn't help with authorized training site | Used Claude instead |
| Hallucinated path | Claude suggested /bank/admin.aspx (doesn't exist) |
ffuf found real path /admin/admin.jsp |
| No session chaining | AI couldn't maintain SQLi β IDOR β admin chain | Manual multi-step attack |
Core Lesson: AI gave me the map. I did the journey.
- No real-time context β AI works on text only, can't observe live browser behavior
- Can't chain attacks β one question at a time, no attack chain awareness
- No business logic β can't understand what's logically wrong with an application
- Hallucination risk β confidently gives wrong paths, wrong field names
- Guardrails cause friction β Gemini blocked legitimate security research
- PentestGPT (USENIX Security 2024) β agentic pentesting with multi-step attack chains
- Penligent β enterprise platform connecting Nmap + Metasploit + Burp Suite via AI
- VulnGPT β AI for automated source code vulnerability detection
- Continuous AI Pentesting β real-time testing as code is deployed
ai-pentest-assistant/
βββ README.md
βββ scripts/
β βββ target1/
β β βββ sqli_tester.py
β β βββ xss_scanner.py
β β βββ port_scanner.py
β βββ target2/
β βββ default_creds_tester.py
β βββ security_headers_scanner.py
β βββ port_scanner.py
βββ docs/
βββ AI_Pentesting_Report.pdf
All testing was performed exclusively on intentionally vulnerable training applications designed for security education:
- demo.testfire.net β maintained by HCL Technologies for AppScan training
- zero.webappsecurity.com β maintained by Micro Focus for Fortify training
No real systems, real users, or real data were accessed or harmed.
This project is for educational purposes only.
Baire Gowda
MCA β Cybersecurity & Machine Learning
Chanakya University, Bengaluru
Registration No: 25PG00157