SlideShare ist ein Scribd-Unternehmen logo
1 von 38
Downloaden Sie, um offline zu lesen
5. Cloud & API
• Infrastructure as a Service (IaaS): Infrastructure APIs provision raw
computing and storage.
• Software as a Service (SaaS): Software or application APIs provision
connectivity and interaction with a software suite.
• Platform as a Service (PaaS): Platform APIs provide back-end
architecture for building intensive and feature rich applications
Service IaaS SaaS PaaS
Pentesting Yes No Yes
Important tools to pentest
cloud
• SOASTA CloudTest:
• LoadStorm:
• BlazeMeter:
• Nexpose:
• AppThwack:
Check List
https://intrinium.com/pen-testing-checklist-for-the-cloud/
API (Application Programmable
Interface)
https://www.slideshare.net/NutanKumarPanda/pentesting-rest-api
is a set of subroutine definitions, protocols, and tools for building software. In general terms, it is a set of
clearly defined methods of communication between various components.
Tools to Use API Pentesting
https://www.slideshare.net/NutanKumarPanda/pentesting-rest-api
6. Firmware analysis
• Firmware is software of hardware
• Dump from vendor website , sniff the while updating , capture by OTA,
pull from the hardware
• Firmware filesystems are consisting the data of hardcoded and
sensitive
• Commonly we check for
– Architecture
– Filesystem
– Hardcoded information like passwords or token info or certificate info or
remote connect ip address or database addresses
– Reversingand buffer over flow
Firmware Analysis with tools
• Binwalk – extracting and check the information
• Readelf – reading the elf(executable and likable format) file
• Strings – to print readable characters
• Hexdump – hex analysis on firmware
• dd – copy or separating required data from the firmware
• Radare2 – reverse engineering (required ROP knowledge)
• IDA Pro – reverse engineering and fuzzing (required assembly and
em c and c++)
• etc
Content of Firmware security 101
1. what is firmware
2. dig deep into firmware
3. firmware importance
4. how many ways we can obtain the
firmware
5. firmware emulation
6. finding the bugs in embedded application
7. firmware reversing
i. extraction
ii. identifying the architecture
iii. finding the key info
iv. looking into hardcoded data
v. backdooring the file
vi. reverse engineering
What is a firmware..?
Firmware is a software of hardware
(Or)
permanent software programmed into a read-only memory.
• Mainly firmware consists
– Low level languages programmed
– File systems
– Root Directory
– Compression
– Application data files
– Architecture information
– Busybox (important)
– Encrypted data
Filesystems Type..?
Image Source :
https://upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Operating_system_placement.svg/165px-
Operating_system_placement.svg.png
• SquashFS
• JFFS
• JFFS2
• CPIO
• YAFFS
• UBIFS
• XFS
• These are commonly used in
Firmware
Detailed in Filesystem..
SquashFS:
Squashfs is a compressed read-only file system for Linux. Squashfs compresses files, inodes and
directories, and supports block sizes up to 1 MB for greater compression. Several compressionalgorithms
are supported. Squashfs is also the name of free software, licensed under the GPL, for accessing Squashfs
filesystems.
Squashfs is intended for general read-only file-system use and in constrained block-device memory
systems (e.g. embedded systems) where low overhead is needed.
Detailed with flashsystem ..
Root
Directory
Image Source: https://www.gocit.vn/wp-content/uploads/2015/09/linux-file-
Firmware Importance ..
• Firmware working for running the
hardware device to bootup
• Firmware where we can store the
most important data like credentials
and certificates
• When back door is injected for
firmware attacker will take always
reverse connection
Setting UP Lab
• Ubuntu is best for IoT(LTS)
– https://www.ubuntu.com/download/desktop/thank-
you?version=18.04&architecture=amd64
• Use Attify OS
– https://github.com/adi0x90/attifyos
• Kali Linux
– https://www.offensive-security.com/kali-linux-vm-vmware-virtualbox-
hyperv-image-download/
How many ways we can obtain
firmware..
• Downloading from vendor websites
• Capturing the firmware data while updating
• Extracting form the hardware
• Social Engineering
Downloading from the vendor
site..
Demo
• Capturing the firmware data while
updating
Explaining
Topic
Tools to used
1. Wireshark
2. Ettercap
3. Device
4. Internet
5. Host as a Linux OS
6. IP tables
• Extracting from the hardware
• Debuggers – Buspirate, Shikra, Jtag,
• Connectors -- UART, Spi, I2C connectors
• EEPROM Chip Reader - CH341A
• http://iotpentest.com/category/firmware/page/2/
• Social Engineering
• Need a telephone
• Company email id
• Creating a valid reason
Explaining
the Topic
Firmware Emulation…
One of the challenging task now a days , emulating the firmware
1. Download Attify OS
2. Use FAT (Firmware analysis Toolkit)
3. Qemu also one of the best Emulation tools for all
4. After Getting Web Interface start pentesting it
Firmware Reverse Engineering
i. extraction and analyzing
ii. identifying the architecture
iii. finding the key info
iv. looking into hardcoded data
v. backdooring the file
vi. reverse engineering
Requirements
Tools
1. Binwalk
2. Attify OS
3. Kali Linux
4. Qemu
5. dd
6. Angr
7. Hexedit
8. Hexdump
9. IDA pro
10. Radare2
11. Firmwalker
12. etc
Programming Languages
1. ARM
2. MIPS
3. Assembly
4. C, C ++
5. Python
6. ROP
What need to looking for in the
firmware
okay
- Looking for file return data
- Looking for Signatures
- Checking for printable data
- Identify firmware build
- Filesystem
- Hardcoded info
- Authorized key info
- "etc/passwd" and "etc/shadow"
- "etc/ssl"
- grep -rnw '/path/to/somewhere/' -e "pattern" like password, admin,
root, etc.
- find . -name '*.conf' and other file types like *.pem, *.crt, *.cfg, .sh, .bin,
etc.
Extracting && analyzing the
firmware..
https://github.com/ReFirmLabs/binwalk/wiki/Usage
- If file downloaded as Zip Unzip for the binary
- Use binwalk to extract the firmware
- Analyze the binary with the binwalk
Useful commands
-B, --signature
-A, --opcodes
-Y, --disasm
-E, --entropy
-Mre ,
identifying the architecture
Firmware architecture mainly
1. MIPS
2. ARM
Demo
finding the key info
Certification information
Hardcoded url
Api information
IP information
Telnet and SNMP info
Demo
looking into hardcoded data
Passwords and Api information mainly
/etc/passwd
/etc/shadow
/etc/ssl
/ proc/
/sbin/
Demo
Reverse engineering firmware
Objdump
(http://www.tutorialspoint.com/unix_commands/objdump.htm)
Radare2 basics
(https://radare.gitbooks.io/radare2book/content/introduction/basic_usage.html)
ODA
(Online Disassembler(https://onlinedisassembler.com/static/home/index.html))
7. Hardware pentesting 101
• One of my favorite part
• Need to know about basic of electronics like resistor , diode and
chips
• And screw types and PCB design understanding
• Commonly
– Spi , i2c and Uart , JTAG will required communicating
• Dumping and reading the data
• Getting the shell and glitching attacks
• Analyzing the binaries after we got shell or dump the data
• Serial port and USB port attacks
SPI and I2C connection
Jtagulator connection and
shikra
Attify badge and buspirate
Security Practices to remediate the
attacks of IoT
• Close the unnecessary ports which is not required like telnet
and ftp , ssh
• Maintain complex password with authentication Key certificate
• Remove un necessary services like UpNP
Network Level
For web and Mobile application
• Maintain proper OTA updating with secure key
• Follow the OWASP top 10 remediation methods
• Encrypt the source code
• Maintain proper WAF with best configuration rules
IoT Hardware security
practices
• Check The Uncommon Screws types availability
• Anti Tampering
• Side Channel Attacks
• Encrypting Communication data and TPM
Books for embedded languages
Reverse engineering

Weitere ähnliche Inhalte

Was ist angesagt?

Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23
Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23
Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23Chase Schultz
 
IoT security is a nightmare. But what is the real risk?
IoT security is a nightmare. But what is the real risk?IoT security is a nightmare. But what is the real risk?
IoT security is a nightmare. But what is the real risk?Zoltan Balazs
 
Hacktivity 2016: The real risks of the IoT security-nightmare: Hacking IP cam...
Hacktivity 2016: The real risks of the IoT security-nightmare: Hacking IP cam...Hacktivity 2016: The real risks of the IoT security-nightmare: Hacking IP cam...
Hacktivity 2016: The real risks of the IoT security-nightmare: Hacking IP cam...Zoltan Balazs
 
CODE BLUE 2014 : DeviceDisEnabler : A hypervisor which hides devices to prote...
CODE BLUE 2014 : DeviceDisEnabler : A hypervisor which hides devices to prote...CODE BLUE 2014 : DeviceDisEnabler : A hypervisor which hides devices to prote...
CODE BLUE 2014 : DeviceDisEnabler : A hypervisor which hides devices to prote...CODE BLUE
 
Pentesting iPhone applications
Pentesting iPhone applicationsPentesting iPhone applications
Pentesting iPhone applicationsSatish b
 
Privacy and Security in the Internet of Things / Конфиденциальность и безопас...
Privacy and Security in the Internet of Things / Конфиденциальность и безопас...Privacy and Security in the Internet of Things / Конфиденциальность и безопас...
Privacy and Security in the Internet of Things / Конфиденциальность и безопас...Positive Hack Days
 
Hacking and securing ios applications
Hacking and securing ios applicationsHacking and securing ios applications
Hacking and securing ios applicationsSatish b
 
Null mumbai-reversing-IoT-firmware
Null mumbai-reversing-IoT-firmwareNull mumbai-reversing-IoT-firmware
Null mumbai-reversing-IoT-firmwareNitesh Malviya
 
Introduction to iOS Penetration Testing
Introduction to iOS Penetration TestingIntroduction to iOS Penetration Testing
Introduction to iOS Penetration TestingOWASP
 
Android Hacking
Android HackingAndroid Hacking
Android Hackingantitree
 
Securing the Internet of Things
Securing the Internet of ThingsSecuring the Internet of Things
Securing the Internet of ThingsPaul Fremantle
 
iOS and BlackBerry Forensics
iOS and BlackBerry ForensicsiOS and BlackBerry Forensics
iOS and BlackBerry ForensicsAndrey Belenko
 
Chapter 9 system penetration [compatibility mode]
Chapter 9 system penetration [compatibility mode]Chapter 9 system penetration [compatibility mode]
Chapter 9 system penetration [compatibility mode]Setia Juli Irzal Ismail
 
Null mumbai-iot top 10
Null mumbai-iot top 10Null mumbai-iot top 10
Null mumbai-iot top 10Nitesh Malviya
 
wifi-y3dips-stmik_mdp_slides
wifi-y3dips-stmik_mdp_slideswifi-y3dips-stmik_mdp_slides
wifi-y3dips-stmik_mdp_slidesguest1c1a9a
 
How to hide your browser 0-days
How to hide your browser 0-daysHow to hide your browser 0-days
How to hide your browser 0-daysZoltan Balazs
 

Was ist angesagt? (20)

Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23
Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23
Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23
 
IoT security is a nightmare. But what is the real risk?
IoT security is a nightmare. But what is the real risk?IoT security is a nightmare. But what is the real risk?
IoT security is a nightmare. But what is the real risk?
 
Hacktivity 2016: The real risks of the IoT security-nightmare: Hacking IP cam...
Hacktivity 2016: The real risks of the IoT security-nightmare: Hacking IP cam...Hacktivity 2016: The real risks of the IoT security-nightmare: Hacking IP cam...
Hacktivity 2016: The real risks of the IoT security-nightmare: Hacking IP cam...
 
iOS Application Pentesting
iOS Application PentestingiOS Application Pentesting
iOS Application Pentesting
 
CODE BLUE 2014 : DeviceDisEnabler : A hypervisor which hides devices to prote...
CODE BLUE 2014 : DeviceDisEnabler : A hypervisor which hides devices to prote...CODE BLUE 2014 : DeviceDisEnabler : A hypervisor which hides devices to prote...
CODE BLUE 2014 : DeviceDisEnabler : A hypervisor which hides devices to prote...
 
Pentesting iPhone applications
Pentesting iPhone applicationsPentesting iPhone applications
Pentesting iPhone applications
 
Privacy and Security in the Internet of Things / Конфиденциальность и безопас...
Privacy and Security in the Internet of Things / Конфиденциальность и безопас...Privacy and Security in the Internet of Things / Конфиденциальность и безопас...
Privacy and Security in the Internet of Things / Конфиденциальность и безопас...
 
Malware cryptomining uploadv3
Malware cryptomining uploadv3Malware cryptomining uploadv3
Malware cryptomining uploadv3
 
Hacking and securing ios applications
Hacking and securing ios applicationsHacking and securing ios applications
Hacking and securing ios applications
 
Null mumbai-reversing-IoT-firmware
Null mumbai-reversing-IoT-firmwareNull mumbai-reversing-IoT-firmware
Null mumbai-reversing-IoT-firmware
 
Introduction to iOS Penetration Testing
Introduction to iOS Penetration TestingIntroduction to iOS Penetration Testing
Introduction to iOS Penetration Testing
 
Android Hacking
Android HackingAndroid Hacking
Android Hacking
 
Securing the Internet of Things
Securing the Internet of ThingsSecuring the Internet of Things
Securing the Internet of Things
 
iOS Application Penetration Testing
iOS Application Penetration TestingiOS Application Penetration Testing
iOS Application Penetration Testing
 
iOS and BlackBerry Forensics
iOS and BlackBerry ForensicsiOS and BlackBerry Forensics
iOS and BlackBerry Forensics
 
Chapter 9 system penetration [compatibility mode]
Chapter 9 system penetration [compatibility mode]Chapter 9 system penetration [compatibility mode]
Chapter 9 system penetration [compatibility mode]
 
Null mumbai-iot top 10
Null mumbai-iot top 10Null mumbai-iot top 10
Null mumbai-iot top 10
 
wifi-y3dips-stmik_mdp_slides
wifi-y3dips-stmik_mdp_slideswifi-y3dips-stmik_mdp_slides
wifi-y3dips-stmik_mdp_slides
 
Pa or die
Pa or diePa or die
Pa or die
 
How to hide your browser 0-days
How to hide your browser 0-daysHow to hide your browser 0-days
How to hide your browser 0-days
 

Ähnlich wie Beginners guide on how to start exploring IoT 2nd session

Android Penetration testing - Day 2
 Android Penetration testing - Day 2 Android Penetration testing - Day 2
Android Penetration testing - Day 2Mohammed Adam
 
EMBA - Firmware analysis DEFCON30 demolabs USA 2022
EMBA - Firmware analysis DEFCON30 demolabs USA 2022EMBA - Firmware analysis DEFCON30 demolabs USA 2022
EMBA - Firmware analysis DEFCON30 demolabs USA 2022MichaelM85042
 
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4Qualcomm Developer Network
 
Ironic 140622212631-phpapp02
Ironic 140622212631-phpapp02Ironic 140622212631-phpapp02
Ironic 140622212631-phpapp02Narender Kumar
 
Ironic 140622212631-phpapp02
Ironic 140622212631-phpapp02Ironic 140622212631-phpapp02
Ironic 140622212631-phpapp02Narender Kumar
 
Hp fortify source code analyzer(sca)
Hp fortify source code analyzer(sca)Hp fortify source code analyzer(sca)
Hp fortify source code analyzer(sca)Nagaraju Repala
 
EMBA - Firmware analysis - Black Hat Arsenal USA 2022
EMBA - Firmware analysis - Black Hat Arsenal USA 2022EMBA - Firmware analysis - Black Hat Arsenal USA 2022
EMBA - Firmware analysis - Black Hat Arsenal USA 2022MichaelM85042
 
Easily emulating full systems on amazon fpg as
Easily emulating full systems on amazon fpg asEasily emulating full systems on amazon fpg as
Easily emulating full systems on amazon fpg asRISC-V International
 
Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...
Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...
Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...RootedCON
 
Introduction to Malware Analysis
Introduction to Malware AnalysisIntroduction to Malware Analysis
Introduction to Malware AnalysisAndrew McNicol
 
Metasploitation part-1 (murtuja)
Metasploitation part-1 (murtuja)Metasploitation part-1 (murtuja)
Metasploitation part-1 (murtuja)ClubHack
 
U.S. Census presentation at DC API Meetup 12/13/12 by Alec Permison
U.S. Census presentation at DC API Meetup 12/13/12 by Alec PermisonU.S. Census presentation at DC API Meetup 12/13/12 by Alec Permison
U.S. Census presentation at DC API Meetup 12/13/12 by Alec PermisonDC Web API User Group
 
100 Security Operation Center Tools.pdf
100 Security Operation Center Tools.pdf100 Security Operation Center Tools.pdf
100 Security Operation Center Tools.pdfMAHESHUMANATHGOPALAK
 
SOC-BlueTEam.pdf
SOC-BlueTEam.pdfSOC-BlueTEam.pdf
SOC-BlueTEam.pdfBeratAkit
 
100 Security Operation Center Tools EMERSON EDUARDO RODRIGUES
100 Security Operation Center Tools EMERSON EDUARDO RODRIGUES100 Security Operation Center Tools EMERSON EDUARDO RODRIGUES
100 Security Operation Center Tools EMERSON EDUARDO RODRIGUESEMERSON EDUARDO RODRIGUES
 
Hacking and Securing iOS Apps : Part 1
Hacking and Securing iOS Apps : Part 1Hacking and Securing iOS Apps : Part 1
Hacking and Securing iOS Apps : Part 1Subhransu Behera
 
EMBA Firmware analysis - TROOPERS22
EMBA Firmware analysis - TROOPERS22EMBA Firmware analysis - TROOPERS22
EMBA Firmware analysis - TROOPERS22MichaelM85042
 

Ähnlich wie Beginners guide on how to start exploring IoT 2nd session (20)

Android Penetration testing - Day 2
 Android Penetration testing - Day 2 Android Penetration testing - Day 2
Android Penetration testing - Day 2
 
EMBA - Firmware analysis DEFCON30 demolabs USA 2022
EMBA - Firmware analysis DEFCON30 demolabs USA 2022EMBA - Firmware analysis DEFCON30 demolabs USA 2022
EMBA - Firmware analysis DEFCON30 demolabs USA 2022
 
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
 
Ironic 140622212631-phpapp02
Ironic 140622212631-phpapp02Ironic 140622212631-phpapp02
Ironic 140622212631-phpapp02
 
Ironic 140622212631-phpapp02
Ironic 140622212631-phpapp02Ironic 140622212631-phpapp02
Ironic 140622212631-phpapp02
 
Ironic
IronicIronic
Ironic
 
Hp fortify source code analyzer(sca)
Hp fortify source code analyzer(sca)Hp fortify source code analyzer(sca)
Hp fortify source code analyzer(sca)
 
EMBA - Firmware analysis - Black Hat Arsenal USA 2022
EMBA - Firmware analysis - Black Hat Arsenal USA 2022EMBA - Firmware analysis - Black Hat Arsenal USA 2022
EMBA - Firmware analysis - Black Hat Arsenal USA 2022
 
Easily emulating full systems on amazon fpg as
Easily emulating full systems on amazon fpg asEasily emulating full systems on amazon fpg as
Easily emulating full systems on amazon fpg as
 
Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...
Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...
Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...
 
Introduction to Malware Analysis
Introduction to Malware AnalysisIntroduction to Malware Analysis
Introduction to Malware Analysis
 
Metasploitation part-1 (murtuja)
Metasploitation part-1 (murtuja)Metasploitation part-1 (murtuja)
Metasploitation part-1 (murtuja)
 
U.S. Census presentation at DC API Meetup 12/13/12 by Alec Permison
U.S. Census presentation at DC API Meetup 12/13/12 by Alec PermisonU.S. Census presentation at DC API Meetup 12/13/12 by Alec Permison
U.S. Census presentation at DC API Meetup 12/13/12 by Alec Permison
 
4055-841_Project_ShailendraSadh
4055-841_Project_ShailendraSadh4055-841_Project_ShailendraSadh
4055-841_Project_ShailendraSadh
 
100 Security Operation Center Tools.pdf
100 Security Operation Center Tools.pdf100 Security Operation Center Tools.pdf
100 Security Operation Center Tools.pdf
 
SOC-BlueTEam.pdf
SOC-BlueTEam.pdfSOC-BlueTEam.pdf
SOC-BlueTEam.pdf
 
100 Security Operation Center Tools.pdf
100 Security Operation Center Tools.pdf100 Security Operation Center Tools.pdf
100 Security Operation Center Tools.pdf
 
100 Security Operation Center Tools EMERSON EDUARDO RODRIGUES
100 Security Operation Center Tools EMERSON EDUARDO RODRIGUES100 Security Operation Center Tools EMERSON EDUARDO RODRIGUES
100 Security Operation Center Tools EMERSON EDUARDO RODRIGUES
 
Hacking and Securing iOS Apps : Part 1
Hacking and Securing iOS Apps : Part 1Hacking and Securing iOS Apps : Part 1
Hacking and Securing iOS Apps : Part 1
 
EMBA Firmware analysis - TROOPERS22
EMBA Firmware analysis - TROOPERS22EMBA Firmware analysis - TROOPERS22
EMBA Firmware analysis - TROOPERS22
 

Beginners guide on how to start exploring IoT 2nd session

  • 1. 5. Cloud & API • Infrastructure as a Service (IaaS): Infrastructure APIs provision raw computing and storage. • Software as a Service (SaaS): Software or application APIs provision connectivity and interaction with a software suite. • Platform as a Service (PaaS): Platform APIs provide back-end architecture for building intensive and feature rich applications Service IaaS SaaS PaaS Pentesting Yes No Yes
  • 2. Important tools to pentest cloud • SOASTA CloudTest: • LoadStorm: • BlazeMeter: • Nexpose: • AppThwack: Check List https://intrinium.com/pen-testing-checklist-for-the-cloud/
  • 3. API (Application Programmable Interface) https://www.slideshare.net/NutanKumarPanda/pentesting-rest-api is a set of subroutine definitions, protocols, and tools for building software. In general terms, it is a set of clearly defined methods of communication between various components.
  • 4. Tools to Use API Pentesting https://www.slideshare.net/NutanKumarPanda/pentesting-rest-api
  • 5. 6. Firmware analysis • Firmware is software of hardware • Dump from vendor website , sniff the while updating , capture by OTA, pull from the hardware • Firmware filesystems are consisting the data of hardcoded and sensitive • Commonly we check for – Architecture – Filesystem – Hardcoded information like passwords or token info or certificate info or remote connect ip address or database addresses – Reversingand buffer over flow
  • 6. Firmware Analysis with tools • Binwalk – extracting and check the information • Readelf – reading the elf(executable and likable format) file • Strings – to print readable characters • Hexdump – hex analysis on firmware • dd – copy or separating required data from the firmware • Radare2 – reverse engineering (required ROP knowledge) • IDA Pro – reverse engineering and fuzzing (required assembly and em c and c++) • etc
  • 7. Content of Firmware security 101 1. what is firmware 2. dig deep into firmware 3. firmware importance 4. how many ways we can obtain the firmware 5. firmware emulation 6. finding the bugs in embedded application 7. firmware reversing i. extraction ii. identifying the architecture iii. finding the key info iv. looking into hardcoded data v. backdooring the file vi. reverse engineering
  • 8. What is a firmware..? Firmware is a software of hardware (Or) permanent software programmed into a read-only memory. • Mainly firmware consists – Low level languages programmed – File systems – Root Directory – Compression – Application data files – Architecture information – Busybox (important) – Encrypted data
  • 9. Filesystems Type..? Image Source : https://upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Operating_system_placement.svg/165px- Operating_system_placement.svg.png • SquashFS • JFFS • JFFS2 • CPIO • YAFFS • UBIFS • XFS • These are commonly used in Firmware
  • 10. Detailed in Filesystem.. SquashFS: Squashfs is a compressed read-only file system for Linux. Squashfs compresses files, inodes and directories, and supports block sizes up to 1 MB for greater compression. Several compressionalgorithms are supported. Squashfs is also the name of free software, licensed under the GPL, for accessing Squashfs filesystems. Squashfs is intended for general read-only file-system use and in constrained block-device memory systems (e.g. embedded systems) where low overhead is needed.
  • 13.
  • 14. Firmware Importance .. • Firmware working for running the hardware device to bootup • Firmware where we can store the most important data like credentials and certificates • When back door is injected for firmware attacker will take always reverse connection
  • 15. Setting UP Lab • Ubuntu is best for IoT(LTS) – https://www.ubuntu.com/download/desktop/thank- you?version=18.04&architecture=amd64 • Use Attify OS – https://github.com/adi0x90/attifyos • Kali Linux – https://www.offensive-security.com/kali-linux-vm-vmware-virtualbox- hyperv-image-download/
  • 16. How many ways we can obtain firmware.. • Downloading from vendor websites • Capturing the firmware data while updating • Extracting form the hardware • Social Engineering
  • 17. Downloading from the vendor site.. Demo
  • 18. • Capturing the firmware data while updating Explaining Topic Tools to used 1. Wireshark 2. Ettercap 3. Device 4. Internet 5. Host as a Linux OS 6. IP tables
  • 19. • Extracting from the hardware • Debuggers – Buspirate, Shikra, Jtag, • Connectors -- UART, Spi, I2C connectors • EEPROM Chip Reader - CH341A • http://iotpentest.com/category/firmware/page/2/ • Social Engineering • Need a telephone • Company email id • Creating a valid reason Explaining the Topic
  • 20. Firmware Emulation… One of the challenging task now a days , emulating the firmware 1. Download Attify OS 2. Use FAT (Firmware analysis Toolkit) 3. Qemu also one of the best Emulation tools for all 4. After Getting Web Interface start pentesting it
  • 21. Firmware Reverse Engineering i. extraction and analyzing ii. identifying the architecture iii. finding the key info iv. looking into hardcoded data v. backdooring the file vi. reverse engineering
  • 22. Requirements Tools 1. Binwalk 2. Attify OS 3. Kali Linux 4. Qemu 5. dd 6. Angr 7. Hexedit 8. Hexdump 9. IDA pro 10. Radare2 11. Firmwalker 12. etc Programming Languages 1. ARM 2. MIPS 3. Assembly 4. C, C ++ 5. Python 6. ROP
  • 23. What need to looking for in the firmware okay - Looking for file return data - Looking for Signatures - Checking for printable data - Identify firmware build - Filesystem - Hardcoded info - Authorized key info - "etc/passwd" and "etc/shadow" - "etc/ssl" - grep -rnw '/path/to/somewhere/' -e "pattern" like password, admin, root, etc. - find . -name '*.conf' and other file types like *.pem, *.crt, *.cfg, .sh, .bin, etc.
  • 24. Extracting && analyzing the firmware.. https://github.com/ReFirmLabs/binwalk/wiki/Usage - If file downloaded as Zip Unzip for the binary - Use binwalk to extract the firmware - Analyze the binary with the binwalk Useful commands -B, --signature -A, --opcodes -Y, --disasm -E, --entropy -Mre ,
  • 25. identifying the architecture Firmware architecture mainly 1. MIPS 2. ARM Demo
  • 26. finding the key info Certification information Hardcoded url Api information IP information Telnet and SNMP info Demo
  • 27. looking into hardcoded data Passwords and Api information mainly /etc/passwd /etc/shadow /etc/ssl / proc/ /sbin/ Demo
  • 28. Reverse engineering firmware Objdump (http://www.tutorialspoint.com/unix_commands/objdump.htm) Radare2 basics (https://radare.gitbooks.io/radare2book/content/introduction/basic_usage.html) ODA (Online Disassembler(https://onlinedisassembler.com/static/home/index.html))
  • 29.
  • 30. 7. Hardware pentesting 101 • One of my favorite part • Need to know about basic of electronics like resistor , diode and chips • And screw types and PCB design understanding • Commonly – Spi , i2c and Uart , JTAG will required communicating • Dumping and reading the data • Getting the shell and glitching attacks • Analyzing the binaries after we got shell or dump the data • Serial port and USB port attacks
  • 31. SPI and I2C connection
  • 33. Attify badge and buspirate
  • 34. Security Practices to remediate the attacks of IoT • Close the unnecessary ports which is not required like telnet and ftp , ssh • Maintain complex password with authentication Key certificate • Remove un necessary services like UpNP Network Level
  • 35. For web and Mobile application • Maintain proper OTA updating with secure key • Follow the OWASP top 10 remediation methods • Encrypt the source code • Maintain proper WAF with best configuration rules
  • 36. IoT Hardware security practices • Check The Uncommon Screws types availability • Anti Tampering • Side Channel Attacks • Encrypting Communication data and TPM
  • 37. Books for embedded languages