pentesting, updated

Checking the level of randomness of the session ID

Confirm session identifiers have enough entropy to resist prediction or brute force.

Goal

Verify session IDs are generated with a CSPRNG and sufficient length — not sequential, timestamp-based, or otherwise guessable.

How to test

Collect a batch of session IDs (new logins/sessions) and look for a pattern:

for i in $(seq 1 10); do
  curl -sc - https://example.com/ 2>/dev/null | grep -i session
done

Check length, character set, and whether consecutive IDs differ only by a small, structured amount (a strong sign of a weak or sequential generator).

What to look for

Short IDs, a visible counter/timestamp component, or IDs that repeat/collide across a modest sample.

References

§ home
~/knubertus/home/
1,1 Top