Reputation
67,910
Next tag badge:
670/400 score
77/80 answers
Badges
19 169 264
Newest
 aes
Impact
~3.1m people reached

8h
awarded  aes
15h
comment How do hardware OTPs work - from a developer's perspective?
This is a development question rather than a security question. I've voted to migrate to SO.
15h
answered How to prevent the latest ImageMagick vulnerability?
15h
comment How to prevent the latest ImageMagick vulnerability?
That website is awful vulnerability marketing with almost no technical information.
17h
comment Why does IV not need to be secret in AES CBC encryption?
@supercat This is true. I felt it a bit much to start delving into weaknesses of CBC, padding, etc. and instead focused on the core issues and intents around OP's question. If I went into detail on all of it it'd be an incredibly long answer.
17h
awarded  Nice Answer
18h
revised Why does IV not need to be secret in AES CBC encryption?
Minor typo
23h
answered Why does IV not need to be secret in AES CBC encryption?
1d
comment Can secrets be made safe in memory?
@Jus12 I don't believe that you can bootstrap to any safe state when the underlying hardware is controlled by a potentially malicious party.
1d
answered How to not store the card during 3D Secure authentication, to be PCI DSS compliant?
1d
comment How to not store the card during 3D Secure authentication, to be PCI DSS compliant?
I mean, the whole point of having a separate payment provider (and paying them for that service!) is to keep sensitive financial data outside the scope of your systems, allowing you to reduce regulatory compliance costs and complexities, and to reduce your ongoing security costs through risk reduction. If your payment processor is requiring you to handle unmasked credit card details at any point then they are failing to deliver on the service you're paying them for.
1d
comment How to not store the card during 3D Secure authentication, to be PCI DSS compliant?
My concern is this: "the user enter his card details on my website. The form posts to my server, which generates the web form for 3D Secure in step 1". I have never seen a site do this which wasn't itself a payment provider. The whole point of the form is that it's meant to be hosted by your payment provider to keep your systems outside of PCI DSS scope. Visa guidelines say to put the form in an iframe. Also, your verification step seems odd. Surely your provider signs status messages as proof of payment success, which should be sufficient and avoids you ever having the CC number?
1d
answered Can secrets be made safe in memory?
1d
comment How could Craig Wright obtain Satoshi Nakamoto's private key?
This one time, at band camp, I invented a global cryptocurrency.
1d
comment Altering assembly without affecting digital signature
Can you upload the pre- and post-cracked file somewhere along with the crack itself so we can take a look? This sounds kinda hokey and I can't imagine a situation where the signature would remain valid (aside from re-application of a stolen cert or, potentially, a weak hash like MD5).
2d
comment Always setgroups before setuid?
@Kaz No, not at all. The process has an effective privilege set based on its stored gid and uid plus supplementary gids. When the process calls setuid it doesn't do anything to the gids; you have to change that yourself. By calling setgroups you can clear the stored gid and ancillary gids properly. Without doing that, your process still runs at the same effective gid as before.
2d
comment Always setgroups before setuid?
@Kaz A comparable case on Windows would be a process running as an administrative user which launches a thread that runs under an alternative security context via impersonation, without dropping a critical process-level privilege such as SeDebugPrivilege.
2d
comment Always setgroups before setuid?
@Kaz Alternatively, imagine you assign an ancillary group to root (uid 0) to provide it with administrative privileges on a particular feature on a service which doesn't give root administrative access by default. A binary which is setuid and owned by root will now have access to that group's privilege. If it doesn't drop that group, it will drop privilege to the uid of the user it calls setuid on, but still have access to that group due to the ancillary groups. By calling setgroups first it can properly drop that additional privilege.
2d
comment Always setgroups before setuid?
@Kaz Not quite. Imagine you have the setgid bit on a binary, and one of those groups is given the privilege to access X11 sessions. That binary wants to drop privileges, so it calls setuid to the current user who ran the binary. That user isn't in the X11 group. Now that user, through that process, has access to X11 when it didn't before. Calling setgroups with a single group (that of the target user) removes this issue.
2d
comment Always setgroups before setuid?
@Kaz In which case, the second half of my answer should cover what you want. Failing to drop the ancillary groups may imbue additional capabilities which would otherwise be lost when doing setgroups with a single non-zero gid (before setuid of course).