re-gen scripts
@ -5,7 +5,7 @@ The purpose of this assignment is to generate a security related application usi
|
|||||||
|
|
||||||
## Input
|
## Input
|
||||||
```
|
```
|
||||||
Generate a python application to assist in wifi penetration testing by prompting the user for the name of a password protected wifi network BSSID and returning the plaintext password.
|
Generate a python application to assist in wifi penetration testing by prompting the user for the name (SSID) of a password protected wifi network and returning the plaintext password.
|
||||||
|
|
||||||
This python application should use a combination of shell tools assumed to be on the users linux system, including but not limited to iwconfig, airmon-ng, airodump-ng, aireplay-ng, aircrack-ng.
|
This python application should use a combination of shell tools assumed to be on the users linux system, including but not limited to iwconfig, airmon-ng, airodump-ng, aireplay-ng, aircrack-ng.
|
||||||
|
|
||||||
@ -13,54 +13,73 @@ Operations may be run sequentially, or in parallel using multi-threading
|
|||||||
|
|
||||||
As needed, the use of shell tools should utilize sudo capabilities
|
As needed, the use of shell tools should utilize sudo capabilities
|
||||||
|
|
||||||
|
As needed, the application may utilize a wordlist found at ~/rockyou.txt
|
||||||
|
|
||||||
As needed, the application can change the state of the users wifi interface between managed and monitor mode
|
As needed, the application can change the state of the users wifi interface between managed and monitor mode
|
||||||
|
|
||||||
Save this to hw7/{llm}/app.py
|
Save this to hw7/{llm}/app.py
|
||||||
```
|
```
|
||||||
|
|
||||||
## Output - Gemini (gemini 1.5)
|
## Errors
|
||||||
There were a few runs of errors, but eventually I was able to get aider to output a program with the gemini LLM
|
All runs gave the following python error, but were able to generate code regardless
|
||||||
|

|
||||||
|
|
||||||
### Errors
|
|
||||||
On the run where code was finally output, we still saw errors. But, we will ignore these for now
|
|
||||||
|
|
||||||

|
## Results - Gemini (gemini 1.5)
|
||||||

|
```
|
||||||
|
aider --model gemini/gemini-1.5-pro-latest
|
||||||
|
```
|
||||||
|
I was able to get aider to output a program with the gemini LLM
|
||||||
|
|
||||||
### Code output
|
### Code output
|
||||||
[gemini/app.py](gemini/app.py)
|
[gemini/app.py](gemini/app.py)
|
||||||
|
|
||||||
### Analysis
|
### Test
|
||||||
|
```
|
||||||
|
python3 hw7/gemini/app.py
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Results - GPT4 (gpt40)
|
||||||
|
```
|
||||||
## Output - GPT4 (gpt40)
|
aider --model openai/gpt-4o
|
||||||
A script was generated here on the first try
|
```
|
||||||
|
|
||||||
### Errors
|
|
||||||
Similarly, the code also generated with lint errors, and when prompted, I instructed airder to fix them. However, it did come up with a program on the first try
|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
### Code output
|
### Code output
|
||||||
[gpt4/app.py](gpt4/app.py)
|
[gpt4/app.py](gpt4/app.py)
|
||||||
|
|
||||||
### Analysis
|
### Test
|
||||||
|
```
|
||||||
|
python3 hw7/gpt4/app.py
|
||||||
|
```
|
||||||
|
|
||||||
|
## Results - Claude (claude-opus)
|
||||||
|
```
|
||||||
## Output - Claude (claude-opus)
|
aider --model claude-3-opus-20240229
|
||||||
|
```
|
||||||
I was able to redeem $5 of free API credits for this test
|
I was able to redeem $5 of free API credits for this test
|
||||||
|
|
||||||
### Errors
|
|
||||||
On the first shot, claude rejected this ask. On the second try, it gave a program with a nice summary
|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
### Code output
|
### Code output
|
||||||
|
|
||||||
[claude/app.py](claude/app.py)
|
[claude/app.py](claude/app.py)
|
||||||
|
|
||||||
### Analysis
|
Along with the code output, claude gave a nice summary
|
||||||
|
```
|
||||||
|
This application does the following:
|
||||||
|
|
||||||
|
1 Gets the available WiFi interfaces using iwconfig
|
||||||
|
2 Prompts the user to enter the SSID of the target network
|
||||||
|
3 Changes the WiFi interface to monitor mode using airmon-ng
|
||||||
|
4 Captures the handshake for the target network using airodump-ng and aireplay-ng
|
||||||
|
5 Changes the WiFi interface back to managed mode
|
||||||
|
6 Cracks the password using the captured handshake file and a wordlist (~/rockyou.txt) with aircrack-ng
|
||||||
|
7 Prints out the cracked password for the target network
|
||||||
|
|
||||||
|
It uses subprocess to run the shell commands and re to parse the output. The WiFi interface is changed between managed and monitor modes
|
||||||
|
as needed.
|
||||||
|
```
|
||||||
|
|
||||||
|
### Test
|
||||||
|
```
|
||||||
|
python3 hw7/claude/app.py
|
||||||
|
```
|
||||||
|
Before Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 195 KiB |
BIN
hw7/gemini/mon-mode.png
Normal file
After Width: | Height: | Size: 99 KiB |
Before Width: | Height: | Size: 87 KiB |
Before Width: | Height: | Size: 190 KiB |
BIN
hw7/py-error.png
Normal file
After Width: | Height: | Size: 112 KiB |