Bug Hunters Methodology Live Day Two App Analysis Master
Bug Hunters Methodology Live Day Two App Analysis Master
';alert('xss');//
Less people teach where to look for web bugs.
This course is a collection of my favorite tips, tools, and tricks.
We will use several different word lists for content discovery. The
next slide outlines the lists I use based on technologies.
You can also use another workflow that feeds GAU into a
tool called wordlistgen.
echo bugcrowd.com | gau | wordlistgen | sort -u
CONTENT DISCOVERY (HISTORICAL)
Another method for content discovery is to try and search sources that archive URL data.
There exist several of these sources such as the wayback machine, alien vault, common crawl, and URL scan.
In the previous slide we used gau to do this. Last year one of our esteemed class members wrote a tool that utilize
this technique but goes much deeper.
Grabbing these URL's from these sources is where many of the tools stop. WayMore by Xnl-h4ck3r will also
download the archived responses and search through them for more links and extra information.
CONTENT DISCOVERY (TIP – RECURSION)
CONTENT DISCOVERY (TIP – MOBILE)
Often mobile application
binaries can contain
pathing for the same
website we might be
testing!
Usually this is an API
hanging off our main
domain.
You can use APKleaks to
parse out paths from an
APK file to get additional
routes and API endpoints
and parameters.
JAVASCRIPT
ANALYSIS
Wide ARE
WHAT vs. Narrow Recon
WE AFTER?
http://deobfuscate.io:
🧩 Unpacks arrays
🧩 Simplifies expressions
🧩 Beatifies the code
🧩 and more
JAVASCRIPT ANALYSIS (MINING)
You should be looking for verbatim, hard-coded secrets in JS files.
https://portswigger.net/bappstore/0ab7a94d8e11449daaf0fb387431225
b
🔥 Not just regex either, it uses a (Shannon) entropy function for things
that might be interesting.
JAVASCRIPT
ANALYSIS
(MINING)
JAVASCRIPT ANALYSIS (SCANNING)
@LewisArdern made
Metasec.js a while back
which can be used on a
downloaded JS file.
🔍 npm-audit
🔍 yarn-audit
🔍 semgrep for secrets
and JS sec issues
JAVASCRIPT ANALYSIS (WEBPACKED)
Another resource for unpacking Webpacked JS files is
Webpack Exploder by @spaceraccoonsec
https://blog.assetnote.io/bug-bounty/2020/02/02/expanding-attack-surface-react-native/
THE BIG
QUESTIONS
BIG QUESTIONS (PASSING DATA)
The first question I asked myself when looking at an application is how does this app
pass data?
https://app.com/resource?parameter=value¶m2=value
Or does it use a RESTful format?
https://app.com/route/resource/sub-resource/...
Understanding this will be the cornerstone of how you test for vast categories of bugs.
The bugs will be there, but if you’re not familiar with where to inject your payloads, you
will fail.
BIG QUESTIONS (USERS)
Next, I ask myself how/where does
the app talk about users?
Many of you will already know these things from your time in
bounty or offsec testing but newer testers gain value from this
context.
HEAT MAPPING (UPLOADS)
One of the more common places you
can see vulnerability is in on an
enterprise level site is wherever
they allow you to upload files. This
includes uploading any format such
as images or documents.
One important note is to remember
that if a document upload exists
that data when it comes down to it
it's just XML data. So it can be
subject to XML based vulnerabilities
like XXE.
HEAT MAPPING (CONTENT TYPES)
While this is not explicitly a “place
to look” in it is an alert to be aware
of when you're looking at your
proxy data.
LAB
WEB FUZZING (BACKSLASH POWERED)
Even after making the separation of looking for
CVEs and doing dynamic scanning there is also a
further split of the types of fuzzing you can do in
dynamic scanning.
Burp attempts to inject many payloads into
parameter values and routes.
Even more in-depth dynamic scanning can be
done by just trying to elicit errors from the
application.
You can use James kettle’s tool backslash
powered scanner to fuzz routes and parameters
and elicit these errors.
If you do indeed elicit an error then you must
spend the time to understand what you can do by
causing that error with that injection character.
WEB FUZZING (DEFINED INSERTIONS POINTS)
One small tip for burp
users is when you feel
like a parameter
might be subject to a
vulnerability and you
want to specifically
sacn it you can send
the request to
intruder, mark the
place with payload
markers, and then
right click and choose
scan defined
insertion points.
WEB FUZZING (SSWLR – INTERPRETING RESULTS)
IDORs. key
email
group
profile
edit
REST numeric paths
SSRF
SSRF (SPRAY AND PRAY)
Sometimes SSRF can be as simple as embedding an image tag with your Burb collaborator
URL as the source <img src="https://yourburpcollaborator"/> but other times you
just want to shove that EVERYWERE (similar to bxss).
You can grab all URLs from your target, from GAU or Waymore, pass them to qsreplace adding
your collaborator URL:
https://iamaakashrathee.medium.com/ssrf-methodology-by-aakash-rathee-f175665e2ea
SSRF
(METADATA
URLS)
While some of these are
imminently changing,
there still exists some
time to use a SSRF to
grab API keys from cloud
metadata internal sites.
More and more of these
services have
implemented additional
header requirements to
access these keys but
not all of them (I think as
of this moment)
https://gist.github.com/j
haddix/78cece26c91c626
3653f31ba453e273b
SSRF
(ENCODINGS)
The best resource in SSRF for
alternate encodings of IP
addresses once you FIND
SSRF remains the payload all
the things repository…
SSRF (PARAMS) dest
redirect
uri
path
continue
url
From the HUNT data project I did window
next
years ago, these parameters or data
reference
SSRF. callback
return
page
feed
host
In addition: webhooks, XML and port
to
Until ghauri