SlideShare a Scribd company logo
Jitendra Chauhan
Join Whatsapp Group for coordination
Welcome to GenAI Security
Hands-on Workshop
Co-Founder Detoxio AI
19 Years of R&D, AI/ML,
Product Mgmt, 2x Patents,
2x Startups
Agenda
Understand GenAI - History, Evolution and Fundamentals
Demystify - AI, GenAI, and LLMs
LLMs - Intuitive Understanding
LLMs - Internal Architecture
Run a Model (Hands On)
Understand Key Parameters of LLMs
Penetration Testing and Red Teaming LLMs
GenAI Threat Model
LLM Model Vulnerabilities
GenAI Apps Vulnerabilities (Owasp Top 2)
Red Teaming a Model - Manual and Automated (Hands On)
Scanning GenAI Apps - Burp, Chakra, and others (Hands On)
Agenda
Use GenAI to Enhance Security
TBD
TBD
Securing GenAI Applications
Guardrails
LLMOps
Foundation of
GenAI
Learn LLMs Internals
AI?
AI?
AI?
Learn floor plan by itself
Sense - Seeing, ..
Detect - Dirt / Clean
Cleaning - Wash, Brooming
Avoid - Obstacles
Move - Across Layout
Upskill - Not possible
Interact - Terminal
Fault - Manual Repair
Learning - Not Possible
When? - Manual Command
AI Not AI
Evolution of AI
Ultimate Goal of AI
Sophia
Robots
matching
Humans
Two Major Advancements
Generation of Content - Text, Audio,...
Understanding of Meaning - Text, Audio,...
The arrival of the transformer architecture in 2017, following the publication of the
"Attention is All You Need" paper, revolutionised generative AI.
Transformers
Finetuning GenAI For Hacking and Defending
GenAI & LLMs
Finetuning GenAI For Hacking and Defending
Finetuning GenAI For Hacking and Defending
Finetuning GenAI For Hacking and Defending
Intuitive Understanding of
AI and LLMs
Applications
Predictive Models
Examples
Neural Networks
Deep Learning
Decision Trees
Predictive Models
Generative Models
Examples: GAN, LLM - GPT2, BERT,
What comes next?
To protect the network from unauthorized access, it
is crucial to implement strong <Guess me>
How did you come with your next word?
What comes next?
To protect the network from unauthorized access, it
is crucial to implement strong <Guess me>
How did you come with your next word?
What comes next?
How did you come with your next word? did you see them before?
Think 5 other possible words?
Can you continue and further add more words or even a sentence?
LLMs are next word prediction program!!
Complete the story
Once upon a time, in a forest, a speedy rabbit and a slow tortoise
decided to have a race. Confident in his swift legs, the rabbit
darted ahead but soon became complacent and decided to take a
nap midway......
Complete the above story in your own words
Understand or Encoder
Complete the story
Once upon a time, in a forest, a speedy rabbit and a slow tortoise decided to
have a race. Confident in his swift legs, the rabbit darted ahead but soon became
complacent and decided to take a nap midway......
The diligent tortoise, though slow, continued steadily and eventually passed the
sleeping rabbit, crossing the finish line first. The story teaches that consistent
effort and perseverance can triumph over arrogance and laziness.
Generate or Decoder
LLMs Encode and Decode !!!
How AI Learns?
Finetuning GenAI For Hacking and Defending
Finetuning GenAI For Hacking and Defending
Finetuning GenAI For Hacking and Defending
Finetuning GenAI For Hacking and Defending
Finetuning GenAI For Hacking and Defending
Temperature
Finetuning GenAI For Hacking and Defending
Finetuning GenAI For Hacking and Defending
Finetuning GenAI For Hacking and Defending
Finetuning GenAI For Hacking and Defending
Finetuning GenAI For Hacking and Defending
Finetuning GenAI For Hacking and Defending
Finetuning GenAI For Hacking and Defending
[BOS] (beginning of sequence): This token marks the start of a text. It
signifies to the LLM where a piece of content begins.
[EOS] (end of sequence): This token is positioned at the end of a text,
and is especially useful when concatenating multiple unrelated texts,
similar to <|endoftext|>. For instance, when combining two different
Wikipedia articles or books, the [EOS] token indicates where one article
ends and the next one begins.
[PAD] (padding): When training LLMs with batch sizes larger than one,
BPE Tokenizer
Finetuning GenAI For Hacking and Defending
Self Attention
Finetuning GenAI For Hacking and Defending
RNN - Encoder / Decoder
Bahdanau attention (2014)
The “Self” in Self Attention
Transformer Architecture - Self Attention
Finetuning GenAI For Hacking and Defending
Finetuning GenAI For Hacking and Defending
What to do when AI Fails?
Finetuning GenAI For Hacking and Defending
Hugging Face
Explore Open Source Models
Run a Model on Kaggle
Good Llama vs Bad Llama
100K+ Models
Resonsible AI
Overview
RAG Architecture
Pokebot - Poisioned GenAI App
GenAI Security Testing
GenAI Apps
Overview
RAG Architecture
Pokebot - Poisioned GenAI App
GenAI Security Testing
LLM Challenges
Key Challenges
Large language models (LLMs) do not have access to the Updated and Latest
Knowledge and Facts.
LLMs can also face challenges with complex math problems and tend to generate
text even when they don't know the answer (hallucination).
GenAI Apps
The Retrieval Augmented Generation (RAG) framework overcomes these issues by
connecting LLMs to external data sources and applications.
Reseasoning using Chain of Thoughts
Prompting the model to think more like a human by breaking down the problem
into steps has shown
success in improving reasoning performance.
Chain of thought prompting involves including intermediate reasoning steps in
examples used for oneor few-shot inference.
ReAct : Reasoning and Action (Decision Making Process)
ReAct combines chain of thought reasoning with action planning in LLMs.
Examples include a question, thought (reasoning step), action (pre-defined set of
actions), and observation (new information).
Actions are limited to predefined options like search, lookup, and finish.
Pokebot - Sample RAG
GenAI
App
Architecture
GenAI Project Lifecycle
Finetuning GenAI For Hacking and Defending
Model Security
GenAI App
Security
Data Security
GenAI & LLM Security
LLM Security
Model Vulnerabilities
Build and Finetune Models
LLM Red Teaming
Securing LLMs
LLM Data Poisioning
Case Study
DBRX Red teaming
START
Finetune Base LLM
Design solution
Build GenAI App
No Yes
Is Model Safe?
No Yes
Fix
vulnerabilities
Configure Monitoring &
Guard Rails
Red Team Guard Rails
Is App Safe? No Yes
Successful tests?
Deploy on Production
Prevent Data Leaks
Red Team LLM Appsec Testing
Secure LLM Secure App Monitor Prevent
Secure GenAI Apps
GenAI In Security
GenAI to assist SOC
GenAI to assist Appsec (BurpGPT)
GenAI in SOC
1. Threat Detection and Response For XSOAR:
Analysis of logs and network traffic to detect potential security threats.
Automated generation of threat response scripts.
2. Security Policy Optimization:
Creation of tailored security policies based on organizational requirements and
threat landscape.
Automated generation of security awareness training materials.
3. Code Generation with SAST Remediation:
Automated generation of documentation and code from requirements or
specifications.
Generation of test cases and automation scripts with validation of false positives.
Tools And Technologies
Vulnerability Management Tools: Nessus, OpenVAS
Threat Intelligence Platforms: Splunk, AlienVault
Security Orchestration Tools: Blue Team Field, Red Hat
Automation Frameworks: Ansible, PowerShell,Chef
Collaboration and Communication Tools: Slack, Jira
Pipeline Automation
Threat Intelligence Collection
Security Alerts Correlation
Incident Response Initiation
Vulnerability Scanning
Threat Identification
Threat Prioritization
Automated Remediation Execution
Vulnerability Patching
Threat Mitigation
System Recovery Planning
[Business Continuity Management
For IOC Automation
RCA Analysis
Matching with IOC and CVE
Correlation of IOC For hosts
Chef/Pupper for automated patch
management
Threat Mitigation with Mitigation
and BCP Plan
System Recovery Planning
Business Continuity Management
Example TestCase
Evaluate this test case and investigate it as soc analyst :
powershell got executed with admin privileges at host 202.1.1.1,
concerned active directory user was on vacation,
et me know the detailed analysis and give me the chef or automation script to
harden the windows machine which was executed in network,
GenAI in Appsec
DAST pipeline can be automated with Burp Kinda tools.
Example Pipeline would be through burp extension.
Sample BURPGPT :
Use the Azure OpenAI Service's API feature | BurpGPT
Installation | BurpGPT
Sample Usecase
Identifying potential vulnerabilities in web applications that use a crypto library
affected by a specific CVE:
Analyse the request and response data for potential security vulnerabilities related
to the {CRYPTO_LIBRARY_NAME} crypto library affected by CVE-{CVE_NUMBER}:
Web Application URL: {URL}
Crypto Library Name: {CRYPTO_LIBRARY_NAME}
CVE Number: CVE-{CVE_NUMBER}
Request Headers: {REQUEST_HEADERS}
Response Headers: {RESPONSE_HEADERS}
Request Body: {REQUEST_BODY}
Response Body: {RESPONSE_BODY}
Identify any potential vulnerabilities related to the {CRYPTO_LIBRARY_NAME} crypto
library affected by CVE-{CVE_NUMBER} in the request and response data and report
them.
Sample Usecase -2
Scanning for vulnerabilities in web applications that use biometric authentication by
analysing request and response data related to the authentication process:
Analyse the request and response data for potential security vulnerabilities related to
the biometric authentication process:
Web Application URL: {URL}
Biometric Authentication Request Headers: {REQUEST_HEADERS}
Biometric Authentication Response Headers: {RESPONSE_HEADERS}
Biometric Authentication Request Body: {REQUEST_BODY}
Biometric Authentication Response Body: {RESPONSE_BODY}
Identify any potential vulnerabilities related to the biometric authentication process in
the request and response data and report them.
References
Name URL
LLM Red Teaming of DBRX Shared Good Drive References
LLM Red Teaming Notebook on Kaggle
https://www.kaggle.com/code/jaycneo/llm
-red-teaming-notebook-detoxio-ai
Pokebot - Damn Vulnerable App
https://huggingface.co/spaces/detoxioai/
Pokebot
References
Hugging Face GPT
https://huggingface.co/openai-
community/gpt2
Attention What you Need https://arxiv.org/abs/1706.03762
Awesome LIst related to LLM and
GenAI Security
https://llmsecurity.net/
Learning GPT From Andrej Karapathi
https://www.youtube.com/watch?
v=zjkBMFhNj_g
References
owasp_training_data_for_web.json · mahabharat/OWASP at main
(huggingface.co)
GitHub - aress31/burpgpt: A Burp Suite extension that integrates
OpenAI's GPT to perform an additional passive scan for discovering
highly bespoke vulnerabilities, and enables running traffic-based
analysis of any type.
https://chat.lmsys.org/
https://github.com/sindresorhus/awesome-chatgpt
GitHub - Hannibal046/Awesome-LLM: Awesome-LLM: a curated list of
Large Language Model
References

More Related Content

PPTX
final-technical-roadmap-aap-2 ansible redhat
PDF
Introduccion a Simul8 - 4 - Primer Ejemplo.pdf
PDF
Identity and Access Management from Microsoft and Razor Technology
PDF
The New Security Playbook: DevSecOps
PDF
Use Symfony Messenger Component and CQRS!
PDF
Jenkins Workflow
PPTX
Prezentacja budowle do lego
PDF
How OpenShift SDN helps to automate
final-technical-roadmap-aap-2 ansible redhat
Introduccion a Simul8 - 4 - Primer Ejemplo.pdf
Identity and Access Management from Microsoft and Razor Technology
The New Security Playbook: DevSecOps
Use Symfony Messenger Component and CQRS!
Jenkins Workflow
Prezentacja budowle do lego
How OpenShift SDN helps to automate

What's hot (19)

PDF
CAF intro Hosters modern
PPTX
SSO introduction
PDF
SC-900+2022.pdf
PPTX
Microsoft Threat Protection
PPTX
Keeping a Secret with HashiCorp Vault
PDF
Unlocking the Cloud Operating Model: People, Process, Tools
PPTX
Oracle Application Developmenr Framework
PDF
Red Hat Satellite
PDF
Red hat ansible automation technical deck
PDF
cybersecurity- A.Abutaleb
PDF
security-reference-architecture.pdf
PPTX
Single Sign On Considerations
PPTX
microsoft-cybersecurity-reference-architectures (1).pptx
PDF
Developer Tutorial: WebAuthn for Web & FIDO2 for Android
PPTX
Azure Identity and access management
PDF
AWS cloud adoption framework (caf)
PPTX
Power of the cloud - Introduction to azure security
PDF
Trusts You Might Have Missed - 44con
PDF
Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault
CAF intro Hosters modern
SSO introduction
SC-900+2022.pdf
Microsoft Threat Protection
Keeping a Secret with HashiCorp Vault
Unlocking the Cloud Operating Model: People, Process, Tools
Oracle Application Developmenr Framework
Red Hat Satellite
Red hat ansible automation technical deck
cybersecurity- A.Abutaleb
security-reference-architecture.pdf
Single Sign On Considerations
microsoft-cybersecurity-reference-architectures (1).pptx
Developer Tutorial: WebAuthn for Web & FIDO2 for Android
Azure Identity and access management
AWS cloud adoption framework (caf)
Power of the cloud - Introduction to azure security
Trusts You Might Have Missed - 44con
Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault

Similar to Finetuning GenAI For Hacking and Defending (20)

PDF
Final Cut Pro Crack FREE LINK Latest Version 2025
PDF
Privacy and Security in the Age of Generative AI - C4AI.pdf
PDF
Avast Free Antivirus Crack FREE Downlaod 2025
PDF
SpyHunter Crack Latest Version FREE Download 2025
PPTX
Applied AI Workshop - Presentation - Connect Day GDL
PDF
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
PDF
THE EVOLVING LANDSCAPE OF CYBERSECURITY: RED TEAMS, LARGE LANGUAGE MODELS, AN...
PDF
THE EVOLVING LANDSCAPE OF CYBERSECURITY: RED TEAMS, LARGE LANGUAGE MODELS, AN...
PDF
THE EVOLVING LANDSCAPE OF CYBERSECURITY: RED TEAMS, LARGE LANGUAGE MODELS, AN...
PDF
Cybersecurity Challenges with Generative AI - for Good and Bad
PDF
Privacy and Security in the Age of Generative AI
PDF
Use Case Patterns for LLM Applications (1).pdf
PPTX
Future of AI - 2023 07 25.pptx
PDF
Challenges in AI LLMs adoption in the Enterprise
PPTX
Cloud Study Jam[1st OCT] gdscgtbit.pptx
PPTX
Generative AI in CSharp with Semantic Kernel.pptx
PDF
Kono.IntelCraft.Weekly.AI.LLM.Landscape.2024.02.28.pdf
PDF
Guardians and Glitches: Navigating the Duality of Gen AI in AppSec
PDF
Supercharge Your AI Development with Local LLMs
PDF
LLM Security - Smart to protect, but too smart to be protected
Final Cut Pro Crack FREE LINK Latest Version 2025
Privacy and Security in the Age of Generative AI - C4AI.pdf
Avast Free Antivirus Crack FREE Downlaod 2025
SpyHunter Crack Latest Version FREE Download 2025
Applied AI Workshop - Presentation - Connect Day GDL
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
THE EVOLVING LANDSCAPE OF CYBERSECURITY: RED TEAMS, LARGE LANGUAGE MODELS, AN...
THE EVOLVING LANDSCAPE OF CYBERSECURITY: RED TEAMS, LARGE LANGUAGE MODELS, AN...
THE EVOLVING LANDSCAPE OF CYBERSECURITY: RED TEAMS, LARGE LANGUAGE MODELS, AN...
Cybersecurity Challenges with Generative AI - for Good and Bad
Privacy and Security in the Age of Generative AI
Use Case Patterns for LLM Applications (1).pdf
Future of AI - 2023 07 25.pptx
Challenges in AI LLMs adoption in the Enterprise
Cloud Study Jam[1st OCT] gdscgtbit.pptx
Generative AI in CSharp with Semantic Kernel.pptx
Kono.IntelCraft.Weekly.AI.LLM.Landscape.2024.02.28.pdf
Guardians and Glitches: Navigating the Duality of Gen AI in AppSec
Supercharge Your AI Development with Local LLMs
LLM Security - Smart to protect, but too smart to be protected

More from Priyanka Aash (20)

PPTX
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
PDF
From Chatbot to Destroyer of Endpoints - Can ChatGPT Automate EDR Bypasses (1...
PDF
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
PDF
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
PDF
Lessons Learned from Developing Secure AI Workflows.pdf
PDF
Cyber Defense Matrix Workshop - RSA Conference
PDF
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
PDF
Securing AI - There Is No Try, Only Do!.pdf
PDF
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
PDF
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
PDF
10 Key Challenges for AI within the EU Data Protection Framework.pdf
PDF
Techniques for Automatic Device Identification and Network Assignment.pdf
PDF
Keynote : Presentation on SASE Technology
PDF
Keynote : AI & Future Of Offensive Security
PDF
Redefining Cybersecurity with AI Capabilities
PDF
Demystifying Neural Networks And Building Cybersecurity Applications
PDF
(CISOPlatform Summit & SACON 2024) Kids Cyber Security .pdf
PDF
(CISOPlatform Summit & SACON 2024) Regulation & Response In Banks.pdf
PDF
(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf
PDF
(CISOPlatform Summit & SACON 2024) Workshop _ Most Dangerous Attack Technique...
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
From Chatbot to Destroyer of Endpoints - Can ChatGPT Automate EDR Bypasses (1...
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Lessons Learned from Developing Secure AI Workflows.pdf
Cyber Defense Matrix Workshop - RSA Conference
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
Securing AI - There Is No Try, Only Do!.pdf
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
10 Key Challenges for AI within the EU Data Protection Framework.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Keynote : Presentation on SASE Technology
Keynote : AI & Future Of Offensive Security
Redefining Cybersecurity with AI Capabilities
Demystifying Neural Networks And Building Cybersecurity Applications
(CISOPlatform Summit & SACON 2024) Kids Cyber Security .pdf
(CISOPlatform Summit & SACON 2024) Regulation & Response In Banks.pdf
(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf
(CISOPlatform Summit & SACON 2024) Workshop _ Most Dangerous Attack Technique...

Recently uploaded (20)

PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Advanced IT Governance
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Approach and Philosophy of On baking technology
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Electronic commerce courselecture one. Pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
KodekX | Application Modernization Development
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Reach Out and Touch Someone: Haptics and Empathic Computing
Advanced IT Governance
Dropbox Q2 2025 Financial Results & Investor Presentation
Per capita expenditure prediction using model stacking based on satellite ima...
The AUB Centre for AI in Media Proposal.docx
NewMind AI Monthly Chronicles - July 2025
Approach and Philosophy of On baking technology
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Advanced methodologies resolving dimensionality complications for autism neur...
Electronic commerce courselecture one. Pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Mobile App Security Testing_ A Comprehensive Guide.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
KodekX | Application Modernization Development

Finetuning GenAI For Hacking and Defending

  • 1. Jitendra Chauhan Join Whatsapp Group for coordination Welcome to GenAI Security Hands-on Workshop Co-Founder Detoxio AI 19 Years of R&D, AI/ML, Product Mgmt, 2x Patents, 2x Startups
  • 2. Agenda Understand GenAI - History, Evolution and Fundamentals Demystify - AI, GenAI, and LLMs LLMs - Intuitive Understanding LLMs - Internal Architecture Run a Model (Hands On) Understand Key Parameters of LLMs Penetration Testing and Red Teaming LLMs GenAI Threat Model LLM Model Vulnerabilities GenAI Apps Vulnerabilities (Owasp Top 2) Red Teaming a Model - Manual and Automated (Hands On) Scanning GenAI Apps - Burp, Chakra, and others (Hands On)
  • 3. Agenda Use GenAI to Enhance Security TBD TBD Securing GenAI Applications Guardrails LLMOps
  • 5. AI?
  • 6. AI?
  • 7. AI? Learn floor plan by itself Sense - Seeing, .. Detect - Dirt / Clean Cleaning - Wash, Brooming Avoid - Obstacles Move - Across Layout Upskill - Not possible Interact - Terminal Fault - Manual Repair Learning - Not Possible When? - Manual Command AI Not AI
  • 9. Ultimate Goal of AI Sophia Robots matching Humans
  • 10. Two Major Advancements Generation of Content - Text, Audio,... Understanding of Meaning - Text, Audio,... The arrival of the transformer architecture in 2017, following the publication of the "Attention is All You Need" paper, revolutionised generative AI.
  • 21. Generative Models Examples: GAN, LLM - GPT2, BERT,
  • 22. What comes next? To protect the network from unauthorized access, it is crucial to implement strong <Guess me> How did you come with your next word?
  • 23. What comes next? To protect the network from unauthorized access, it is crucial to implement strong <Guess me> How did you come with your next word?
  • 24. What comes next? How did you come with your next word? did you see them before? Think 5 other possible words? Can you continue and further add more words or even a sentence? LLMs are next word prediction program!!
  • 25. Complete the story Once upon a time, in a forest, a speedy rabbit and a slow tortoise decided to have a race. Confident in his swift legs, the rabbit darted ahead but soon became complacent and decided to take a nap midway...... Complete the above story in your own words
  • 26. Understand or Encoder Complete the story Once upon a time, in a forest, a speedy rabbit and a slow tortoise decided to have a race. Confident in his swift legs, the rabbit darted ahead but soon became complacent and decided to take a nap midway...... The diligent tortoise, though slow, continued steadily and eventually passed the sleeping rabbit, crossing the finish line first. The story teaches that consistent effort and perseverance can triumph over arrogance and laziness. Generate or Decoder LLMs Encode and Decode !!!
  • 41. [BOS] (beginning of sequence): This token marks the start of a text. It signifies to the LLM where a piece of content begins. [EOS] (end of sequence): This token is positioned at the end of a text, and is especially useful when concatenating multiple unrelated texts, similar to <|endoftext|>. For instance, when combining two different Wikipedia articles or books, the [EOS] token indicates where one article ends and the next one begins. [PAD] (padding): When training LLMs with batch sizes larger than one,
  • 46. RNN - Encoder / Decoder
  • 48. The “Self” in Self Attention Transformer Architecture - Self Attention
  • 51. What to do when AI Fails?
  • 53. Hugging Face Explore Open Source Models Run a Model on Kaggle Good Llama vs Bad Llama
  • 55. Resonsible AI Overview RAG Architecture Pokebot - Poisioned GenAI App GenAI Security Testing
  • 56. GenAI Apps Overview RAG Architecture Pokebot - Poisioned GenAI App GenAI Security Testing
  • 57. LLM Challenges Key Challenges Large language models (LLMs) do not have access to the Updated and Latest Knowledge and Facts. LLMs can also face challenges with complex math problems and tend to generate text even when they don't know the answer (hallucination).
  • 58. GenAI Apps The Retrieval Augmented Generation (RAG) framework overcomes these issues by connecting LLMs to external data sources and applications. Reseasoning using Chain of Thoughts Prompting the model to think more like a human by breaking down the problem into steps has shown success in improving reasoning performance. Chain of thought prompting involves including intermediate reasoning steps in examples used for oneor few-shot inference. ReAct : Reasoning and Action (Decision Making Process) ReAct combines chain of thought reasoning with action planning in LLMs. Examples include a question, thought (reasoning step), action (pre-defined set of actions), and observation (new information). Actions are limited to predefined options like search, lookup, and finish.
  • 63. Model Security GenAI App Security Data Security GenAI & LLM Security
  • 64. LLM Security Model Vulnerabilities Build and Finetune Models LLM Red Teaming Securing LLMs LLM Data Poisioning
  • 66. START Finetune Base LLM Design solution Build GenAI App No Yes Is Model Safe? No Yes Fix vulnerabilities Configure Monitoring & Guard Rails Red Team Guard Rails Is App Safe? No Yes Successful tests? Deploy on Production Prevent Data Leaks Red Team LLM Appsec Testing Secure LLM Secure App Monitor Prevent Secure GenAI Apps
  • 67. GenAI In Security GenAI to assist SOC GenAI to assist Appsec (BurpGPT)
  • 68. GenAI in SOC 1. Threat Detection and Response For XSOAR: Analysis of logs and network traffic to detect potential security threats. Automated generation of threat response scripts. 2. Security Policy Optimization: Creation of tailored security policies based on organizational requirements and threat landscape. Automated generation of security awareness training materials. 3. Code Generation with SAST Remediation: Automated generation of documentation and code from requirements or specifications. Generation of test cases and automation scripts with validation of false positives.
  • 69. Tools And Technologies Vulnerability Management Tools: Nessus, OpenVAS Threat Intelligence Platforms: Splunk, AlienVault Security Orchestration Tools: Blue Team Field, Red Hat Automation Frameworks: Ansible, PowerShell,Chef Collaboration and Communication Tools: Slack, Jira
  • 70. Pipeline Automation Threat Intelligence Collection Security Alerts Correlation Incident Response Initiation Vulnerability Scanning Threat Identification Threat Prioritization Automated Remediation Execution Vulnerability Patching Threat Mitigation System Recovery Planning [Business Continuity Management For IOC Automation RCA Analysis Matching with IOC and CVE Correlation of IOC For hosts Chef/Pupper for automated patch management Threat Mitigation with Mitigation and BCP Plan System Recovery Planning Business Continuity Management
  • 71. Example TestCase Evaluate this test case and investigate it as soc analyst : powershell got executed with admin privileges at host 202.1.1.1, concerned active directory user was on vacation, et me know the detailed analysis and give me the chef or automation script to harden the windows machine which was executed in network,
  • 72. GenAI in Appsec DAST pipeline can be automated with Burp Kinda tools. Example Pipeline would be through burp extension. Sample BURPGPT : Use the Azure OpenAI Service's API feature | BurpGPT Installation | BurpGPT
  • 73. Sample Usecase Identifying potential vulnerabilities in web applications that use a crypto library affected by a specific CVE: Analyse the request and response data for potential security vulnerabilities related to the {CRYPTO_LIBRARY_NAME} crypto library affected by CVE-{CVE_NUMBER}: Web Application URL: {URL} Crypto Library Name: {CRYPTO_LIBRARY_NAME} CVE Number: CVE-{CVE_NUMBER} Request Headers: {REQUEST_HEADERS} Response Headers: {RESPONSE_HEADERS} Request Body: {REQUEST_BODY} Response Body: {RESPONSE_BODY} Identify any potential vulnerabilities related to the {CRYPTO_LIBRARY_NAME} crypto library affected by CVE-{CVE_NUMBER} in the request and response data and report them.
  • 74. Sample Usecase -2 Scanning for vulnerabilities in web applications that use biometric authentication by analysing request and response data related to the authentication process: Analyse the request and response data for potential security vulnerabilities related to the biometric authentication process: Web Application URL: {URL} Biometric Authentication Request Headers: {REQUEST_HEADERS} Biometric Authentication Response Headers: {RESPONSE_HEADERS} Biometric Authentication Request Body: {REQUEST_BODY} Biometric Authentication Response Body: {RESPONSE_BODY} Identify any potential vulnerabilities related to the biometric authentication process in the request and response data and report them.
  • 76. Name URL LLM Red Teaming of DBRX Shared Good Drive References LLM Red Teaming Notebook on Kaggle https://www.kaggle.com/code/jaycneo/llm -red-teaming-notebook-detoxio-ai Pokebot - Damn Vulnerable App https://huggingface.co/spaces/detoxioai/ Pokebot References
  • 77. Hugging Face GPT https://huggingface.co/openai- community/gpt2 Attention What you Need https://arxiv.org/abs/1706.03762 Awesome LIst related to LLM and GenAI Security https://llmsecurity.net/ Learning GPT From Andrej Karapathi https://www.youtube.com/watch? v=zjkBMFhNj_g References
  • 78. owasp_training_data_for_web.json · mahabharat/OWASP at main (huggingface.co) GitHub - aress31/burpgpt: A Burp Suite extension that integrates OpenAI's GPT to perform an additional passive scan for discovering highly bespoke vulnerabilities, and enables running traffic-based analysis of any type. https://chat.lmsys.org/ https://github.com/sindresorhus/awesome-chatgpt GitHub - Hannibal046/Awesome-LLM: Awesome-LLM: a curated list of Large Language Model References