Skip to content

Commit

Permalink
added screenshots for README.md, actual build. changed name. added ci…
Browse files Browse the repository at this point in the history
…/cd integration
  • Loading branch information
TheUnknownSoul committed Nov 24, 2023
1 parent 9a012c5 commit a1708b9
Show file tree
Hide file tree
Showing 16 changed files with 82 additions and 8 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/CI_CD.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CI

on:
- push
- pull_request

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
- name: Build with Maven
run: mvn --batch-mode --update-snapshots clean package
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# JAVA HASHCODE BREAKER

# Motivation

The most popular and powerful tools such as [Hashcat](https://github.com/hashcat)
or [John The Ripper](https://www.openwall.com/john/) used to be as default
hash cracking tools. But to some unknown reasons neither hashcat no john couldn't crack simple Java Object hashcode
function. And even a lot of instruments couldn't identify such type of hash. This is very strange because sometimes Java
developers converts users passwords with simple hashcode function and pushes in to database which make dictionary
attack reasonable. Also, if you don't want to pay to crack you hash on resources
as [Hashes.com](https://hashes.com/en/credits) you may use this tool for testing.

### Some additional information
[Hashcat: issue Java hashCode() Token Length Exception with Hex integer](https://github.com/hashcat/hashcat/issues/3559)

![simple_java_hash.png](assets%2Fsimple_java_hash.png)
![hash_unknown_hash.png](assets%2Fhash_unknown_hash.png)
![hashid_unknown_hash.png](assets%2Fhashid_unknown_hash.png)
![hashcat_unknown_hash.png](assets%2Fhashcat_unknown_hash.png)
![john_unknown_hash.png](assets%2Fjohn_unknown_hash.png)

# Usage
1. Clone the repository
2. Change path to builds
```
cd java_hashcode_breaker/builds
```
3. Run .jar file with options below
```
java -jar <current build vesion>.jar -h <provide hash here> -w <path to wordlist>
```
4. You can add -v option for verbose output
```
java -jar <current build vesion>.jar -h <provide hash here> -w <path to wordlist> -v
```
5. Happy cracking.
### Example of work
Without verbosity
![example.png](assets%2Fexample.png)
With -v option
![example_verbose.png](assets%2Fexample_verbose.png)
Binary file added assets/example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/example_verbose.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/hash_unknown_hash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/hashcat_unknown_hash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/hashid_unknown_hash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/john_unknown_hash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/simple_java_hash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added builds/build.version-0.1.0-24-11-2023.jar
Binary file not shown.
12 changes: 10 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<relativePath/>
</parent>
<groupId>com.exploitable</groupId>
<artifactId>java-hashcode-cracker</artifactId>
<artifactId>java-hashcode-breaker</artifactId>
<version>0.1.0</version>
<name>java-hashcode-cracker</name>
<description>java-hashcode-cracker</description>
Expand Down Expand Up @@ -46,6 +46,14 @@
</dependencies>

<build>
<resources>
<resource>
<directory>assets</directory>
<excludes>
<exclude>*</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
Expand All @@ -58,7 +66,7 @@
</goals>
<configuration>
<mainClass>
com.exploitable.javahashcodecracker.JavaHashcodeCrackerApplication
com.exploitable.javahashcodebreaker.JavaHashcodeCrackerApplication
</mainClass>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.exploitable.javahashcodecracker;
package com.exploitable.javahashcodebreaker;


import org.apache.commons.cli.CommandLineParser;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.exploitable.javahashcodecracker;
package com.exploitable.javahashcodebreaker;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.exploitable.javahashcodecracker;
package com.exploitable.javahashcodebreaker;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.exploitable.javahashcodecracker;
package com.exploitable.javahashcodebreaker;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Order;
Expand All @@ -14,9 +14,9 @@
import java.util.Random;

@SpringBootTest
class JavaHashcodeCrackerApplicationTests {
class JavaHashcodeBreakerApplicationTests {

private final static File rockyouFile = new File("src/test/java/com/exploitable/javahashcodecracker/rockyousmall-3000.txt");
private final static File rockyouFile = new File("src/test/java/com/exploitable/javahashcodebreaker/rockyousmall-3000.txt");

@Autowired
private HashCrackService hashCrackService;
Expand Down

0 comments on commit a1708b9

Please sign in to comment.