Skip to content

Commit b29d736

Browse files
committed
Added Automated CVE Creation and Defense
1 parent e90deaa commit b29d736

14 files changed

+1639
-39
lines changed

PwnAI.ipynb

Lines changed: 748 additions & 24 deletions
Large diffs are not rendered by default.

PwnAI_bulk.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from shutil import make_archive
1616
from directory_structure import Tree
1717
from alive_progress import alive_bar
18-
import time
18+
from time import sleep
1919
import openai
2020
from dotenv import load_dotenv
2121
load_dotenv()
@@ -73,7 +73,7 @@
7373
setting_token.write("OPENAI_TOKEN="+'"'+userkey+'"')
7474

7575
targets = input("Enter Filename: (Press enter for 'input/sample_sources' ) ") or "input/sample_sources"
76-
investigation = input("Enter name for your investigation: ")
76+
#investigation = input("Enter name for your investigation: ")
7777

7878
search = open(targets ,"r")
7979
query = search.read()
@@ -110,11 +110,11 @@
110110
pass
111111
else:
112112
os.environ['OPENAI_TOKEN'] = input('Enter API Key: ').replace(" ","")
113-
f_jsonpath = 'output/'+investigation+'/results'
113+
#f_jsonpath = 'output/'+investigation+'/results'
114114
token = os.environ.get("OPENAI_TOKEN")
115115

116-
os.mkdir('output/'+investigation)
117-
os.mkdir('output/'+investigation+'/results/')
116+
#os.mkdir('output/'+investigation)
117+
#os.mkdir('output/'+investigation+'/results/')
118118

119119
with open(targets, 'r') as targets:
120120
for line in targets:
@@ -124,26 +124,27 @@
124124
for search in openai_targets:
125125
#search = search.strip()
126126
response = openai.Completion.create(
127-
model="code-davinci-002",
128-
prompt=search+"\nHere's what this code is doing:\n1.",
127+
model="text-davinci-003",
128+
prompt=search+"\n\n",
129129
temperature=0,
130-
max_tokens=64,
130+
max_tokens=3600,
131131
top_p=1,
132132
frequency_penalty=0,
133133
presence_penalty=0,
134134
stop=["\"\"\""]
135135
)
136136
response = response['choices'][0]['text']
137-
with open('output/'+investigation+'/results/'+str(search.rsplit('/', 1)[-1])+ ".txt", "w") as f:
138-
f.write(response)
139-
fadedresponse = fade.greenblue("1."+response)
137+
#with open('output/'+investigation+'/results/'+str(search.rsplit('/', 1)[-1])+ ".txt", "w") as f:
138+
# f.write(response)
139+
fadedresponse = fade.greenblue(response)
140140

141141
print(' '*39+"🆁🅴🆂🆄🅻🆃🆂\n" + "𝘚𝘦𝘢𝘳𝘤𝘩 𝘴𝘰𝘶𝘳𝘤𝘦 𝘪𝘯𝘱𝘶𝘵:"+ str(search).strip())
142-
print("\n\033[36mHere's what I think this code is doing:")
142+
print("\n\033[36mHere's your code:")
143+
sleep(5)
143144
print(fadedresponse)
144145
print(faded_seperator)
145146

146147

147148

148-
path = Tree(f_jsonpath, absolute=False)
149+
#path = Tree(f_jsonpath, absolute=False)
149150
print(path)

input/code

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
write a program in python that searches twitter for "im deleting twitter". Saves the username for search results, waits for 1 day, create a twitter account from the username in the list with a 23 character password and finally saves the new account information.

input/sample_sources

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
https://github.com/rapid7/metasploit-payloads/blob/master/python/meterpreter/meterpreter.py
2-
https://github.com/rapid7/metasploit-payloads/blob/master/powershell/MSF.Powershell/Meterpreter/Core.cs
1+
write a seim rule to detect https://www.cvedetails.com/cve/CVE-2022-34878
2+
write a seim rule to detect https://www.cvedetails.com/cve/CVE-2022-34877
3+
write a seim rule to detect https://www.cvedetails.com/cve/CVE-2022-34821
4+
write a seim rule to detect https://www.cvedetails.com/cve/CVE-2022-34820
5+
write a seim rule to detect https://www.cvedetails.com/cve/CVE-2022-34819

0 commit comments

Comments
 (0)