I analyzed Stack Overflow for secrets
matan-h.com
matan-h.com
1. Person reports some vuln in HackerOne itself to HackerOne
2. A HackerOne employee tries to reproduce it, and unknowlingly copies and pastes his/her cookies into the HackerOne report
3. The reporter takes those cookies, and logs in as the HackerOne employee
4. The reporter files a new vuln report "You are disclose for me you session. you are gevi me your session on last report. I am can use your session(sorry)"
5. $20,000 bounty
It's like the Github scanner that reports leaked tokens.
That's karma
(Fun-fact: the next SMS text-message you get from a major chain informing you on an upcoming appointment was likely sent to you via Twilio from a desktop client with a hardcoded AccountSID and AuthSecret strings shared by all 20,000 (multitenant) users; Don’t ask how I know, but it’s depressing; I do report these things (anonymously) to the vendors but then receive a reply from a non-technical manager accusing me of “hacking”. I haven’t yet reported them to e.g. Twilio directly because I don’t want Twilio to revoke their creds and cause potentially hundreds of thousands of people to not-receive essential comms from those tenants. Le sigh…
I haven't had occasion to try this myself, but it sounded like good advice!
(This is my understanding based on conversations with people working on the secret scanning feature at GitHub, I don't have firsthand knowledge.)
> ... I run a simple scan ... against all the 74 real looking GitHub user tokens ... and discovered that 6 of them are actually valid.
> ... only 2 of them actually have bio and email, but one of them (a c/c++ developer) has a repo with 3.4k stars ...
> I obviously couldn’t verify all the secrets. From most of them I’ll probably be banned, so I stooped here.
As an alternative to manually testing the credentials (and risking bans), I wonder if any organisations would agree to test the credentials for you if you sent them a list of suspected leaks. If the organisation doesn't tell you which ones were valid (and takes responsibility for revoking/notifying), I don't see much room for abuse. Might be hard to convince the organisation of that though!
Public patterns for sensitive and highly used credentials have a lot of false positives, because they are overly broad. Internal knowledge about token structure that would reduce this isn’t something companies give out willingly.
I think you mean low effort attacks.
A determined attacker would attempt to gather more information, for example research the author of the post. Many of the authors give enough clues so that you can identify a person, even if comments are written using different handles.
Also some of these secrets go in pairs with something else that is enough to get a successful auth. For example, AWS secret usually goes in pair with everything you need to connect.
That sounds madly illegal?
Edit: We went through the process for everything, including having a provider ship us a back-up solution to pentest. My desk became everyone's favourite place in the building :P
Unless one helps himself to the house contents, or does other Bad Things, walking through unlocked dwellings will get you at most a slap on the wrist.
Much like someone open carrying a gun is seen as potentially a few seconds away from committing a Very Bad Crime, so is someone walking around your house uninvited.
Not exactly legal.
But even stepping back, I suspect walking around and jiggling random peoples’ doorknobs to see if they’re unlocked is probably illegal.
I do some bug bounty hunting for fun, and just yesterday I Googled a weird snippet of frontend code from a major corporation, found the matching backend code in a blog post, and saw a bug in it. Alas, not a bug that could be used for anything interesting this time.
I do not understand how one can write an entire article about a set of data and then not present it in a way that is comprehensible?
Edit: Just discovered that hovering over the segments of the chart will bring up a tooltip with the name of the segment if JS is enabled, but this is not obvious to readers and I still don't think this is a good way to present data.
So, knowing 8490 worked for me is often entirely useless immediately, and if not it'll be useless within say 10 minutes.
You might think if you collect enough of them you'll be able to guess the next one. In principle that's true, but for all real systems you're fighting an actual cryptographic hash in there somewhere, so it's like you decided second pre-image attack on the hash (much harder than collision) wasn't difficult enough, you want hard mode.
I see photos being automatically OCRed by default now ... in Google Photos, in Microsoft SharePoint etc.
I am just imagining that in future a GPT Vision processing of all videos ever captured might become similarly prevalent (and cheap).
Which would open up a very easy attack vector / leakage of secrets ... like phone unlock pins and passwords.
I am in the same boat as the comment I replied to -- concerned about new risks that new tech might bring to the table.
My post was just "extrapolating" the risk to a larger scale -- not just one video clip being manually decoded, but all footage automatically spitting out secrets as simply as a Closed Caption / video transcript of today.
Although I don't think the actual proposed syntax is good.
Then example.com could host a /.well-known/secrets.json which would include information on how to automatically report and/or revoke a leaked secret.
Please let Clippy just die...
When it comes to leaking secrets, don't trust tools. It's hard, it's human, it just happens.
As for what StackOverflow should do — make it easy to fix leaks, which they do a good job at. Ie. users can edit or delete answers, comments after posting them. Even better if there's a means to create confidential back channels with poster or admin if you spot a potential leak.
s1a=: 0j2 %~ ^@j. - ^@-@j.Should be fixed now: https://github.com/gitleaks/gitleaks/pull/1292. Thanks for highlighting this simple change I've been putting off :)
This was a pretty nice thing to do. I see this on SO occasionally and edit the post to remove the secret. While the secret is already out there, it signals to the poster that they should revoke/regen the key and a bit of a reminder to help them avoid doing it again.
Uh, no? For stripe, you just need the key (customer ID is the ID of a resource in the account). For AWS, you need the key id and secret, but these are nearly always colocated if you're actually dealing with keys.
What OS is this person running where this is a possibility? Outside of bad regexps with e.g. large capture groups, a simple grep over a large bunch of data shouldn't cause any issues and should use a steady amount of memory.
Otherwise statements like "taking too much cpu" seem quite strange to me.
If the OP could provide more precise reproduction steps then I'd be happy to look into it.