Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
ReplicatedRandom — Java Random state replication tool that predicts future random values by recovering internal state from observed outputs, demonstrating weaknesses in LCG-based PRNGs. | Kitploit
Tools/GitHubGitHub/fta2012/replicatedrandom
ExploitationCryptographyLearning & Education
GitHubfta2012/replicatedrandom

ReplicatedRandom

Java Random state replication tool that predicts future random values by recovering internal state from observed outputs, demonstrating weaknesses in LCG-based PRNGs.

View Repository
12013139 years agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Node (MWC1616)

See README in node folder

Java (LCG)

Given a double generated from nextDouble of a java.util.Random, recreate a Random with the same state. This ReplicatedRandom can then be used to predict the future values of the original Random.

Example:

Random r = new Random();
ReplicatedRandom rr = new ReplicatedRandom();
rr.replicateState(r.nextDouble());
System.out.println(r.nextDouble() == rr.nextDouble()); // True
System.out.println(r.nextDouble() == rr.nextDouble()); // True
System.out.println(r.nextDouble() == rr.nextDouble()); // True

Also works with Math.random() since it uses Random internally:

ReplicatedRandom rr = new ReplicatedRandom();
rr.replicateState(Math.random());
System.out.println(Math.random() == rr.nextDouble()); // True
System.out.println(Math.random() == rr.nextDouble()); // True
System.out.println(Math.random() == rr.nextDouble()); // True

Also works for nextInt() but requires two consecutive values:

Random r = new Random();
ReplicatedRandom rr = new ReplicatedRandom();
rr.replicateState(r.nextInt(), r.nextInt());
System.out.println(r.nextInt() == rr.nextInt()); // True
System.out.println(r.nextInt() == rr.nextInt()); // True
System.out.println(r.nextInt() == rr.nextInt()); // True

See this blog post for details.

Download Tool