164 points · by tuxloper · 7y ago · 39 comments
<rant> I wish infosec tutorials/articles pushed writing custom tools. I've always considered password spraying to really be just taking super common passwords and flipping them around a bit. <season><year><special char> or <month><year><special char>. Instead of pushing some existing tools, I wish this article encouraged writing custom wordlist generators using common knowledge/sense. </rant>
If there is a tool/script/exploit/etc out there doing most of what I want, you can be sure that I'm going to use it and modify it to my needs instead of writing my own.
I'd say that's usually the case in 80% of the cases when doing pentests. Besides, time is money.
You could easily make such with a few UNIX tools such as date and seq plus a few variables in your favorite language. So that is covered in Linux, Bash, and Python courses.
Burp also has support to prepend or append characters. They could've covered that as it is rather powerful. They could've also covered grabbing pastes from dark web to use as input.
This does of course fail when an attacker starts using multiple sources for attack traffic. That seems to be the next step in the cat and mouse game though.
- 2FA
- Password blacklists
- Application Firewall that detects this hijinx (haven't explored this yet - anyone know of a good one?)
There are other good reasons to do this, too.
At Black Hat last year, I cornered a bunch of CSO-types at big startups and asked for what their first 3 initiatives would be, and this was something I heard a bunch.
You should have some kind of SSO set up, early.
That is are you talking about integrating your product with SSO or integrating your IT systems?
But in general, the idea is that you want an SSO early so all the random SAAS applications you subscribe to can have a coherent security policy.
Happy Okta client here.
As far as I heard it is a ton of work and very complicated. (they can't use saml, they use oauth)
Okta client here btw, and we use SAML (2.0) for many of our SSO integrations. Okta has pretty clear support for SAML 2.0. Maybe your colleague's app is a special case?
1. Make sure your app requests are logged with the source IP and configure fail2ban to block the really bad offenders.
2. Set up `actionban` and `actionunban` commands in a custom fail2ban banaction.conf file.
3. Use ipset (an iptables extension) for O(log n) lookup against banned IPs in iptables (which affects all input/forward/output network requests).
4. Tadaa!
Assuming the external app is using AD auth. What product do you use to blacklist? Currently I just audit the passwords by dumping the hashes from the DC and running them against HIBP NTLM database.
@nextgens: are you affiliated with them, or did you just have a good experience with their product and wanted to share it?
We are open to hiring somebody for firewall management (specifically Fortinet firewalls) as part of our Sentry offering.
https://www.microsoft.com/en-us/microsoft-365/blog/2018/03/0...
There are also some great capabilities like forcing a password reset after multiple "correct password but failed MFA" logons.
The easiest way would be for the said services to do this for their users whenever a new password dump surfaces.
Or even a way to test my username and password on top 5000 sites in an automated way should help.