diff --git a/hw7/README.md b/hw7/README.md index 52327fe..dcde1ae 100644 --- a/hw7/README.md +++ b/hw7/README.md @@ -5,7 +5,7 @@ The purpose of this assignment is to generate a security related application usi ## 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. @@ -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 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 Save this to hw7/{llm}/app.py ``` -## Output - Gemini (gemini 1.5) -There were a few runs of errors, but eventually I was able to get aider to output a program with the gemini LLM +## Errors +All runs gave the following python error, but were able to generate code regardless +![error](py-error.png) -### Errors -On the run where code was finally output, we still saw errors. But, we will ignore these for now -![error0](./gemini/error0.png) -![error1](./gemini/error1.png) +## 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 [gemini/app.py](gemini/app.py) -### Analysis +### Test +``` +python3 hw7/gemini/app.py +``` - - -## Output - GPT4 (gpt40) -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 -![error0](./gpt4/error0.png) -![error1](./gpt4/error1.png) - +## Results - GPT4 (gpt40) +``` +aider --model openai/gpt-4o +``` ### Code output [gpt4/app.py](gpt4/app.py) -### Analysis +### Test +``` +python3 hw7/gpt4/app.py +``` - - -## Output - Claude (claude-opus) +## Results - Claude (claude-opus) +``` +aider --model claude-3-opus-20240229 +``` 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 -![error0](./claude/error0.png) -![summary](./claude/summary.png) - - ### Code output + [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 +``` diff --git a/hw7/claude/error0.png b/hw7/claude/error0.png deleted file mode 100644 index 4f07544..0000000 Binary files a/hw7/claude/error0.png and /dev/null differ diff --git a/hw7/claude/summary.png b/hw7/claude/summary.png deleted file mode 100644 index d60c408..0000000 Binary files a/hw7/claude/summary.png and /dev/null differ diff --git a/hw7/gemini/error0.png b/hw7/gemini/error0.png deleted file mode 100644 index e793f64..0000000 Binary files a/hw7/gemini/error0.png and /dev/null differ diff --git a/hw7/gemini/error1.png b/hw7/gemini/error1.png deleted file mode 100644 index c73a8d9..0000000 Binary files a/hw7/gemini/error1.png and /dev/null differ diff --git a/hw7/gemini/mon-mode.png b/hw7/gemini/mon-mode.png new file mode 100644 index 0000000..8a1aa9f Binary files /dev/null and b/hw7/gemini/mon-mode.png differ diff --git a/hw7/gpt4/error0.png b/hw7/gpt4/error0.png deleted file mode 100644 index 07f1fd6..0000000 Binary files a/hw7/gpt4/error0.png and /dev/null differ diff --git a/hw7/gpt4/error1.png b/hw7/gpt4/error1.png deleted file mode 100644 index 1af121c..0000000 Binary files a/hw7/gpt4/error1.png and /dev/null differ diff --git a/hw7/py-error.png b/hw7/py-error.png new file mode 100644 index 0000000..96d8212 Binary files /dev/null and b/hw7/py-error.png differ