klezVirus / inceptor

Template-Driven AV/EDR Evasion Framework
Other
1.58k stars 260 forks source link

No module named 'obfuscators.powershell.chameleon.chameleon #10

Closed r0ot-to0r closed 3 years ago

r0ot-to0r commented 3 years ago

from generators.PowerShellArtifactGenerator import PowerShellArtifactGenerator from obfuscators.powershell.Karmaleon import Karmaleon from obfuscators.powershell.chameleon.chameleon import Chameleon ModuleNotFoundError: No module named 'obfuscators.powershell.chameleon.chameleon'

RedLectroid commented 3 years ago

looks like Chameleon isn't downloading properly. You can manually download this git and place it in the folder: https://github.com/klezVirus/chameleon/tree/03f3ad2f9764c8a886d15c427962a2b654a5a9d2

r0ot-to0r commented 3 years ago

看起来变色龙没有正确下载。你可以手动下载这个git并放到文件夹中:https : //github.com/klezVirus/chameleon/tree/03f3ad2f9764c8a886d15c427962a2b654a5a9d2

Thx! bro

klezVirus commented 3 years ago

Helle there guys. I tried, but I cannot replicate the issue:

C:\>mkdir temp
C:\>cd temp
C:\temp\>git clone --recursive https://github.com/klezVirus/inceptor.git
Cloning into 'inceptor'...
remote: Enumerating objects: 337, done.
remote: Counting objects: 100% (337/337), done.
remote: Compressing objects: 100% (238/238), done.
remote: Total 337 (delta 91), reused 330 (delta 84), pack-reused 0
Receiving objects: 100% (337/337), 17.12 MiB | 5.88 MiB/s, done.
Resolving deltas: 100% (91/91), done.
Submodule 'inceptor/obfuscators/powershell/chameleon' (git@github.com:klezVirus/chameleon.git) registered for path 'inceptor/obfuscators/powershell/chameleon'
Cloning into 'C:/Users/d3adc0de/Desktop/temo/inceptor/inceptor/obfuscators/powershell/chameleon'...
remote: Enumerating objects: 52, done.
remote: Counting objects: 100% (52/52), done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 52 (delta 20), reused 39 (delta 11), pack-reused 0
Receiving objects: 100% (52/52), 109.63 KiB | 1.29 MiB/s, done.
Resolving deltas: 100% (20/20), done.
Submodule path 'inceptor/obfuscators/powershell/chameleon': checked out '03f3ad2f9764c8a886d15c427962a2b654a5a9d2'
C:\temp\>dir inceptor\inceptor\obfuscators\powershell\chameleon
 Volume in drive C is Windows
 Volume Serial Number is 9CA8-7D47

 Directory of C:\temp\inceptor\inceptor\obfuscators\powershell\chameleon

13/08/2021  09:54    <DIR>          .
13/08/2021  09:54    <DIR>          ..
13/08/2021  09:54             1,995 .gitignore
13/08/2021  09:54            48,880 chameleon.py
13/08/2021  09:54    <DIR>          config
13/08/2021  09:54    <DIR>          dictionary
13/08/2021  09:54             1,087 LICENSE
13/08/2021  09:54             7,445 README.md
13/08/2021  09:54    <DIR>          tools
13/08/2021  09:54    <DIR>          utils
13/08/2021  09:54                47 __init__.py
               5 File(s)         59,454 bytes
               6 Dir(s)  357,077,266,432 bytes free

Are you guys sure you are using the --recursive flag?

Closing for now, but let me know if you can't clone it correctly even with the correct flag on.

RedLectroid commented 3 years ago

I'm guessing the issue is due to grabbing the repo with the "download as zip" button instead of using git in the command line.

Not sure if that's what caused the issue for @r0ot-to0r, but confident it was for me.

klezVirus commented 3 years ago

Hi @RedLectroid. Thanks for the clarification. Of course the "download as zip" cannot handle submodules.

For anyone reading this: the only official way to install the tool is the one written in the readme.

JuraGHH commented 3 years ago

Hi,

The error I got when cloning a repository.

git clone --recursive https://github.com/klezVirus/inceptor.git Cloning into 'inceptor'... remote: Enumerating objects: 337, done. remote: Counting objects: 100% (337/337), done. remote: Compressing objects: 100% (238/238), done. remote: Total 337 (delta 91), reused 330 (delta 84), pack-reused 0 Receiving objects: 100% (337/337), 17.12 MiB | 1.91 MiB/s, done. Resolving deltas: 100% (91/91), done. Updating files: 100% (268/268), done. Submodule 'inceptor/obfuscators/powershell/chameleon' (git@github.com:klezVirus/chameleon.git) registered for path 'inceptor/obfuscators/powershell/chameleon' Cloning into '/mnt/c/Users/J/Documents/scripts/inceptor/inceptor/obfuscators/powershell/chameleon'... Warning: Permanently added the RSA host key for IP address '52.64.108.95' to the list of known hosts. git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists. fatal: clone of 'git@github.com:klezVirus/chameleon.git' into submodule path '/mnt/c/Users/J/Documents/scripts/inceptor/inceptor/obfuscators/powershell/chameleon' failed Failed to clone 'inceptor/obfuscators/powershell/chameleon'. Retry scheduled Cloning into '/mnt/c/Users/Jura/Documents/scripts/inceptor/inceptor/obfuscators/powershell/chameleon'... git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists. fatal: clone of 'git@github.com:klezVirus/chameleon.git' into submodule path '/mnt/c/Users/J/Documents/scripts/inceptor/inceptor/obfuscators/powershell/chameleon' failed Failed to clone 'inceptor/obfuscators/powershell/chameleon' a second time, aborting

Direct clone of chameleon works.

Cheers

germinalx commented 2 years ago

Hi, I have the same problem before when I tried to clone with recursive flag... It says

Please make sure you have the correct access rights and the repository exists. fatal: clone of 'git@github.com:klezVirus/chameleon.git' into submodule path 'C:/XXX/XXX/inceptor/inceptor/obfuscators/powershell/chameleon' failed Failed to clone 'inceptor/obfuscators/powershell/chameleon' a second time, aborting

klezVirus commented 2 years ago

Hi @germinalx and @JuraGHH, we had a regression error with the .gitmodules. It's fixed now, you can try downloading again, it should work as expected. If you want, you can also use the fix provided in the wiki (work in progress).