#security
Application security: authentication, authorization, secrets, headers and common vulnerabilities.
Posts tagged #security
if you only watch one thing to understand SQL injection, make it this Computerphile one. Tom explains WHY it works with an actual login box, not just " OR 1=1. understanding the query is the whole thing
every breach notification email: "we take your privacy…
every breach notification email: "we take your privacy seriously and there is no evidence your data was misused". translation: we were not looking, we still are not looking, and we found out from a journalist. the passive voice in these emails should be a CVE on its own
password reset tokens checklist: random from a CSPRNG…
password reset tokens checklist: random from a CSPRNG, single use, expire in 15-60 min, store only a hash, invalidate on password change, same response whether the email exists or not. most bugs i find are the last one
be honest: do you run curl | sh?
How does your team handle secrets in CI?
the EU Cyber Resilience Act is going to land on unpaid maintainers. here is why I am still not fully against it.
this is opinion, not reporting, and I am one of the people the EU Cyber Resilience Act is about, so take it with that bias in mind. the CRA's intent is good and overdue: products with digital parts sold in the EU should not be insecure by default, should get security updates, and someone should be accountable when they ship a backdoor in a car. after XZ and Log4Shell, "the manufacturer is responsible for the…
How you access your homelab from outside? (honest answer pls)
push notification MFA where you just tap "approve" trains…
push notification MFA where you just tap "approve" trains users to approve. attackers spam you at 3am until you tap it to make it stop. this is MFA fatigue and it is why number matching and passkeys exist. SMS 2FA is better than nothing and worse than everything else
A pentester found an IDOR in our statements API in 10 minutes. The fix was boring
Last quarter an external pentest found that any logged-in customer could download any other customer's account statement. It took the tester around 10 minutes. I want to share it because the bug was very ordinary, and ordinary bugs are the ones that survive reviews. The endpoint was GET /api/statements/{id} . It checked that the request had a valid session. It did not check that the statement belonged to the…
forcing users to change their password every 90 days does…
forcing users to change their password every 90 days does not make you secure, it makes everyone go from Summer2024! to Summer2024!! and write it on a sticky note. NIST dropped this advice in 2017. your IT policy is doing security cosplay, not security
the invoice IDOR that paid for my holiday, and the 94 days it took to fix
this is a writeup of a bug I reported to a SaaS billing vendor I am calling "Facturo" here (not the real name, the program is private and I am still under their disclosure terms). nothing in this post lets you attack them or anyone else. it is a plain IDOR, the oldest bug in the book, and the only reason it is interesting is the 94 days it took them to admit it. the setup Facturo is a billing dashboard that a few…
Pseudonymisation is not anonymisation: a note for people building health apps in the EU
I review data flows for health projects quite often, and one sentence appears in almost every design document: "the data are anonymised". Then I look closer and the data are pseudonymised. The difference is not academic. Under the GDPR it decides whether the law applies at all. The two words Pseudonymised data are personal data where the direct identifiers (name, insurance number) were replaced with something else,…
OAuth in mobile apps: use PKCE, and stop shipping client secrets in the APK
Every few months I review a mobile app that ships an OAuth client secret inside the binary. Extracting a string from an APK or IPA takes about ten minutes, so that secret is public the day the app is published. Here is the setup that actually works for native apps. Mobile apps are public clients A public client is one that cannot keep a secret: native apps, single page apps, desktop apps. The OAuth specs say so…
Log4Shell, four years later: the lesson everyone said they learned and nobody did
Log4Shell (CVE-2021-44228, December 2021) is old news, but I keep seeing the same mistakes it should have cured, so here is the short version and what it was actually about. what happened Log4j is a Java logging library that is inside an enormous amount of the world's software. it had a feature where a logged string could trigger a lookup, and an attacker who could get a crafted string logged (a username, a user…
how to actually start in security (hint: not by downloading 40 tools)
I get the same DM twice a week: "how do I get into hacking". so here is the answer once, properly, and I will just link this from now on. the mistake everyone makes is starting with tools. they install kali, run thirty programs they cannot read the output of, and give up in a month. you do not need kali to start. you need to understand how the web works, and then practise on things that are built to be broken. step…
closed as informative: the SSRF that read the cloud metadata and still was not "a bug"
a short angry story, because I need to vent and because "informative" is the most insulting word in bug bounty. a company (private program, calling them "Shipr") had an image import feature. you give it a url, it fetches the image server side and stores it. classic SSRF territory. I pointed it at an internal address that only their own servers can reach, the kind of link to a cloud metadata service, and it happily…
if your .env.example has a real-looking secret in it…
if your .env.example has a real-looking secret in it, someone will deploy it to production unchanged. use CHANGE_ME and make the app refuse to start when it sees it. ask me how i know
the heap overflow I reported to skerry, and why @kernel_karl is the gold standard
since this topic is usually about maintainers behaving badly or companies being awful, here is the opposite, because it deserves saying out loud. last year I was fuzzing C JSON parsers for fun (yes, that is my idea of fun) and I found a heap buffer overflow in skerry, the little parser Karl maintains and that, as his bio says, half your companies vendor and never thank. a malformed deeply nested input could write…
Meu cliente foi hackeado por um plugin 'nulled'. O que todo plugin WordPress precisa ter
oxente, que semana. cliente meu aqui em salvador, uma pousada, comprou um plugin "premium" de reservas num site desses de plugin pirata. de graça. massa né? três semanas depois o google search console mandou alerta e o site tava cheio de página de cassino em russo e japonês. barril. como eu achei primeira coisa, ver quem é admin: wp user list --role=administrator tinha um usuário "wp_support" que ninguém criou.…
Where should a browser app keep its tokens? Not localStorage (mostly)
This question comes up in every code review I do for a new web app, so I am writing the long answer once. The short version For a first-party web app (your frontend talks to your own API): keep the session in an HttpOnly, Secure, SameSite cookie , and do not put long-lived tokens anywhere JavaScript can read them. If you must use OAuth access tokens in the browser, keep the access token in memory and short-lived,…
someone in a Facebook group just share a screenshot of his…
someone in a Facebook group just share a screenshot of his Portainer, on public IP, no login, asking "how to secure?" bro. it is already too late. wipe it, put it behind Tailscale or WireGuard, then we talk. please :(
Threat modelling a payment flow in 45 minutes with STRIDE and a whiteboard
Threat modelling has a reputation for being a heavy process with special tools and a 40 page document nobody reads. It does not have to be. For most features, a 45 minute session with the people who built it finds the important problems. This is the format I use with product teams at the bank. Before the session (10 minutes, one person) Draw the data flow on one page. Boxes for components, arrows for data, and…
the XZ backdoor was not a hack. it was a hostile takeover of a tired volunteer.
everyone remembers the XZ backdoor (CVE-2024-3094, March 2024) as "the thing that almost backdoored SSH on every Linux box". that part is true and it was caught by luck, a Microsoft engineer noticing a half second of latency. but if you only remember the clever technical part you learned the wrong lesson. here is the short technical shape of it, and this Seytonic video does the timeline well if you want the full…