Jason Haddix Profile picture
Feb 27 29 tweets 4 min read
🐻 Hacking a Search / Cloud Company 🐻

I once took over a MAJOR foreign search/cloud company.

I had full access to every employees email & full source code for all their apps.

Here's how it did it (legally)… ⬇️🧵
⚠️ This one is from the archives and mobile tools change fast (well… not that fast tbh) so I will attempt to give modern analogs for tools, for those following along at home. ⚠️
📳 I started by downloading all their mobile apps.

The bug bounty scope allowed me to analyze any of their assets.

I noticed that they had several mobile apps, each covering a different software product. I downloaded these to my jailbroken iPad.
My jailbroken iPad had many security analysis tools installed.

📜 My abbreviated work-flow for hacking mobile applications usually is:
1⃣ Decrypt the binary (IPA) with frida

github.com/AloneMonkey/fr…

2⃣ Run the decrypted app through strings analysis looking for the lack of security related classes
3⃣ Run the app while instrumentation tools are monitoring these:

🔦 Protocol handlers
🔦 Web traffic
🔦 Logs
🔦 Keychain
🔦 File writes
4⃣ Fuzz protocol handlers

5⃣ Web test on the backend (usually an API)
What I did notice was some naming in files in the app directory.

It looked like the company had 📤 outsourced 📤 the development of the app to 3rd party.
This is good for a security tester as many of these outsourcing agencies do not have any security engineers or staff.

They tend to make more security errors than if the companies teams had build them and worked with internal security teams to review the app.
During the authentication of the app a web path was logged to the system logs. On iOS you an view system logs by tailing:

#⃣ tail -f /var/log/system.log | grep TheApp

You can also use libimobiledevice and Mac's console app.
the path was

#⃣ /authint/

Prob would have never appeared in any content discovery wordlists.
I ended up doing file and directory bruteforce (content discovery) on that path.

I found

#⃣ /authint/auth.js

Opening up this JavaScript file revealed it was some helper for debugging of their Google Drive type product.
In the JavaScript I noticed a username & password in a request url:

😬 sadDev:sadDevPassword

Normal regex search for passwords would not have found this. There was no variable declarations like “user” & “password”. It had to be 👀 with-your-eyes 👀 JavaScript review.
I proceeded to go to their app from the web and used these credentials, just adding their company domain after:

sadDev@sadCloudSearchTarget{.}com
❗️ Pro tip ❗️

For red teamers and bug hunters, always use usernames and passwords in different places.

In bug hunting, many times bug hunters find some sort of creds.

Often the creds don't work on the API, endpoint, or whatever anymore.

Or the the whole backend is down.
❗️ Pro tip ❗️

SAVE THOSE CREDENTIALS.

Use them on OWA/Azure, Google, cloud panel logins, SaaS services, any login form you find. I promise, they will hit somewhere.
So sadDev’s credentials worked on the main file storage app. I had access.

Since it was also a package deal, like Google’s services, I had access to his company email, photos, etc.

After looking him up on LinkedIn he was a lead developer. Very high in the company.
I sifted through his email and found what code repository they used, as he was getting email alerts for things related tot it.

I used the same cred on the website of that SaaS code repository. It worked again.
I also saw that for a portion of their team they used Slack.

His creds worked there too, but with a twist.

His original creds did not satisfy the password requirements for Slack.
I tried the current year at the end and !!! at the end (which are the most common additions to meet password complexity).

!!! worked.

#⃣ sadDev:sadDevPassword!!!
Rummaging through Slack I found several pinned credentials in Slack that gave me direct access to their cloud infrastructure.

This is not uncommon for developer Slacks that I have previously compromised.

⚠️ People pin passwords and API keys all the time.
📰 When preparing the report, I was getting chatted by his dev friends through the cloud chat (not Slack).

So I went back. I happened to notice he had Admin privs to the corporate cloud accounts.
I navigated to the direct link to the management center.

🦸‍♂️ I could create users, deletes users, and take over accounts via password resets. 🦸‍♂️
So… I had:

🧩 Complete control of all emails and drives for the company
🧩 Access to Slack
🧩 Access to infrastructure
🧩 Access to source code

Game over.
📕 Lessons for security testers pt 1:

🧩 Mobile apps are a goldmine. Learn at least the very basics of doing some mobile testing

🧩 Content discovery on everything

🧩 Manual review (noy just tools) for JavaScript is necessary
📕 Lessons for security testers pt 2:

🧩 Re-use credentials on everything you know the target used, especially SaaS

🧩 Create permutations on any discovered creds and use them for password spraying

🧩 Explore your access thoroughly before reporting
📘 Lessons for security defenders pt 1:

🧩 3rd party app app development sometimes misses security standards by a lot (in this case forgetting to remove debug logs)

🧩 Don’t leave integration scripts up on the internet

🧩 Don’t hardcode credentials in JavaScript (or anywhere)
📘 Lessons for security defenders pt 2:

🧩 2FA everywhere, especially on all SaaS

🧩 Impossible travel alert might have caught me but tbh I wasn't attempting to be stealthy

🧩 Don’t share passwords on Slack
That’s it, hope you enjoyed!

Follow, retweet, and like if you want to hear more hacking stories in the future!

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Jason Haddix

Jason Haddix Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Jhaddix

Jan 30
🥽 The Anti-Recon Recon Thread 🥽

Recon is important, but some people hate it. I get it.

When you're in the zone & ready to pounce on a target, you just want to start hacking.

Want the best of both worlds? Quick/complete recon, WITH great coverage?

(a long thread)

🧵⬇️
As an offensive security and testing connoisseur, I love recon. But after talking with many other hackers about their flow, It’s always divided.

Others absolutely do not enjoy it at all and are way more comfortable getting on a target as ⚡️fast⚡️ as possible.
So, for those of you in the second camp, what do I recommend for you to get the benefit of great recon without all the headaches? What is considered *great* coverage?
Read 23 tweets
Jan 28
👮 Hacking into several Prisons 👮

Here's how I did it (legally), and what I learned along the way!

A thread for security testers and cyber security pros

🧵👇
This security testing was part of a 🪲bug bounty🪲 program.

The target was shared software that many prisons across the US use.

I started on one of the main domains:

login.hackertarget. site/
The page was a simple login page to administer the prison software from the internet. No real vulnerabilities.

I wasn't provided credentials for the site either.

What it ⚡️DID ⚡️have was a chatbot for "help" in the bottom right corner of the page.
Read 25 tweets
Jan 25
🔍 My ultimate workflow for simple and easy JavaScript Analysis

⚡️ Comprehensive JavaScript analysis in offensive security, appsec testing, and red teaming wins.

Often you can find juicy hidden endpoints, parameters, & domains buried JS!

A thread 🧵 1/x
👇
Often, dynamic tools fail to parse, visit, and understand complex JS. This is because referencing URLs in JS can take many forms (see image):

2/x Image
On the command-line, many top-tier bug hunters used LinkFinder by @gerben_javado to find these hidden endpoints:

github.com/GerbenJavado/L…

Some even extended it to a chrome extension!

github.com/GerbenJavado/L…

BUT there is an easier way...

3/x
Read 12 tweets
Jan 17
🧠A little mental health and #hacking crossover on the topics of cultivating desire and progress.

👠 Cultivating Desire

It can be easy to deviate from your goals.

There's always a new game, show, family situation, etc, that can keep you from moving forward.

Thread🧵👇
🎯So how do you re/focus?

You have to learn to capture desire.

We all get the urge to do cool things, spontaneously, during the day. You have to learn to grab hold of that lighting strike of desire & turn it into a plan.

📝Note it, outline it, & calendar it.

🧵2/x 👇
Personally, I use @trello, pen and paper notes, and Notes on Apple.

@DanielMiessler is famous for ALWAYS carrying a mini pen and notebook on him.

🧵3/x 👇 Image
Read 8 tweets
Jan 9
A thread 🧵

The quoted tweet is a long thread of high profile breaches of 2022.

What can we learn to guide our security programs in 2023?

🔟 Observations and recommendations from the writeups and my conversations with other CISOs about their experiences in 2022.

1/x
1️⃣ Two-factor auth, but better yet, FIDO must be cornerstone for your security program.

If you are fortunate enough to have great IAM, the minimum here should be deployed to tech staff, devs, and admins.

2/x
2️⃣ Repo and cloud security, especially tied to IAM and off-boarding of accounts is really important. Don’t skimp on logging in cloud, you’ll pay for it later.

3/x
Read 12 tweets
Aug 8, 2022
So… I just finished my 1st @Hacker0x01 Live Hacking event & I’m heading into another with @Bugcrowd

As a program owner, hacker, & security leader… I have thoughts!

Read along for some spicy bounty takes.

🚨 Like, follow, & retweet for more security content 🚨

a 🧵

1/x Image
If you’ve never heard of a Live Hacking event before then you’re not alone.

Less than 50 companies worldwide (I’m guessing) have done such an event with a Bug Bounty platform.

2/x
The idea is really simple:

You fly 30-100 of the world’s best bug bounty hunters to a location to hack you.

You put them up at a hotel & cater their meals.

You fund entertainment.

You increase your bug bounty program rewards for them.

They do what they do best. Hack.

3/x
Read 21 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(