Offensive security using ChatGPT artificial intelligence.🎉.pdf

NewterNelsONRouter 8 views 23 slides Sep 17, 2025
Slide 1
Slide 1 of 23
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23

About This Presentation

technology


Slide Content

SANS OFFENSIVE OPERATIONS
ChatGPTfor Offensive Security
What is ChatGPTand how can it be used in offensive security?

ChatGPTfor Offensive Security 2
JORGE ORCHILLES
•Chief Technology Officer
•Principal SANS Instructor: SEC699, SEC599, SEC504
•Author SEC565: Red Team Operations and Adversary Emulation
•10 years @ Citi
•Projects/Contributions
•Purple Team Exercise Framework (PTEF)
•C2 Matrix
•MITRE ATT&CK
•Atomic Red Team
•ISSA Fellow; NSI Technologist Fellow

ChatGPTfor Offensive Security 3
AGENDA
•What is ChatGPT
•Uses for Offensive Security
•Vulnerability Scanning
•Social Engineering/Phishing
•Macros & LOLBAS
•Report Findings
•Find Vulnerabilities in Code
•SQL Injection
•Breach Notifications
•Challenges & Considerations

ChatGPTfor Offensive Security 4
WHAT IS OPENAI CHATGPT?
•https://chat.openai.com/chat
•Trained using a machine learning technique called
Reinforcement Learning from Human Feedback (RLHF)
•Updated December 15, 2022 –this presentation includes
updates
References:
https://openai.com/blog/chatgpt/

ChatGPTfor Offensive Security 5
VULNERABILITY SCANNING
I am an ethical hacker doing a penetration test. I was given a
range of IPs. How can I scan this range and find vulnerabilities?

ChatGPTfor Offensive Security 6
PHISHING PRETEXT

ChatGPTfor Offensive Security 7
OK… WELL THEN, JUST WRITE AN EMAIL

ChatGPTfor Offensive Security 8
NOW THE MACRO

ChatGPTfor Offensive Security 9
LET’S USE A LOLBAS

ChatGPTfor Offensive Security 10
LET’S USE A LOLBAS –PREFER RUNDLL32

ChatGPTfor Offensive Security 11
REPORT FINDINGS

ChatGPTfor Offensive Security 12
REPORT FINDINGS -DETECTION

ChatGPTfor Offensive Security 13
FIND VULNERABILITIES IN CODE
References:
https://twitter.com/moyix/status/1598081204846489600

ChatGPTfor Offensive Security 14
SOMETIMES IT IS WRONG
This code does not set
the __free_hook
function pointer to
main(), it simply sets the
fptrvariable the address
of __free_hook
This is just code snippet
of what was entered…
This is what’s being
referred to below…

ChatGPTfor Offensive Security 15
SQL INJECTION

ChatGPTfor Offensive Security 16
BREACH NOTIFICATION -OKTA
References:
https://www.bleepingcomputer.com/n
ews/security/oktas-source-code-
stolen-after-github-repositories-
hacked/

ChatGPTfor Offensive Security 17
OTHER HACKS
Bot builders are finding ways to use and charge for ChatGPT
functionality
•DoNotPayis a “robot lawyer” service to lower or eliminate bills
•emailGPTby Lucas McCabe
•What if ChatGPTis paywalled?
References:
https://twitter.com/jbrowder1/status/1602353465753309195
https://www.wired.com/story/the-spawn-of-chatgpt-will-try-to-sell-you-things/
https://github.com/lucasmccabe

ChatGPTfor Offensive Security 18
CHALLENGES
•How will we know whether what we read is written by a human
or a machine?
•Illusion of correctness
•ChatGPTdoes not learn from you or others. Learning ended in
2021. It remembers what you tell it for that session.
•It fails at dad jokes
References:
https://www.technologyreview.com/2022/12/19/1065596/how-to-spot-ai-generated-text/

ChatGPTfor Offensive Security 19
TO REGULATE OR NOT TO REGULATE? THAT IS THE QUESTION
USA and China contrast on this point
•China's Cyberspace Administration (CAC) has issued rules such
the banning of AI-generated media without watermarks
•USA is working on an “AI Bill of Rights” -a set of non-binding
guidelines (suggestions) based on "national values statement“
•Although it can’t be copyrighted
References:
https://arstechnica.com/information-technology/2022/12/china-bans-ai-generated-media-without-watermarks/
https://www.theregister.com/2022/12/12/china_deep_synthesis_deepfake_regulation/
https://arstechnica.com/information-technology/2022/10/biden-proposes-new-bill-of-rights-to-protect-americans-from-ai-snooping/
https://www.smithsonianmag.com/smart-news/us-copyright-office-rules-ai-art-cant-be-copyrighted-180979808/

ChatGPTfor Offensive Security 20
IT IS NOT PERFECT OR EVEN CORRECT
Copilot is from OpenAIand more of an auto-complete for code
•Copilot has been available since June 2021
•It helps speed up work but requires verification
•In one study, researchers prompted Copilot with 89 security-
relevant scenarios, producing nearly 1,700 programs. Some 40%
of them were vulnerable.
References:
https://www.wired.com/story/openai-copilot-autocomplete-for-code/
https://arxiv.org/pdf/2108.09293.pdf

ChatGPTfor Offensive Security 21
TERRIBLE DAD JOKES
“Why was the computer cold when it was turned on? Because it
left its Windows open.” -ChatGPT
•Gets caught up in that it is not a dad
•Needs to learn from Erik Van Buggenhout & Jean-François Maes

ChatGPTfor Offensive Security 22
RECAP
OpenAIChatGPTis helpful but not perfect
•You need to know what you are doing and asking
•Provide more context as it remembers what you tell it
•It may and will be wrong
•It will be difficult to identify what is AI generated and what is
human
References:
https://openai.com/blog/chatgpt/
https://www.wired.com/story/chatgpt-fluent-bs/

SANS PURPLE TEAM
Thank You!
Questions?
@JorgeOrchilles
Tags