## Anonymizing IP addresses using (sha) hashes; how to circumvent rainbow table attacks?

Under GDPR, IP addresses are personal data. I have no need to trace back IP to specific users, but I would like to limit downloads to 1 per IP*. I do not want to store plain IPs.

First “solution”/idea would be to hash the IP. I could store the hash 12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0. Problem: hashing all 4294967296 possible IP addresses is simple, and someone will easily find that 127.0.0.1 is the stored IP.

Adding salt holds the same problem, you can calculate all the IPs again with this salt and arrive at the same problem.

Is there a solution for this?

* Use case here is simplified, please do not comment on reasons why I want this 😉

## is possible someone break the algorythm of my dice game with hashes

I just want to know how much secure are these games. I coded my own game and now want to know how much secure is.

If for example the hash is visible(before you bet) would be possible decipher this hash trying to break the algorythm and then guess the number in the roll just with this hash? And what i need to learn to know more about this.

For example i will provide some examples of the hashes.

1.c910a1337bc486f621fc1b1d8bf72ebf99fba1eb20bbc3834151649f5fd59e40 2.bf09437579722a8378e51b06afef30b5af337ec3472ac6aa6d34e6a1bbb0cf09 3.6a3df2709858f3313c6651133fbb9c177b27aa2d5a6736e01f692e45fb44c948 4.7b2963c6d959f81dad5388389e43e047e336092c005b57a5bc684d0cc7cb19de 

could someone just with the hashes get the algorythm? and how we can protect of this. how much time would take me to get the algorytm.

Some idea if would be possible to get the algorythm to guess the number?

## Add additional rounds on existing SHA-512 salted hashes without knowing clear text password?

Assuming you have a salted SHA-512 password hash with 5000 rounds. For example:

{CRYPT}$6$  rounds=5000$6835c5dcf0bb7310$  hVod/jy7uONMSa.FVpLHb/2OrWpAj3lB/.RWdvgd3YaQAnzN3rorGhaziswwGsHfOWZYkLwXhHKnCy5By2CKr0 
• Could one add more rounds (e.g. another 5000 rounds) to this hashed password without knowing the cleartext password such that the hash value still would be valid if a user’s cleartext password is verified?

• If this is possible as I think it should be, are there existing tools or code to “add more rounds” to this hash value?

Btw. the cleartext password for the above hash is “password” but assume would not know this.

## Creating a file of md5 hashes for all files in a directory in PowerShell

I have been trying to write the md5 hashes for all files in a directory and its subdirectories to a file. Ideally, replicating the output of the Unix command find . -type f -exec md5sum {} + (i.e. two columns: lowercase hashes and relative file paths [with forward slashes] separated by a space and terminated only by a line feed).

With a lot of help from Mark Wragg, LotPings and others on stackoverflow, the following command appears to compute md5 hashes for all files in a directory and its subdirectories (including those files without file extensions and those with square brackets in the filename).

(Get-FileHash -Algorithm MD5 -LiteralPath (Get-ChildItem -Recurse -File).fullname | ForEach-Object{"{0} {1}" -f $_.Hash.ToLower(),(Resolve-Path -LiteralPath$  _.Path -Relative)} | Out-String) -replace '\r(?=\n)' -replace '\','/' | Set-Content -NoNewline -Encoding ascii $ENV:USERPROFILE\Desktop\hashes.txt  The two uses of -LiteralPath seems to help with filenames containing square brackets and (Get-ChildItem -Recurse -File).fullname gets the full path of all nested files, including those without file extensions. The rest is just formatting. Can any one tell me where I can find more information about .fullname? I’ve tried searching for it on Google but without any luck. I had used Get-ChildItem "*.*" -Recurse, which gives full file paths but only for files with dots in the filename. Whereas, Get-ChildItem "*" -Recurse doesn’t always give the full path for some reason (and returns both files and folders). Compare: Get-ChildItem "*.*" -Recurse | foreach-object { "$  _" }  Get-ChildItem "*" -Recurse | foreach-object { "\$  _" } 

The order of entries in the hashes file won’t be the same as those from the Unix command but compare-object in PowerShell appears to ignore the order of lines, e.g. (https://serverfault.com/questions/5598/how-do-i-diff-two-text-files-in-windows-powershell)

compare-object (get-content oldHashes.txt) (get-content newHashes.txt) 

or

diff (cat oldHashes.txt) (cat newHashes.txt) 

## How long are password hashes stored in the SAM?

Suppose Alice logs into Windows machine M (which is part of an enterprise network managed through Active Directory). My understanding is that M will contact the domain controller to get Alice’s password hash, store it in the local SAM, and use it to verify Alice’s login.

How long is the password hash retained in the SAM? Once added, does it stay there forever? Or does it get automatically deleted after a certain period; and if so, how long is that period?

(Motivation: I’m trying to understand the security risks of password hashes stored in the SAM.)

## Hashes coupon collector

The story:

A sport card store manager has $$r$$ customers, that together wish to assemble a $$n$$-cards collection. Every day, a random customer arrives and buys his favorite card (that is, each customer is associated with a single card), even if it has purchased the same card before. How many days will past before the customers complete their collection?

Formally, let $$n\le r$$ be integer parameters, and let $$h:[r]\to [n]$$ be a random projection from $$[r]$$ to $$[n]$$ (i.e., it maps every element uniformly and independently). How many random samples (with replacement) $$(x,h(x))$$ to we need to get before we see all $$n$$ values possible for $$h$$?

Clearly, there is some chance that $$h$$ is not onto and thus the expectation of the required number is not bounded.

I’m interested in a bound of the form:

• After $$T(r,n,\delta)$$ samples, with probability at least $$1-\delta$$, we have seen all possible $$n$$ values.

For example, if $$r=3,n=2$$, we have a probability of $$1/4$$ that $$h$$ is not onto, and if it is, then after collecting $$4$$ cards, the chance of not seeing all $$h$$ values is $$(1/3)^4+(2/3)^4\le 0.21$$. This means that $$T(3,2,0.46)=4$$ is a correct upper bound.

## Where are NTLM and LM hashes stored in a password protected microsoft presentation file

I have a password protected presentation file (MS office 2003).

My assignment required me to either remove the password or find it.

In my research i found out that presentation use ntlm and/or nt hashes. I also found out that office2john looks like the tool for the job.

Now my questions: How office2john extract the hashes? Where are they in the file? Can you explain to me where are they located? Or can you point me to some documentation that explain it?

## What is the point of hashes when downloading over the same channel?

What is the point of providing shaXXX hashes for downloads of software over say TLS when any attacker that could change the download could have easily changed the hash? Isn’t there enough information in the download to know that it is corrupt? Just seems brain dead to me.

## Can we implement custom algorithms to encode and decode wifi password hashes between Windows 10 and our Router?

Windows 10 has its own way of encrypting hashes, but these can be brute-forced by hashcat. One of our students created 2 of his own password encryption algorithms in python (One for encode, one for decode). Is there a way we can implement his algorithms on our Windows 10 PC and Router such that the algorithm encodes the wifi password, creates a hash, and then sends it to the pc, which reads the hash and then uses the decode algorithm to get the correct password.

## How to make John the Ripper output example hashes for a given hash type?

Is it possible to make John the Ripper output example hashes for a given hash type given by the --format= option?

This is possible using Hashcat, but currently I look in John the Ripper’s source code for example hashes, which is rather slow.

Any ideas?