Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during compilation on Ubuntu system #12

Open
better84 opened this issue Apr 7, 2023 · 0 comments
Open

Error during compilation on Ubuntu system #12

better84 opened this issue Apr 7, 2023 · 0 comments

Comments

@better84
Copy link

better84 commented Apr 7, 2023

Hello @bats3c this is a great tool! I've been using Darkarmour for a little while now on a malware evasion/defense project, and I've recently started seeing some odd behavior in the compilation process. Any insight you can provide is greatly appreciated.

The error stack is below with system and other configuration details.

Ubuntu: Linux NAME 5.14.0-1056-oem #63-Ubuntu SMP Fri Dec 16 14:32:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

mingW: x86_64-w64-mingw32-gcc (GCC) 10-win32 20220113

Darkarmour command: python3 darkarmour.py -f {inPath}{self.fname} -e xor -b -j -o {BUILDPATH}{self.fname} -l 2

Python/Conda stuff:

_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
backports-weakref         1.0rc1                   pypi_0    pypi
bleach                    1.5.0                    pypi_0    pypi
ca-certificates           2022.12.7            ha878542_0    conda-forge
cached-property           1.5.2                    pypi_0    pypi
certifi                   2022.12.7                pypi_0    pypi
chainer                   2.0.1                    pypi_0    pypi
chainerrl                 0.2.0                    pypi_0    pypi
chardet                   3.0.4                    pypi_0    pypi
charset-normalizer        2.0.12                   pypi_0    pypi
dataclasses               0.8                      pypi_0    pypi
decorator                 5.1.1                    pypi_0    pypi
filelock                  3.4.1                    pypi_0    pypi
future                    0.18.3                   pypi_0    pypi
gym                       0.9.2                    pypi_0    pypi
h5py                      2.7.0                    pypi_0    pypi
html5lib                  0.9999999                pypi_0    pypi
idna                      2.5                      pypi_0    pypi
importlib-metadata        4.8.3                    pypi_0    pypi
ipython                   6.1.0                    pypi_0    pypi
ipython-genutils          0.2.0                    pypi_0    pypi
jedi                      0.18.2                   pypi_0    pypi
keras                     2.0.5                    pypi_0    pypi
keras-rl                  0.3.0                    pypi_0    pypi
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
libffi                    3.2.1             he1b5a44_1007    conda-forge
libgcc-ng                 12.2.0              h65d4601_19    conda-forge
libgomp                   12.2.0              h65d4601_19    conda-forge
libsqlite                 3.40.0               h753d276_0    conda-forge
libstdcxx-ng              12.2.0              h46fd767_19    conda-forge
libzlib                   1.2.13               h166bdaf_4    conda-forge
lief                      0.9.0                    pypi_0    pypi
markdown                  3.3.7                    pypi_0    pypi
ncurses                   6.3                  h27087fc_1    conda-forge
nose                      1.3.7                    pypi_0    pypi
numpy                     1.13.1                   pypi_0    pypi
openssl                   1.1.1t               h0b41bf4_0    conda-forge
parso                     0.8.3                    pypi_0    pypi
pexpect                   4.8.0                    pypi_0    pypi
pickleshare               0.7.5                    pypi_0    pypi
pillow                    8.4.0                    pypi_0    pypi
pip                       21.3.1             pyhd8ed1ab_0    conda-forge
prompt-toolkit            1.0.18                   pypi_0    pypi
protobuf                  3.19.6                   pypi_0    pypi
ptyprocess                0.7.0                    pypi_0    pypi
pyglet                    2.0.5                    pypi_0    pypi
pygments                  2.14.0                   pypi_0    pypi
python                    3.6.9           h9d8adfe_0_cpython    conda-forge
python_abi                3.6                     2_cp36m    conda-forge
pyyaml                    6.0                      pypi_0    pypi
readline                  8.1.2                h0f457ee_0    conda-forge
requests                  2.18.1                   pypi_0    pypi
scikit-learn              0.18.2                   pypi_0    pypi
scipy                     0.19.1                   pypi_0    pypi
setuptools                58.0.4           py36h5fab9bb_2    conda-forge
simplegeneric             0.8.1                    pypi_0    pypi
six                       1.16.0                   pypi_0    pypi
sklearn                   0.0                      pypi_0    pypi
sqlite                    3.40.0               h4ff8645_0    conda-forge
tensorflow                1.2.1                    pypi_0    pypi
theano                    0.9.0                    pypi_0    pypi
tk                        8.6.12               h27826a3_0    conda-forge
torch                     1.10.1+cu111             pypi_0    pypi
torchaudio                0.10.1                   pypi_0    pypi
torchvision               0.11.2                   pypi_0    pypi
traitlets                 4.3.3                    pypi_0    pypi
typing-extensions         4.1.1                    pypi_0    pypi
urllib3                   1.21.1                   pypi_0    pypi
wcwidth                   0.2.6                    pypi_0    pypi
werkzeug                  2.0.3                    pypi_0    pypi
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
zipp                      3.6.0                    pypi_0    pypi
zlib                      1.2.13               h166bdaf_4    conda-forge
src/jmp_loader/main.c:137:28: error: ‘key1’ undeclared (first use in this function); did you mean ‘key0’?
  137 |       decrypted_bytes[i] = key1 ^ image_crypt[i];
      |                            ^~~~
      |                            key0
src/jmp_loader/main.c:137:28: note: each undeclared identifier is reported only once for each function it appears in
src/jmp_loader/main.c:277:28: error: ‘key2’ undeclared (first use in this function); did you mean ‘key0’?
  277 |       decrypted_bytes[i] = key2 ^ image_crypt[i];
      |                            ^~~~
      |                            key0
Traceback (most recent call last):
  File "darkarmour.py", line 116, in <module>
    darkarmour.run(vars(ap.parse_args()))
  File "darkarmour.py", line 96, in run
    self._do_crypt()
  File "darkarmour.py", line 90, in _do_crypt
    self._do_jmp()
  File "darkarmour.py", line 60, in _do_jmp
    self.compile_binary.compile("src/jmp_loader/main.c", self.out_file)
  File "/DATA/<>/github/darkarmour/lib/compile.py", line 15, in compile
    subprocess.run(["x86_64-w64-mingw32-gcc", path, "-o", outfile, "-static"], check=True)
  File "/DATA/<>/miniconda3/envs/rlkit1/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['x86_64-w64-mingw32-gcc', 'src/jmp_loader/main.c', '-o', '/DATA/<>/tools/xoutput/rlkit/build/rootkit/26ab95008cf635c1641456b4c75c4c605f08f56a2c677389c71b81664287859c', '-static']' returned non-zero exit status 1.```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant