method_4_exploitation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
method_4_exploitation [2022/12/31 22:18] – [Tool: SQLMap] gman | method_4_exploitation [2023/01/12 00:27] (current) – [Defaults] gman | ||
---|---|---|---|
Line 49: | Line 49: | ||
---- | ---- | ||
+ | ====== Defaults ====== | ||
+ | |||
+ | Many folks leave many devices with factory defaults. You can quickly look up the default login creds here: | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * [[https:// | ||
+ | |||
+ | ---- | ||
====== Tools ====== | ====== Tools ====== | ||
Line 192: | Line 201: | ||
---- | ---- | ||
- | ====== | + | ====== |
- | ===== Reverse Shells | + | ===== Command |
- | {{ :images: | + | **Command Injection Attacks:** These are attacks that attempt to send commands through a web app to the operating system. |
+ | * It would give you the ability to directly manipulate the o/s. | ||
+ | * On Linux, use the '' | ||
- | In a reverse shell, a victim machine connects | + | **Example: |
- | * You will use reverse shells 95% of the time | + | * When we create our account with the username "dbag," the back-end result sent to the o/s would be something like: |
+ | * '' | ||
+ | * Using command injection, you add commands to our user input: | ||
+ | * '' | ||
+ | * This would result in a command like this: | ||
+ | * '' | ||
+ | * And that's bad. | ||
- | https:// | + | ===== SQLi ===== |
- | http:// | + | |
- | + | ||
- | **PHP Reverse Shell:** | + | |
- | * Instructions: | + | |
- | * Download: https:// | + | |
- | + | ||
- | ===== Bind Shells | + | |
- | + | ||
- | {{ : | + | |
- | + | ||
- | In a bind shell, we connect to the target. | + | |
- | * You fire off an exploint into the target machine, open up a port, and then use the attack machine to connect. | + | |
- | + | ||
- | https:// | + | |
- | + | ||
- | ---- | + | |
- | ====== SQLi ====== | ||
**SQL Injection: | **SQL Injection: | ||
Line 227: | Line 227: | ||
</ | </ | ||
- | ===== Tool: SQLMap | + | ==== Tool: SQLMap ==== |
Automates SQLi enumeration and exploitation. Use it only after you have manually verified there is indeed an SQLi vulnerability on the target. | Automates SQLi enumeration and exploitation. Use it only after you have manually verified there is indeed an SQLi vulnerability on the target. | ||
- | ===== Blind SQLi ===== | + | ==== Blind SQLi ==== |
Blind SQL injection takes two forms: boolean-based (T/F) and timing-based. | Blind SQL injection takes two forms: boolean-based (T/F) and timing-based. | ||
- | **Boolean-Based SQLi:** Uses a boolean (T/F) SQL injection statement to test if the injected code gets through. | + | **Boolean-Based |
- Test for a standard SQL injection vulnerability by placing a boolean TRUE after valid input. | - Test for a standard SQL injection vulnerability by placing a boolean TRUE after valid input. | ||
* If it is vulnerable it will match ALL results. | * If it is vulnerable it will match ALL results. | ||
Line 251: | Line 251: | ||
[valid input]' | [valid input]' | ||
</ | </ | ||
+ | |||
+ | **Timing-Based Blind SQLi:** relies on the amount of time required to process a query. | ||
+ | * If the app returns on the query immediately, | ||
+ | * If there is a delay/pause (based on your query statement) before the return, the injection worked. | ||
+ | * Example: | ||
+ | |||
+ | < | ||
+ | |||
+ | **Tools:** Metasploit & SQLMap. | ||
+ | * They automate these timing-based attacks, making them fairly easy. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== Shells ====== | ||
+ | |||
+ | ===== Reverse Shells ===== | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | In a reverse shell, a victim machine connects back to us at the attack machine. | ||
+ | * You will use reverse shells 95% of the time | ||
+ | |||
+ | https:// | ||
+ | http:// | ||
+ | |||
+ | **PHP Reverse Shell: | ||
+ | * Instructions: | ||
+ | * Download: https:// | ||
+ | |||
+ | ===== Bind Shells ===== | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | In a bind shell, we connect to the target. | ||
+ | * You fire off an exploint into the target machine, open up a port, and then use the attack machine to connect. | ||
+ | |||
+ | https:// | ||
---- | ---- |
method_4_exploitation.1672525098.txt.gz · Last modified: by gman