SlideShare a Scribd company logo
1 of 38
Download to read offline
PENTESTING REACT NATIVE APPLICATION
For Fun and Profit
$$$
@xmrdoel
Abdullah
ABOUT ME
• Bug Hunter
• Web Developer
• Author “Web Hacking For Beginner” Cyber Academy
• Penulis Buku Panduan Hacking Website Dengan Kali Linux
• Penulis Buku Kung-Fu Hacking dengan NMAP
• Contact me on Twitter & Instagram >> @xmrdoel
• Youtube : “MrDoel Hacking Tutorial”
AGENDA
1 2
4
3
React Native Setup
Attack Surface Wrap Up
REACT NATIVE
Sebuah framework yang digunakan untuk membuat
native apps menggunakan Javascript
Dirilis oleh Facebook pada tahun 2015 dan sampai
saat ini masih terus dikembangkan
HOW IT WORKS
REACT NATIVE >>
Please Run JS App
On This Phone!
HOW IT WORKS
REACT NATIVE >>
JS Bundle
JavascriptCore
BUNDLING
REACT NATIVE >>
App.js
Edit.js
Add.js
Delete.js
BUNDLER App.bundle
MyApp.apk
assets
app.bundle
AndroidManifest.xml
…………
…………
……….
………
index.android.bundle
index.ios.bundle
Bundle Source
REACT NATIVE >> App.bundle
>>
SETUP
TOOLS
SETUP >>
• Emulator / Android Phone
• APKTOOL
• APK Signer, (e.g : Uber Signer)
• Text Editor } myApp.apk
Prerequisite
Memiliki pengetahuan dasar tentang JavaScript
METHODOLOGY
APK File Decompile Search .bundle file Modify Source Compile & Sign
Install to phone
“Kita juga bisa menggunakan Proxy Intercept
Untuk melihat Endpoint, namun bagaimana jika
Aplikasi menggunakan Firebase?
ATTACK VECTOR
Vulnerable API Endpoint
App.bundle
Proxy Intercept
Vulnerable API Endpoint
Modified
Original Code
PRICE MANIPULATION
>> Keyword: fetch
Vulnerable API Endpoint HIDDEN ENDPOINT
>>
API Khusus untuk Administrator
Exploiting Firebase
Exploiting Firebase
Firestore
Reference : https://firebase.google.com/docs/firestore/data-model
Exploiting Firebase
Modified
Original Code
Callable Google Cloud Function
Pengaturan logic pada Firebase masih terbatas
Google Cloud Function memiliki fitur dimana developer bisa membuat custom logic
Callable Google Cloud Function Example
>>
Server
Client
Callable Google Cloud Function
Modified
Original Code
Keyword: httpsCallable
Finding Secrets
Payment API Auth
Chat API
Finding Secrets Firebase Credentials
>>
Terdapat beberapa cara untuk melakukan autentikasi ke Firebase, diantaranya…
• Email Link Authentication
• Password Authentication
• Google Sign
• Facebook Login
• Github
• dan lain-lain
https://firebase.google.com/docs/auth
Finding Secrets Firebase Credentials
>> Study Case
>>
Email dan password firebase pada file app.bundle
Email & password
How To Takeover Firebase??
Firebase API Key
Exploit To CRUD
Finding Secrets
Download Exploit
https://gist.github.com/MrDoel/f25b532c1f041119941ccdd0fb8bc074
Firebase Credentials
>> Study Case
>>
Firebase API Key
/res/value/strings.xml
Finding Secrets Firebase Credentials
>> Study Case
>>
Hasil Exploit
Insecure Data Storage
“Insecure Data Storage adalah celah keamanan dimana
aplikasi menyimpan data sensitif pada file system
*biasanya hanya bisa diakses dengan hak akses root
Hal yang berbahaya adalah jika data disimpan pada SDCARD atau data filesystem (root) berisi data sensitif
seperti password, PIN dll
Study Case : Uncrypted HTTP Cache
Insecure Data Storage
Encrypted HTTPS Decypted HTTP Cache
BYPASSING THE RULES
*based on my experience
Bypass Root Detection
>>
https://github.com/GantMan/jail-monkey
Bypass Root Detection
>>
Bypass Reset OTP Time
>>
Masukkan Kode OTP Anda
Pakai library apa?
5 Menit
Bypass Reset OTP Time
>>
300 Detik = 5 Menit
84600 Detik = 24 Jam
Attacker bisa brute-force kode OTP tanpa
Batas waktu
Chained with
No Rate Limit
OTP Time Not Checked on server
Bypass Boolean Logic
>>
Not OP
!0 = true
!1 = false
Comparison & Conditions
==
>
<
Boolean Function
Boolean (8 > 9)
Bypass Boolean Logic
>> Study Case
>>
BUY
Ibuku bukan ibumu
LIVE STREAMING
BUY
Azab pencuri korek
BUY
Aku Siapa?
Azab Pinjol Ilegal
Cek Pembelian Film
API Server
Terdapat
2 Movie
Verifikasi data
Tidak
Ditemukan
PLAY
Bypass Boolean Logic
>> Study Case
>>
How To Bypass??
PLAY
Ibuku bukan ibumu
LIVE STREAMING
Azab pencuri korek
Aku Siapa?
Azab Pinjol Ilegal
PLAY
PLAY
PLAY
Wrap Up
WRAP UP
For Pentester
• File app.bundle berisi hampir semua logic dari aplikasi
• Keyword fetch biasanya sering digunakan dalam pemanggilan API
• Jika menggunakan firebase, cek metode autentikasi
• Catat library yang digunakan pada aplikasi (for bypass something)
For Developer :
• Lakukan proses deteksi keamanan secara berkala baik via Client-side dan Server Side
• Simpan API Key di lokasi yang aman, misalnya pada sisi server
• Pada saat menggunakan firebase, tidak direkomendasikan menggunakan metode Password Based Authentication
Attack vector pada materi ini masih terbatas

More Related Content

What's hot

OWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application VulnerabilitiesOWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application Vulnerabilities
Software Guru
 
Fantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find ThemFantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find Them
Ross Wolf
 

What's hot (20)

Windows Threat Hunting
Windows Threat HuntingWindows Threat Hunting
Windows Threat Hunting
 
Waf bypassing Techniques
Waf bypassing TechniquesWaf bypassing Techniques
Waf bypassing Techniques
 
Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)
 
PHDays 2018 Threat Hunting Hands-On Lab
PHDays 2018 Threat Hunting Hands-On LabPHDays 2018 Threat Hunting Hands-On Lab
PHDays 2018 Threat Hunting Hands-On Lab
 
OWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application VulnerabilitiesOWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application Vulnerabilities
 
SSRF For Bug Bounties
SSRF For Bug BountiesSSRF For Bug Bounties
SSRF For Bug Bounties
 
Hunting for Privilege Escalation in Windows Environment
Hunting for Privilege Escalation in Windows EnvironmentHunting for Privilege Escalation in Windows Environment
Hunting for Privilege Escalation in Windows Environment
 
OWASP Top 10 for Mobile
OWASP Top 10 for MobileOWASP Top 10 for Mobile
OWASP Top 10 for Mobile
 
REST API Pentester's perspective
REST API Pentester's perspectiveREST API Pentester's perspective
REST API Pentester's perspective
 
ECMAScript 6 from an Attacker's Perspective - Breaking Frameworks, Sandboxes,...
ECMAScript 6 from an Attacker's Perspective - Breaking Frameworks, Sandboxes,...ECMAScript 6 from an Attacker's Perspective - Breaking Frameworks, Sandboxes,...
ECMAScript 6 from an Attacker's Perspective - Breaking Frameworks, Sandboxes,...
 
Penetration testing web application web application (in) security
Penetration testing web application web application (in) securityPenetration testing web application web application (in) security
Penetration testing web application web application (in) security
 
Threat Modeling for Dummies - Cascadia PHP 2018
Threat Modeling for Dummies - Cascadia PHP 2018Threat Modeling for Dummies - Cascadia PHP 2018
Threat Modeling for Dummies - Cascadia PHP 2018
 
Android Application Penetration Testing - Mohammed Adam
Android Application Penetration Testing - Mohammed AdamAndroid Application Penetration Testing - Mohammed Adam
Android Application Penetration Testing - Mohammed Adam
 
Garage4Hackers Ranchoddas Webcast Series - Bypassing Modern WAF's Exemplified...
Garage4Hackers Ranchoddas Webcast Series - Bypassing Modern WAF's Exemplified...Garage4Hackers Ranchoddas Webcast Series - Bypassing Modern WAF's Exemplified...
Garage4Hackers Ranchoddas Webcast Series - Bypassing Modern WAF's Exemplified...
 
Measure What Matters: How to Use MITRE ATTACK to do the Right Things in the R...
Measure What Matters: How to Use MITRE ATTACK to do the Right Things in the R...Measure What Matters: How to Use MITRE ATTACK to do the Right Things in the R...
Measure What Matters: How to Use MITRE ATTACK to do the Right Things in the R...
 
Threat Hunting with Cyber Kill Chain
Threat Hunting with Cyber Kill ChainThreat Hunting with Cyber Kill Chain
Threat Hunting with Cyber Kill Chain
 
Fantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find ThemFantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find Them
 
HTTP Request Smuggling via higher HTTP versions
HTTP Request Smuggling via higher HTTP versionsHTTP Request Smuggling via higher HTTP versions
HTTP Request Smuggling via higher HTTP versions
 
Pentesting iOS Applications
Pentesting iOS ApplicationsPentesting iOS Applications
Pentesting iOS Applications
 
OWASP AppSecEU 2018 – Attacking "Modern" Web Technologies
OWASP AppSecEU 2018 – Attacking "Modern" Web TechnologiesOWASP AppSecEU 2018 – Attacking "Modern" Web Technologies
OWASP AppSecEU 2018 – Attacking "Modern" Web Technologies
 

Similar to Pentesting react native application for fun and profit - Abdullah

Belajar hacking-website-d
Belajar hacking-website-dBelajar hacking-website-d
Belajar hacking-website-d
Ade Tamin
 
Pengujian keamanan aplikasi mobile - Zaki Akhmad
Pengujian keamanan aplikasi mobile - Zaki AkhmadPengujian keamanan aplikasi mobile - Zaki Akhmad
Pengujian keamanan aplikasi mobile - Zaki Akhmad
idsecconf
 

Similar to Pentesting react native application for fun and profit - Abdullah (20)

Kenalan Dengan Firebase Android
Kenalan Dengan Firebase AndroidKenalan Dengan Firebase Android
Kenalan Dengan Firebase Android
 
Ragam hacking menggunakan google
Ragam hacking menggunakan googleRagam hacking menggunakan google
Ragam hacking menggunakan google
 
Indonesia OneSearch
Indonesia OneSearchIndonesia OneSearch
Indonesia OneSearch
 
Belajar hacking-website-d
Belajar hacking-website-dBelajar hacking-website-d
Belajar hacking-website-d
 
Belajar hacking website
Belajar hacking websiteBelajar hacking website
Belajar hacking website
 
slide-share.pdf
slide-share.pdfslide-share.pdf
slide-share.pdf
 
Apa Itu Framework CodeIgniter?
Apa Itu Framework CodeIgniter?Apa Itu Framework CodeIgniter?
Apa Itu Framework CodeIgniter?
 
Pengenalan Codeigniter
Pengenalan Codeigniter Pengenalan Codeigniter
Pengenalan Codeigniter
 
Silabus android
Silabus androidSilabus android
Silabus android
 
Dicoding Developer Coaching #23: Android | Membangun Modern App dengan Jetpac...
Dicoding Developer Coaching #23: Android | Membangun Modern App dengan Jetpac...Dicoding Developer Coaching #23: Android | Membangun Modern App dengan Jetpac...
Dicoding Developer Coaching #23: Android | Membangun Modern App dengan Jetpac...
 
SESI 3 FE.pptx
SESI 3 FE.pptxSESI 3 FE.pptx
SESI 3 FE.pptx
 
Tugas 4 - MPPL - Proposal Penawaran
Tugas 4 - MPPL - Proposal PenawaranTugas 4 - MPPL - Proposal Penawaran
Tugas 4 - MPPL - Proposal Penawaran
 
Materi Pelatihan analisa malware
Materi Pelatihan analisa malwareMateri Pelatihan analisa malware
Materi Pelatihan analisa malware
 
Tutorial ci
Tutorial ciTutorial ci
Tutorial ci
 
Membuat aplikasi chat menggunakan java
Membuat aplikasi chat menggunakan javaMembuat aplikasi chat menggunakan java
Membuat aplikasi chat menggunakan java
 
Pengujian keamanan aplikasi mobile - Zaki Akhmad
Pengujian keamanan aplikasi mobile - Zaki AkhmadPengujian keamanan aplikasi mobile - Zaki Akhmad
Pengujian keamanan aplikasi mobile - Zaki Akhmad
 
Nutch dan Solr
Nutch dan SolrNutch dan Solr
Nutch dan Solr
 
PENYELESAIAN UKK FIX TKJ SMK NEGERI 4 GORONTALO (2019)
PENYELESAIAN UKK FIX TKJ SMK NEGERI 4 GORONTALO (2019)PENYELESAIAN UKK FIX TKJ SMK NEGERI 4 GORONTALO (2019)
PENYELESAIAN UKK FIX TKJ SMK NEGERI 4 GORONTALO (2019)
 
Cara Mengamankan Server OJS
Cara Mengamankan Server OJSCara Mengamankan Server OJS
Cara Mengamankan Server OJS
 
Fundamental android application development
Fundamental android application developmentFundamental android application development
Fundamental android application development
 

More from idsecconf

More from idsecconf (20)

idsecconf2023 - Mochammad Riyan Firmansyah - Takeover Cloud Managed Router vi...
idsecconf2023 - Mochammad Riyan Firmansyah - Takeover Cloud Managed Router vi...idsecconf2023 - Mochammad Riyan Firmansyah - Takeover Cloud Managed Router vi...
idsecconf2023 - Mochammad Riyan Firmansyah - Takeover Cloud Managed Router vi...
 
idsecconf2023 - Neil Armstrong - Leveraging IaC for Stealthy Infrastructure A...
idsecconf2023 - Neil Armstrong - Leveraging IaC for Stealthy Infrastructure A...idsecconf2023 - Neil Armstrong - Leveraging IaC for Stealthy Infrastructure A...
idsecconf2023 - Neil Armstrong - Leveraging IaC for Stealthy Infrastructure A...
 
idsecconf2023 - Mangatas Tondang, Wahyu Nuryanto - Penerapan Model Detection ...
idsecconf2023 - Mangatas Tondang, Wahyu Nuryanto - Penerapan Model Detection ...idsecconf2023 - Mangatas Tondang, Wahyu Nuryanto - Penerapan Model Detection ...
idsecconf2023 - Mangatas Tondang, Wahyu Nuryanto - Penerapan Model Detection ...
 
idsecconf2023 - Rama Tri Nanda - Hacking Smart Doorbell.pdf
idsecconf2023 - Rama Tri Nanda - Hacking Smart Doorbell.pdfidsecconf2023 - Rama Tri Nanda - Hacking Smart Doorbell.pdf
idsecconf2023 - Rama Tri Nanda - Hacking Smart Doorbell.pdf
 
idsecconf2023 - Akshantula Neha, Mohammad Febri Ramadlan - Cyber Harmony Auto...
idsecconf2023 - Akshantula Neha, Mohammad Febri Ramadlan - Cyber Harmony Auto...idsecconf2023 - Akshantula Neha, Mohammad Febri Ramadlan - Cyber Harmony Auto...
idsecconf2023 - Akshantula Neha, Mohammad Febri Ramadlan - Cyber Harmony Auto...
 
idsecconf2023 - Aan Wahyu - Hide n seek with android app protections and beat...
idsecconf2023 - Aan Wahyu - Hide n seek with android app protections and beat...idsecconf2023 - Aan Wahyu - Hide n seek with android app protections and beat...
idsecconf2023 - Aan Wahyu - Hide n seek with android app protections and beat...
 
idsecconf2023 - Satria Ady Pradana - Launch into the Stratus-phere Adversary ...
idsecconf2023 - Satria Ady Pradana - Launch into the Stratus-phere Adversary ...idsecconf2023 - Satria Ady Pradana - Launch into the Stratus-phere Adversary ...
idsecconf2023 - Satria Ady Pradana - Launch into the Stratus-phere Adversary ...
 
Muh. Fani Akbar - Infiltrate Into Your AWS Cloud Environment Through Public E...
Muh. Fani Akbar - Infiltrate Into Your AWS Cloud Environment Through Public E...Muh. Fani Akbar - Infiltrate Into Your AWS Cloud Environment Through Public E...
Muh. Fani Akbar - Infiltrate Into Your AWS Cloud Environment Through Public E...
 
Rama Tri Nanda - NFC Hacking Hacking NFC Reverse Power Supply Padlock.pdf
Rama Tri Nanda - NFC Hacking Hacking NFC Reverse Power Supply Padlock.pdfRama Tri Nanda - NFC Hacking Hacking NFC Reverse Power Supply Padlock.pdf
Rama Tri Nanda - NFC Hacking Hacking NFC Reverse Power Supply Padlock.pdf
 
Arief Karfianto - Proposed Security Model for Protecting Patients Data in Ele...
Arief Karfianto - Proposed Security Model for Protecting Patients Data in Ele...Arief Karfianto - Proposed Security Model for Protecting Patients Data in Ele...
Arief Karfianto - Proposed Security Model for Protecting Patients Data in Ele...
 
Nosa Shandy - Clickjacking That Worthy-Google Bug Hunting Story.pdf
Nosa Shandy - Clickjacking That Worthy-Google Bug Hunting Story.pdfNosa Shandy - Clickjacking That Worthy-Google Bug Hunting Story.pdf
Nosa Shandy - Clickjacking That Worthy-Google Bug Hunting Story.pdf
 
Baskoro Adi Pratomo - Evaluasi Perlindungan Privasi Pengguna pada Aplikasi-Ap...
Baskoro Adi Pratomo - Evaluasi Perlindungan Privasi Pengguna pada Aplikasi-Ap...Baskoro Adi Pratomo - Evaluasi Perlindungan Privasi Pengguna pada Aplikasi-Ap...
Baskoro Adi Pratomo - Evaluasi Perlindungan Privasi Pengguna pada Aplikasi-Ap...
 
Utian Ayuba - Profiling The Cloud Crime.pdf
Utian Ayuba - Profiling The Cloud Crime.pdfUtian Ayuba - Profiling The Cloud Crime.pdf
Utian Ayuba - Profiling The Cloud Crime.pdf
 
Proactive cyber defence through adversary emulation for improving your securi...
Proactive cyber defence through adversary emulation for improving your securi...Proactive cyber defence through adversary emulation for improving your securi...
Proactive cyber defence through adversary emulation for improving your securi...
 
Perkembangan infrastruktur kunci publik di indonesia - Andika Triwidada
Perkembangan infrastruktur kunci publik di indonesia - Andika TriwidadaPerkembangan infrastruktur kunci publik di indonesia - Andika Triwidada
Perkembangan infrastruktur kunci publik di indonesia - Andika Triwidada
 
Hacking oximeter untuk membantu pasien covid19 di indonesia - Ryan fabella
Hacking oximeter untuk membantu pasien covid19 di indonesia - Ryan fabellaHacking oximeter untuk membantu pasien covid19 di indonesia - Ryan fabella
Hacking oximeter untuk membantu pasien covid19 di indonesia - Ryan fabella
 
Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...
Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...
Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...
 
Devsecops: membangun kemampuan soc di dalam devsecops pipeline - Dedi Dwianto
Devsecops: membangun kemampuan soc di dalam devsecops pipeline - Dedi DwiantoDevsecops: membangun kemampuan soc di dalam devsecops pipeline - Dedi Dwianto
Devsecops: membangun kemampuan soc di dalam devsecops pipeline - Dedi Dwianto
 
Stream crime
Stream crime Stream crime
Stream crime
 
(Paper) Mips botnet worm with open wrt sdk toolchains
(Paper) Mips botnet worm with open wrt sdk toolchains(Paper) Mips botnet worm with open wrt sdk toolchains
(Paper) Mips botnet worm with open wrt sdk toolchains
 

Pentesting react native application for fun and profit - Abdullah