SlideShare a Scribd company logo
1 of 19
INTRODUCTION TO
PYTHON FOR
CYBERSECURITY
L Raji Abdulgafar
L Bug Hunter
L InfoSec as a Service
L PY
$WHOAMI
@mrgaphy @abdulgaphy
INTRODUCTION
Widespread of technology and access to the internet are
shaping the way business activity is done today. while
these phenomena are known to have brought global
business to a whole new level, they have also brought
with them, the mixed blessing called “cybercrime.”
The term “cybersecurity” is used to refer to the security
offered through on-line services to protect your online
information in other way cybersecurity refer to a set of
techniques used to protect the integrity of networks,
programs and data from attack, damage and
unauthorized access.
@mrgaphy @abdulgaphy
@mrgaphy @abdulgaphy
In this talk, I will introduce you to the core concepts of
chosen python as your programming language as a
cybersecurity professional, how it can improve your agility
and performance.
The core concept of cybersecurity involves protecting
information and systems from major cyberthreats, these
cyberthreat takes many forms (e.g web application attacks,
malware, ransomware, phishing, exploit kits)
According to FORBES, the global cybersecurity market is
expected to reach 170 billion by 2020. this rapid growth is
being fueled by an array of technology trend, including the
onslaught of initiatives with ever-evolving security.
INTRODUCTION CONT…
Learning a programming language is like starting a friction
fire……….it takes a bit of work upfront, but once you get
the initial ember the fire starts quickly.
LEARNING TO CODE
DATA TYPES
Strings - “Hello”
Numbers - 123
Lists – [‘hello’,’2’,’1’]
Tuples - (‘1’,’2’,’3’) (immutable)
Dictionaries – d = {‘key1’:’dog’,’key2’:’cat’}
PYTHON 101
Python is a brilliant language. It is known to be a lazy programming l
Used to write small lines of codes that does many tasks.
This is a simple print line statement >>> print(“Welcome, Pentesters”
@mrgaphy @abdulgaphy
L python can be run directly from the cli.
L Python code can be written directly into a python
interpreter using a python ide.
L Python code can be in a file.
RUNNING A PYTHON CODE
WHY PYTHON?
L EASY (install, learn,
code)
L Tons of libraries
L Code is easy to
understand
L Multiplatform
L Good for prototyping
WHAT MAKES PYTHON SUCH AN EFFECTIVE
LANGUAGE FOR SECURITY PROFESSIONAL
@mrgaphy @abdulgaphy
L It is a scripting language.
L Many tasks can be automated to save time.
L Python supports pre-built extensive libraries that are
specifically designed for penetration testing and provide
some powerful functionalities.
L The syntax isn’t too complicated and there are a lot of 3rd
party modules that can do heavy lifting for you.
Python modules are one of the most powerful features.
They extend functionality for your python script. So if you
wanted to make a web request, you could just import the
module “urllib” instead of having to write all the code from
scratch.
There are many built-In modules and 3rd party modules
developed by the InfoSec community
@mrgaphy @abdulgaphy
WHAT A PYTHON MODULES DOES
You might think “I don’t know how to write code”, and you
may tune this talk out because you think you wont
understand it.
…..BUT I DO NOT WRITE CODE
@mrgaphy @abdulgaphy
HTTPSERVER
It creates and listens at the HTTP server,
dispatching the requests to a handler.
@mrgaphy @abdulgaphy
SOCKET — LOW-LEVEL NETWORKING INTERFACE
Cryptography could be viewed as a process of information
hiding and verification. This process includes the protocols
(standards), algorithms and strategies to securely and
consistently prevent or delay unauthorized access to
sensitive information and enable the verifiability of every
component in a communication.
CRYPTOGRAPHIC
SERVICES
• When performing web application assessments, the ability
to craft web
requests in Python is essential
• Python has many libraries to support interaction with web
resources
(urllib, urllib2, requests, BeautifulSoup, etc.) We are going to
explore
several of these in the presentation.
MAKING WEB REQUESTS
BASIC SYNTAX TO MAKE A WEB REQUEST
IN PYTHON USING URLLIB
GET Request to fetch all the web page (digest
authentication, redirections, cookies and more).
REQUESTS: MODULE FOR WEB
L Scapy
L Optparse
L Requests
L Urllib
L Pycipher
L Nmap
L SSL
L Json
L RE
L Argparse
L Sys
L OS
L BeautifulSoup
SOME PYTHON MODULES
WHO IS USING PYTHON?
L Immunity Debugger
L Peach
L Sulley
L Paimei
L Scapy
L Spike Proxy
L Core Impact
L Canvas
L W3AF
L Sqlmap
L Impacket
L Google
L Peepdf

More Related Content

What's hot

QR Codes and the Ushahidi Platform
QR Codes and the Ushahidi PlatformQR Codes and the Ushahidi Platform
QR Codes and the Ushahidi PlatformUshahidi
 
Cryptography and PKI
Cryptography and PKICryptography and PKI
Cryptography and PKIRabei Hassan
 
Email Security Presentation
Email Security PresentationEmail Security Presentation
Email Security PresentationYosef Gamble
 
CGI White Paper - Key Incryption Mechanism
CGI White Paper - Key Incryption MechanismCGI White Paper - Key Incryption Mechanism
CGI White Paper - Key Incryption MechanismAmit Singh
 
PGP Basic Lecture 01
PGP Basic Lecture 01PGP Basic Lecture 01
PGP Basic Lecture 01Qaisar Ayub
 
BAIT1103 Chapter 5
BAIT1103 Chapter 5BAIT1103 Chapter 5
BAIT1103 Chapter 5limsh
 
Non-Transferable Signatures with PGP
Non-Transferable Signatures with PGPNon-Transferable Signatures with PGP
Non-Transferable Signatures with PGPblogzilla
 
Digital signature service in noida
Digital signature service in noidaDigital signature service in noida
Digital signature service in noidaDSC Delhi
 

What's hot (17)

QR Codes and the Ushahidi Platform
QR Codes and the Ushahidi PlatformQR Codes and the Ushahidi Platform
QR Codes and the Ushahidi Platform
 
Encryption by fastech
Encryption by fastechEncryption by fastech
Encryption by fastech
 
Analysis of Cryptography Techniques
Analysis of Cryptography TechniquesAnalysis of Cryptography Techniques
Analysis of Cryptography Techniques
 
Network Security CS2
Network Security CS2Network Security CS2
Network Security CS2
 
Pgp
PgpPgp
Pgp
 
Cryptography and PKI
Cryptography and PKICryptography and PKI
Cryptography and PKI
 
Cryptography
CryptographyCryptography
Cryptography
 
Email Security Presentation
Email Security PresentationEmail Security Presentation
Email Security Presentation
 
Cn ppt
Cn pptCn ppt
Cn ppt
 
CGI White Paper - Key Incryption Mechanism
CGI White Paper - Key Incryption MechanismCGI White Paper - Key Incryption Mechanism
CGI White Paper - Key Incryption Mechanism
 
Cryptography
CryptographyCryptography
Cryptography
 
PGP Basic Lecture 01
PGP Basic Lecture 01PGP Basic Lecture 01
PGP Basic Lecture 01
 
BAIT1103 Chapter 5
BAIT1103 Chapter 5BAIT1103 Chapter 5
BAIT1103 Chapter 5
 
Ntewrok secuirty cs1
Ntewrok secuirty cs1Ntewrok secuirty cs1
Ntewrok secuirty cs1
 
Pgp
PgpPgp
Pgp
 
Non-Transferable Signatures with PGP
Non-Transferable Signatures with PGPNon-Transferable Signatures with PGP
Non-Transferable Signatures with PGP
 
Digital signature service in noida
Digital signature service in noidaDigital signature service in noida
Digital signature service in noida
 

Similar to Introduction to python for cybersecurity pythonminna

Ways You Can Use Python For Cybersecurity - AppsDevPro
Ways You Can Use Python For Cybersecurity - AppsDevPro Ways You Can Use Python For Cybersecurity - AppsDevPro
Ways You Can Use Python For Cybersecurity - AppsDevPro SofiaCarter4
 
What Is Ethical Hacking and How Does It Work?
What Is Ethical Hacking and How Does It Work?What Is Ethical Hacking and How Does It Work?
What Is Ethical Hacking and How Does It Work?Careervira
 
Hello Coding anyone can learn coding now.pdf
Hello Coding anyone can learn coding now.pdfHello Coding anyone can learn coding now.pdf
Hello Coding anyone can learn coding now.pdfumarmahmood253
 
Network Security and Spoofing Attacks
Network Security and Spoofing AttacksNetwork Security and Spoofing Attacks
Network Security and Spoofing AttacksPECB
 
How to be come a hacker slide for 2600 laos
How to be come a hacker slide for 2600 laosHow to be come a hacker slide for 2600 laos
How to be come a hacker slide for 2600 laosOuthai SAIOUDOM
 
python programming.pptx
python programming.pptxpython programming.pptx
python programming.pptxKaviya452563
 
A REPORT On DETECTION OF PHISHING WEBSITE USING MACHINE LEARNING
A REPORT On DETECTION OF PHISHING WEBSITE USING MACHINE LEARNINGA REPORT On DETECTION OF PHISHING WEBSITE USING MACHINE LEARNING
A REPORT On DETECTION OF PHISHING WEBSITE USING MACHINE LEARNINGEmma Burke
 
Final project.ppt
Final project.pptFinal project.ppt
Final project.pptshreyng
 
01_Metasploit - The Elixir of Network Security
01_Metasploit - The Elixir of Network Security01_Metasploit - The Elixir of Network Security
01_Metasploit - The Elixir of Network SecurityHarish Chaudhary
 
Create a software key logger
Create a software key logger Create a software key logger
Create a software key logger GiralFaurel
 
Making PHP Smarter - Dutch PHP 2023.pptx
Making PHP Smarter - Dutch PHP 2023.pptxMaking PHP Smarter - Dutch PHP 2023.pptx
Making PHP Smarter - Dutch PHP 2023.pptxAdam Englander
 
Learn Hacking With Gflixacademy
Learn Hacking With GflixacademyLearn Hacking With Gflixacademy
Learn Hacking With GflixacademyGaurav Mishra
 
Data Security in Fintech App Development: How PHP Can Help
Data Security in Fintech App Development: How PHP Can HelpData Security in Fintech App Development: How PHP Can Help
Data Security in Fintech App Development: How PHP Can HelpNarola Infotech
 
Cyber Security Workshop GDSC-BITW
Cyber Security Workshop GDSC-BITWCyber Security Workshop GDSC-BITW
Cyber Security Workshop GDSC-BITWChanchalHiwanj1
 
Password cracking and brute force tools
Password cracking and brute force toolsPassword cracking and brute force tools
Password cracking and brute force toolszeus7856
 

Similar to Introduction to python for cybersecurity pythonminna (20)

Ways You Can Use Python For Cybersecurity - AppsDevPro
Ways You Can Use Python For Cybersecurity - AppsDevPro Ways You Can Use Python For Cybersecurity - AppsDevPro
Ways You Can Use Python For Cybersecurity - AppsDevPro
 
What Is Ethical Hacking and How Does It Work?
What Is Ethical Hacking and How Does It Work?What Is Ethical Hacking and How Does It Work?
What Is Ethical Hacking and How Does It Work?
 
Hello Coding anyone can learn coding now.pdf
Hello Coding anyone can learn coding now.pdfHello Coding anyone can learn coding now.pdf
Hello Coding anyone can learn coding now.pdf
 
Network Security and Spoofing Attacks
Network Security and Spoofing AttacksNetwork Security and Spoofing Attacks
Network Security and Spoofing Attacks
 
How to be come a hacker slide for 2600 laos
How to be come a hacker slide for 2600 laosHow to be come a hacker slide for 2600 laos
How to be come a hacker slide for 2600 laos
 
python programming.pptx
python programming.pptxpython programming.pptx
python programming.pptx
 
A REPORT On DETECTION OF PHISHING WEBSITE USING MACHINE LEARNING
A REPORT On DETECTION OF PHISHING WEBSITE USING MACHINE LEARNINGA REPORT On DETECTION OF PHISHING WEBSITE USING MACHINE LEARNING
A REPORT On DETECTION OF PHISHING WEBSITE USING MACHINE LEARNING
 
Final project.ppt
Final project.pptFinal project.ppt
Final project.ppt
 
Get started with hacking
Get started with hackingGet started with hacking
Get started with hacking
 
01_Metasploit - The Elixir of Network Security
01_Metasploit - The Elixir of Network Security01_Metasploit - The Elixir of Network Security
01_Metasploit - The Elixir of Network Security
 
Create a software key logger
Create a software key logger Create a software key logger
Create a software key logger
 
Python Final
Python FinalPython Final
Python Final
 
Making PHP Smarter - Dutch PHP 2023.pptx
Making PHP Smarter - Dutch PHP 2023.pptxMaking PHP Smarter - Dutch PHP 2023.pptx
Making PHP Smarter - Dutch PHP 2023.pptx
 
Learn Hacking With Gflixacademy
Learn Hacking With GflixacademyLearn Hacking With Gflixacademy
Learn Hacking With Gflixacademy
 
Data Security in Fintech App Development: How PHP Can Help
Data Security in Fintech App Development: How PHP Can HelpData Security in Fintech App Development: How PHP Can Help
Data Security in Fintech App Development: How PHP Can Help
 
Ethical hacking
Ethical hackingEthical hacking
Ethical hacking
 
Cyber Security Workshop GDSC-BITW
Cyber Security Workshop GDSC-BITWCyber Security Workshop GDSC-BITW
Cyber Security Workshop GDSC-BITW
 
Ethical hacking
Ethical hackingEthical hacking
Ethical hacking
 
Total E(A)gression defcon
Total E(A)gression   defconTotal E(A)gression   defcon
Total E(A)gression defcon
 
Password cracking and brute force tools
Password cracking and brute force toolsPassword cracking and brute force tools
Password cracking and brute force tools
 

Recently uploaded

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 

Recently uploaded (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 

Introduction to python for cybersecurity pythonminna

  • 2. L Raji Abdulgafar L Bug Hunter L InfoSec as a Service L PY $WHOAMI @mrgaphy @abdulgaphy
  • 3. INTRODUCTION Widespread of technology and access to the internet are shaping the way business activity is done today. while these phenomena are known to have brought global business to a whole new level, they have also brought with them, the mixed blessing called “cybercrime.” The term “cybersecurity” is used to refer to the security offered through on-line services to protect your online information in other way cybersecurity refer to a set of techniques used to protect the integrity of networks, programs and data from attack, damage and unauthorized access. @mrgaphy @abdulgaphy
  • 4. @mrgaphy @abdulgaphy In this talk, I will introduce you to the core concepts of chosen python as your programming language as a cybersecurity professional, how it can improve your agility and performance. The core concept of cybersecurity involves protecting information and systems from major cyberthreats, these cyberthreat takes many forms (e.g web application attacks, malware, ransomware, phishing, exploit kits) According to FORBES, the global cybersecurity market is expected to reach 170 billion by 2020. this rapid growth is being fueled by an array of technology trend, including the onslaught of initiatives with ever-evolving security. INTRODUCTION CONT…
  • 5. Learning a programming language is like starting a friction fire……….it takes a bit of work upfront, but once you get the initial ember the fire starts quickly. LEARNING TO CODE
  • 6. DATA TYPES Strings - “Hello” Numbers - 123 Lists – [‘hello’,’2’,’1’] Tuples - (‘1’,’2’,’3’) (immutable) Dictionaries – d = {‘key1’:’dog’,’key2’:’cat’} PYTHON 101 Python is a brilliant language. It is known to be a lazy programming l Used to write small lines of codes that does many tasks. This is a simple print line statement >>> print(“Welcome, Pentesters” @mrgaphy @abdulgaphy
  • 7. L python can be run directly from the cli. L Python code can be written directly into a python interpreter using a python ide. L Python code can be in a file. RUNNING A PYTHON CODE
  • 8. WHY PYTHON? L EASY (install, learn, code) L Tons of libraries L Code is easy to understand L Multiplatform L Good for prototyping
  • 9. WHAT MAKES PYTHON SUCH AN EFFECTIVE LANGUAGE FOR SECURITY PROFESSIONAL @mrgaphy @abdulgaphy L It is a scripting language. L Many tasks can be automated to save time. L Python supports pre-built extensive libraries that are specifically designed for penetration testing and provide some powerful functionalities. L The syntax isn’t too complicated and there are a lot of 3rd party modules that can do heavy lifting for you.
  • 10. Python modules are one of the most powerful features. They extend functionality for your python script. So if you wanted to make a web request, you could just import the module “urllib” instead of having to write all the code from scratch. There are many built-In modules and 3rd party modules developed by the InfoSec community @mrgaphy @abdulgaphy WHAT A PYTHON MODULES DOES
  • 11. You might think “I don’t know how to write code”, and you may tune this talk out because you think you wont understand it. …..BUT I DO NOT WRITE CODE @mrgaphy @abdulgaphy
  • 12. HTTPSERVER It creates and listens at the HTTP server, dispatching the requests to a handler. @mrgaphy @abdulgaphy
  • 13. SOCKET — LOW-LEVEL NETWORKING INTERFACE
  • 14. Cryptography could be viewed as a process of information hiding and verification. This process includes the protocols (standards), algorithms and strategies to securely and consistently prevent or delay unauthorized access to sensitive information and enable the verifiability of every component in a communication. CRYPTOGRAPHIC SERVICES
  • 15. • When performing web application assessments, the ability to craft web requests in Python is essential • Python has many libraries to support interaction with web resources (urllib, urllib2, requests, BeautifulSoup, etc.) We are going to explore several of these in the presentation. MAKING WEB REQUESTS
  • 16. BASIC SYNTAX TO MAKE A WEB REQUEST IN PYTHON USING URLLIB
  • 17. GET Request to fetch all the web page (digest authentication, redirections, cookies and more). REQUESTS: MODULE FOR WEB
  • 18. L Scapy L Optparse L Requests L Urllib L Pycipher L Nmap L SSL L Json L RE L Argparse L Sys L OS L BeautifulSoup SOME PYTHON MODULES
  • 19. WHO IS USING PYTHON? L Immunity Debugger L Peach L Sulley L Paimei L Scapy L Spike Proxy L Core Impact L Canvas L W3AF L Sqlmap L Impacket L Google L Peepdf

Editor's Notes

  1. You can’t rely on automated tools can save loads of time when dealing with manual and repetitive tasks writing a tool for something gives you a deeper understanding on the topic.