3ct0s / dystopia-c2

Windows Remote Administration Tool that uses Discord, Telegram and GitHub as C2s
GNU General Public License v3.0
505 stars 119 forks source link

Build issue on windows #95

Closed kgnfth closed 1 year ago

kgnfth commented 1 year ago

İ have followed the instructions in wiki i run everything as administrator

powershell.exe -ExecutionPolicy Bypass -Command .\setup.ps1 .\venv\Scripts\python.exe -i builder.py

but i get this error i dont understand

Run "help" to get the help menu
[+] > fetch

[+] Settings fetched from settings.json!

[+] > build

Are you sure everything is setup correctly? Y/N
Y

[+] Building the Backdoor
[+] Please wait...

314 INFO: PyInstaller: 5.8.0
314 INFO: Python: 3.8.9
314 INFO: Platform: Windows-10-10.0.19041-SP0
314 INFO: wrote C:\Users\kenshin\Desktop\disctopia-c2-main\Dishgord.spec
344 INFO: UPX is available.
344 INFO: Extending PYTHONPATH with paths
['C:\\Users\\kenshin\\Desktop\\disctopia-c2-main']
Traceback (most recent call last):
  File "c:\users\kenshin\desktop\disctopia-c2-main\venv\lib\site-packages\PyInstaller\isolated\_parent.py", line 373, in call
    return isolated.call(function, *args, **kwargs)
  File "c:\users\kenshin\desktop\disctopia-c2-main\venv\lib\site-packages\PyInstaller\isolated\_parent.py", line 302, in call
    ok, output = loads(b64decode(self._read_handle.readline()))
EOFError: EOF read where object expected

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\kenshin\Desktop\disctopia-c2-main\python3.8.9\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\kenshin\Desktop\disctopia-c2-main\python3.8.9\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\kenshin\Desktop\disctopia-c2-main\venv\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
  File "c:\users\kenshin\desktop\disctopia-c2-main\venv\lib\site-packages\PyInstaller\__main__.py", line 194, in _console_script_run
    run()
  File "c:\users\kenshin\desktop\disctopia-c2-main\venv\lib\site-packages\PyInstaller\__main__.py", line 180, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "c:\users\kenshin\desktop\disctopia-c2-main\venv\lib\site-packages\PyInstaller\__main__.py", line 61, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "c:\users\kenshin\desktop\disctopia-c2-main\venv\lib\site-packages\PyInstaller\building\build_main.py", line 977, in main
    build(specfile, distpath, workpath, clean_build)
  File "c:\users\kenshin\desktop\disctopia-c2-main\venv\lib\site-packages\PyInstaller\building\build_main.py", line 899, in build
    exec(code, spec_namespace)
  File "C:\Users\kenshin\Desktop\disctopia-c2-main\Dishgord.spec", line 7, in <module>
    a = Analysis(
  File "c:\users\kenshin\desktop\disctopia-c2-main\venv\lib\site-packages\PyInstaller\building\build_main.py", line 379, in __init__
    self.hookspath += discover_hook_directories()
  File "c:\users\kenshin\desktop\disctopia-c2-main\venv\lib\site-packages\PyInstaller\isolated\_parent.py", line 404, in wrapped
    return call(function, *args, **kwargs)
  File "c:\users\kenshin\desktop\disctopia-c2-main\venv\lib\site-packages\PyInstaller\isolated\_parent.py", line 373, in call
    return isolated.call(function, *args, **kwargs)
  File "c:\users\kenshin\desktop\disctopia-c2-main\venv\lib\site-packages\PyInstaller\isolated\_parent.py", line 244, in __exit__
    self._write_handle.flush()
OSError: [Errno 22] Invalid argument

[+] The Backdoor can be found inside the "dist" directory

DO NOT UPLOAD THE BACKDOOR TO VIRUS TOTAL
PS C:\Users\kenshin\Desktop\disctopia-c2-main>

This is the content of Dishgord.spec

# -*- mode: python ; coding: utf-8 -*-

block_cipher = None

a = Analysis( #this is line 7
    ['Dishgord.py'],
    pathex=[],
    binaries=[],
    datas=[],
    hiddenimports=[],
    hookspath=[],
    hooksconfig={},
    runtime_hooks=[],
    excludes=[],
    win_no_prefer_redirects=False,
    win_private_assemblies=False,
    cipher=block_cipher,
    noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)

exe = EXE(
    pyz,
    a.scripts,
    a.binaries,
    a.zipfiles,
    a.datas,
    [],
    name='Dishgord',
    debug=False,
    bootloader_ignore_signals=False,
    strip=False,
    upx=True,
    upx_exclude=[],
    runtime_tmpdir=None,
    console=False,
    disable_windowed_traceback=False,
    argv_emulation=False,
    target_arch=None,
    codesign_identity=None,
    entitlements_file=None,
    icon=['img\\exe_file.ico'],
)

Settings.json

{
    "settings":{
        "backdoor-name": "Dishgord",
        "bot-token": "MTA4ND********RTU80DM",
        "token-webhook": "https://discord******FyJwCKJhM5VQ6TOQqffmc",
        "keylogger-webhook": "https://discord.******3RvMb7NJlXDLJSCptA3u",
        "screenshots-id": "1*****65096",
        "downloads-id": "1*****65098",
        "agent-online-id": "1*****65092",
        "credentials-id": "10******5097",
        "auto-keylogger": "True",
        "auto-persistent": "True"
    }
}
3ct0s commented 1 year ago

This is a new one. Have you tried running the PowerShell commands separately?

kgnfth commented 1 year ago

This is a new one. Have you tried running the PowerShell commands separately?

This happens when i run setup.ps1 and builder.py separately, in didnt run them in one command