Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wordlist symlinks, fzf-rules aliase and hashcat rules #394

Open
wants to merge 20 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sources/assets/shells/aliases.d/fzf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
alias fzf-wordlists='find /opt/rockyou.txt /opt/seclists /usr/share/wordlists /usr/share/wfuzz /usr/share/dirb -type f | fzf'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/opt/seclists can be removed here since seclists will be in /opt/lists (@qu35t-code was right, it's a good idea)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here i remove /opt/rockyou.txt because now rockyou.txt is in /opt/lists/rockyou.txt and since i already added /opt/lists /opt/rockyou.txt is no longer relevant

alias fzf-rules='find /opt/rules/ /usr/share/hashcat/rules/ -type f | fzf'
alias fzf-haiti-hashcat='(){ haiti -e $1 | fzf --ansi | grep -E -o " [0-9]*]" | cut -d "]" -f 1 | cut -d " " -f 2 ;}'
alias fzf-haiti-john='(){ haiti -e $1 | fzf --ansi | grep -E -o "JtR: .*]" | cut -d "]" -f 1 | cut -d " " -f 2 ;}'
alias hcat='(){ if [ -f "$1" ]; then hashcat -m $(fzf-haiti-hashcat $(head -n 1 "$1")) "$1" $(fzf-wordlists) "${@:2}"; elif [ -n "$1" ]; then hashcat -m $(fzf-haiti-hashcat "$1") "$1" $(fzf-wordlists) "${@:2}"; fi ;}'
Expand Down
2 changes: 1 addition & 1 deletion sources/install/package_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function install_rust_cargo() {

function filesystem() {
colorecho "Preparing filesystem"
mkdir -p /opt/tools/bin/ /data/ /var/log/exegol /.exegol/build_pipeline_tests/
mkdir -p /opt/tools/bin/ /data/ /var/log/exegol /.exegol/build_pipeline_tests/ /opt/rules/ /opt/lists
touch /.exegol/build_pipeline_tests/all_commands.txt
touch /.exegol/installed_tools.csv
echo "Tool,Link,Description" >> /.exegol/installed_tools.csv
Expand Down
6 changes: 3 additions & 3 deletions sources/install/package_forensic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ function install_forensic_apt_tools() {
# CODE-CHECK-WHITELIST=add-aliases
colorecho "Installing forensic apt tools"
fapt pst-utils foremost testdisk fdisk sleuthkit

add-history foremost
add-history testdisk
add-history fdisk

add-test-command "pst2ldif -V" # Reads a PST and prints the tree structure to the console
add-test-command "foremost -V" # Alternative to binwalk
add-test-command "testdisk --help" # Recover lost partitions
Expand Down Expand Up @@ -96,7 +96,7 @@ function install_peepdf() {
add-history peepdf
add-test-command "peepdf.py --help"
add-to-list "peepdf,https://github.com/jesparza/peepdf,peepdf is a Python tool to explore PDF files in order to find out if the file can be harmful or not."
}
}

function install_jadx() {
# CODE-CHECK-WHITELIST=add-aliases
Expand Down
69 changes: 67 additions & 2 deletions sources/install/package_wordlists.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ function install_seclists() {
mkdir -p /usr/share/wordlists
ln -v -s /opt/seclists /usr/share/seclists
ln -v -s /opt/seclists /usr/share/wordlists/seclists
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these can be removed, I don't even know why they were created in the first place to be honest

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, here i modify the following lines :
47 cd /opt/seclists || exit
by
cd /opt/lists/seclists || exit

And
50 add-test-command "[[ -f '/usr/share/wordlists/rockyou.txt' ]]"
51 add-test-command "[[ -d '/opt/seclists/Discovery/' ]]"
by
add-test-command "[[ -f '/opt/lists/rockyou.txt' ]]"
add-test-command "[[ -d '/opt/lists/seclists/Discovery/' ]]"

tar -xvf /opt/seclists/Passwords/Leaked-Databases/rockyou.txt.tar.gz -C /opt/
ln -v -s /opt/rockyou.txt /usr/share/wordlists/rockyou.txt
tar -xvf /opt/seclists/Passwords/Leaked-Databases/rockyou.txt.tar.gz -C /opt/lists/
add-test-command "[[ -f '/usr/share/wordlists/rockyou.txt' ]]"
add-test-command "[[ -d '/opt/seclists/Discovery/' ]]"
add-to-list "seclists,https://github.com/danielmiessler/SecLists,A collection of multiple types of lists used during security assessments"
Expand Down Expand Up @@ -106,6 +105,70 @@ function install_genusernames() {
add-to-list "genusernames,https://gitlab.com/-/snippets/2480505/raw/main/bash,GenUsername is a Python tool for generating a list of usernames based on a name or email address."
}



function install_onelistforall() {
# CODE-CHECK-WHITELIST=add-aliases,add-history
colorecho "Installing onelistforall"
wget https://raw.githubusercontent.com/six2dez/OneListForAll/main/onelistforallmicro.txt -P /opt/lists/
wget https://raw.githubusercontent.com/six2dez/OneListForAll/main/onelistforallshort.txt -P /opt/lists/
add-test-command "[[ -f '/opt/lists/onelistforallshort.txt' ]]"
add-to-list "onelistforall,https://github.com/six2dez/OneListForAll,Rockyou for web fuzzing"
}

function install_rules(){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably don't want to unzip the files here for two reasons

  1. it gets a bit heavy (72M)
  2. hashcat already support on-the-fly loading of compressed wordlists (https://github.com/hashcat/hashcat/blob/ba2746228a40ebeed53a187dfa54fc6154234481/docs/changes.txt#L14), I guess it works with rules as well

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, i remove all gunzip, but with add-test-command i keep it for checking zip files? @ShutdownRepo

# CODE-CHECK-WHITELIST=add-aliases,add-history,add-to-list
colorecho "Add rules"
qu35t-code marked this conversation as resolved.
Show resolved Hide resolved
wget https://github.com/NSAKEY/nsa-rules/raw/refs/heads/master/_NSAKEY.v1.dive.rule -P /opt/rules/
add-test-command "[[ -f '/opt/lists/_NSAKEY.v1.dive.rule' ]]"
wget https://github.com/NSAKEY/nsa-rules/raw/refs/heads/master/_NSAKEY.v2.dive.rule -P /opt/rules/
add-test-command "[[ -f '/opt/lists/_NSAKEY.v2.dive.rule' ]]"
wget https://raw.githubusercontent.com/praetorian-inc/Hob0Rules/refs/heads/master/d3adhob0.rule -P /opt/rules/
add-test-command "[[ -f '/opt/lists/d3adhob0.rule' ]]"
wget https://raw.githubusercontent.com/praetorian-inc/Hob0Rules/refs/heads/master/hob064.rule -P /opt/rules/
add-test-command "[[ -f '/opt/lists/hob064.rule' ]]"
wget https://github.com/rarecoil/pantagrule/raw/refs/heads/master/rules/hashesorg.v6/pantagrule.hashorg.v6.hybrid.rule.gz -P /opt/rules/
gunzip /opt/rules/pantagrule.hashorg.v6.hybrid.rule.gz
add-add-test-command "[[ -f 'pantagrule.hashorg.v6.hybrid.rule' ]]"
wget https://github.com/rarecoil/pantagrule/raw/refs/heads/master/rules/hashesorg.v6/pantagrule.hashorg.v6.one.rule.gz -P /opt/rules/
gunzip /opt/rules/pantagrule.hashorg.v6.one.rule.gz
add-add-test-command "[[ -f 'pantagrule.hashorg.v6.one.rule' ]]"
wget https://github.com/rarecoil/pantagrule/raw/refs/heads/master/rules/hashesorg.v6/pantagrule.hashorg.v6.popular.rule.gz -P /opt/rules/
gunzip /opt/rules/pantagrule.hashorg.v6.popular.rule.gz
add-add-test-command "[[ -f 'pantagrule.hashorg.v6.popular.rule' ]]"
wget https://github.com/rarecoil/pantagrule/raw/refs/heads/master/rules/hashesorg.v6/pantagrule.hashorg.v6.random.rule.gz -P /opt/rules/
gunzip /opt/rules/pantagrule.hashorg.v6.random.rule.gz
add-add-test-command "[[ -f 'pantagrule.hashorg.v6.random.rule' ]]"
wget https://github.com/rarecoil/pantagrule/raw/refs/heads/master/rules/hashesorg.v6/pantagrule.hashorg.v6.raw1m.rule.gz -P /opt/rules/
gunzip /opt/rules/pantagrule.hashorg.v6.raw1m.rule.gz
add-add-test-command "[[ -f 'pantagrule.hashorg.v6.raw1m.rule' ]]"
wget https://github.com/rarecoil/pantagrule/raw/refs/heads/master/rules/private.hashorg.royce/pantagrule.popular.royce.rule.gz -P /opt/rules/
gunzip /opt/rules/pantagrule.popular.royce.rule.gz
add-add-test-command "[[ -f 'pantagrule.popular.royce.rule' ]]"
wget https://github.com/rarecoil/pantagrule/raw/refs/heads/master/rules/private.hashorg.royce/pantagrule.hybrid.royce.rule.gz -P /opt/rules/
gunzip /opt/rules/pantagrule.hybrid.royce.rule.gz
add-add-test-command "[[ -f 'pantagrule.hybrid.royce.rule' ]]"
wget https://github.com/rarecoil/pantagrule/raw/refs/heads/master/rules/private.hashorg.royce/pantagrule.one.royce.rule.gz -P /opt/rules/
gunzip /opt/rules/pantagrule.one.royce.rule.gz
add-add-test-command "[[ -f 'pantagrule.one.royce.rule' ]]"
wget https://github.com/rarecoil/pantagrule/raw/refs/heads/master/rules/private.hashorg.royce/pantagrule.random.royce.rule.gz -P /opt/rules/
gunzip /opt/rules/pantagrule.random.royce.rule.gz
add-add-test-command "[[ -f 'pantagrule.random.royce.rule' ]]"
wget https://github.com/rarecoil/pantagrule/raw/refs/heads/master/rules/private.v5/pantagrule.private.v5.hybrid.rule.gz -P /opt/rules/
gunzip /opt/rules/pantagrule.private.v5.hybrid.rule.gz
add-add-test-command "[[ -f 'pantagrule.private.v5.hybrid.rule' ]]"
wget https://github.com/rarecoil/pantagrule/raw/refs/heads/master/rules/private.v5/pantagrule.private.v5.one.gz -P /opt/rules/
gunzip /opt/rules/pantagrule.private.v5.one.gz
add-add-test-command "[[ -f 'pantagrule.private.v5.one' ]]"
wget https://github.com/rarecoil/pantagrule/raw/refs/heads/master/rules/private.v5/pantagrule.private.v5.popular.rule.gz -P /opt/rules/
gunzip /opt/rules/pantagrule.private.v5.popular.rule.gz
add-add-test-command "[[ -f 'pantagrule.private.v5.popular.rule' ]]"
wget https://github.com/rarecoil/pantagrule/raw/refs/heads/master/rules/private.v5/pantagrule.private.v5.random.rule.gz -P /opt/rules/
gunzip /opt/rules/pantagrule.private.v5.random.rule.gz
add-test-command "[[ -f '/opt/lists/pantagrule.private.v5.random.rule' ]]"
}
qu35t-code marked this conversation as resolved.
Show resolved Hide resolved


# Package dedicated to the installation of wordlists and tools like wl generators
function package_wordlists() {
set_env
Expand All @@ -119,6 +182,8 @@ function package_wordlists() {
install_pass_station # Default credentials database
install_username-anarchy # Generate possible usernames based on heuristics
install_genusernames
install_onelistforall
install_rules
end_time=$(date +%s)
local elapsed_time=$((end_time - start_time))
colorecho "Package wordlists completed in $elapsed_time seconds."
Expand Down