New answers tagged

3

... but I got an MD5 Hex string in DB (B081DBE85E1EC3FFC3D4E7D0227400CD) with unknown plain-text and want to convert to Binary Base64 encoded string. While this string is the MD5 for password it is not the MD5 for password in ASCII encoding but in UTF-16LE (which is the native character encoding on Windows): $ echo -n "password" | openssl dgst -...


0

Chosen-prefix collision attacks on md5 are fairly easy to pull off. This is an attack where the attacker can choose two arbitrary files, then append different calculated bytes to each, so that both files produce the same md5 hash. In 2012, the authors of the Flame malware took advantage of this attack to make it appear as if the malware was signed by a ...


0

If you can scale it, searching across a fleet with Yara rules is better than searching for a hash by a lot Velociraptor is an open-source implementation of the even rougher standard, RE&CT, which has a response labelled find process by executable content pattern VQL (from Velociraptor) is the rough standard for a query language developed for this purpose....


3

How password_verify can know the algorithm used, the salt and the cost? $save_hash looks like this: $2y$10$nmqlFAguURkkWhjgn7LP7.QxLw2fQ9GYSkiaEbypgXg6L4bESC.Mu Which is a bunch of fields separated by $: What Means this 2y Type of hash, in this case bcrypt 10 The cost Salt and password hash The first 22 characters are salt, the remainder is the hash ...


0

For the second one, I think you mean 152 characters, not 152 bytes. The character set looks like base64, and the equals symbols at the end are another tell-tale sign that this is probably base64, as equals symbols are often used for padding in base64. In base64, each set of 4 characters represents 3 bytes. You have 150 characters of actual information (...


2

Let formalize the secret in the middle as; signature = Hash( m[1..l/2] || secret || m[l/2+1..l] ) where l = len(m). This construction is not differ from the original H(k,m) since simply consider that k = m[1..l/2] || secret and then apply the length extension attack, success! The attack append-only attack H(m,k) - linked by user49075 on the comments - ...


4

Hashes Your issue is that password_hash is designed for passwords and so always assigns a random salt - this is why you get a different hash everytime. You want to use just a hash and skip the salt, which password_hash won't let you do. You should probably just use plain ol' SHA256 which PHP can provide for you via the hash function. A Caveat I don't quite ...


3

If the attacker compromised your server, they are in control not only of the software running on your server but also of the software running on the clients. No matter what beautifully engineered authentication scheme you designed, the attacker can alter it before it's sent to the browser. You now have an egg-chicken problem: you can't secure a password if ...


1

There is such a mechanism - Subresource Integrity. It allows a web site to specify a checksum for any <script> or <link> element on the page, where the link being provided presumably points off to a CDN, or a partner site, or some other resource that the main web page source doesn't have control over. You can learn how to use it here. It wouldn'...


8

This is exactly the problem that protocols like PAKE and SRP aim to solve. With PAKE/SRP, the client and the server mutually authenticate each other based on a password known to the client (and a derivation of the password known to the server). The client demonstrates to the server that it knows the password, without the client sending the password (or ...


5

In addition to the answer of Steffen Ullrich: If during login the user sends the hash only, then the attacker does not need to know the password. It is sufficient to steal the password database. Then during login request the attacker will just send the hash from database. The server will not distinguish if client used the password and hashed it, or if the ...


14

I don't see to how your proposal is better than existing client side hashing approaches, but I find it as more complex to implement than others. Unfortunately you don't describe a specific risk you are trying to access so I just assume the typical threats commonly seen. Man in the Middle attacker In this case it is assumed that some man in the middle has ...


3

The common way is using the Public-Key to exchange keys. We assume both parties have public-private keys and they shared and verified their public keys before any other communication. Diffie-Hellman Key Exchange (DHKE); after the key exchange, you can use a KDF two derive encryption and MAC key. DHKE has also a variant that uses Elliptic Curves, ECDH. To ...


0

If Bob is never allowed to see Alice's public key, ever, then there's no way for Alice to prove to Bob that she owns A*, if Bob only has access to h(A) and h is a general-purpose hash algorithm. Bob has insufficient information. The only way to make this work is for Alice to send Bob A as part of the proof. He can then compute h(A) and compare it against his ...


1

The general idea behind such proof is that A signs some message ("challenge") created by B with its private key - and that this signature can be checked. B creates a random challenge which is then signed by A. It is important that this challenge is not predictable in order to avoid replay attacks. A then sends the signed challenge and the public ...


1

No, md5(data+key) is not secure. MD5 is vulnerable to dirt cheap collision attacks. It's possible to craft a data1 that is innocuous and that your system, or the code that's calling your system, accepts as valid, and then later submit data2 which is malicious but such that md5(data1+key) = md5(data2+key), without knowing key (the collision works for an ...


0

Key derivation for openssl enc for versions prior to v1.1.0 versions 1.1.0 or later with -md md5 can be summed up as follows: D1=md5(passwordbytes + salt) D2=md5(D1 + passwordbytes + salt) D3=md5(D2 + passwordbytes + salt) key=D1+D2 iv=D3 As an example, we can use the following openssl command to create some ciphertext using openssl enc with -md md5: ...


2

... man page does not say. It is not in the man page of sha3sum but in the documentation of the module: Allowed values for $alg are 224, 256, 384, and 512 for the SHA3 algorithms; or 128000 and 256000 for SHAKE128 and SHAKE256, respectively.


Top 50 recent answers are included