ahmedkhlief / Ninja

Open source C2 server created for stealth red team operations
776 stars 169 forks source link

[-] ERROR(main): Object type <class 'str'> cannot be passed to C code #20

Open whydee86 opened 3 years ago

whydee86 commented 3 years ago

Unfortunately, every command that I am running causes the c2 server to collapse.

whydee86 commented 3 years ago

image

ahmedkhlief commented 3 years ago

Hi what type of agent you arw using ?

On Wed, 13 Oct 2021, 6:34 pm whydee86, @.***> wrote:

[image: image] https://user-images.githubusercontent.com/43274863/137154627-217feb73-c8fb-4c34-ab04-00c697ab2144.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ahmedkhlief/Ninja/issues/20#issuecomment-942370187, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF43ESDCH7R7EGABBN5GUNLUGWKIHANCNFSM5F5LQUCQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

whydee86 commented 3 years ago

Thank you for your reply. What do you mean by type of agent? I am using PowerShell payload, and the client is windows 10 64bit.

zAbuQasem commented 2 years ago

Thank you for your reply. What do you mean by type of agent? I am using PowerShell payload, and the client is windows 10 64bit.

I guess this is a dependency issue.. if you are still using the tool, can you confirm if the issue is still occurring?

zAbuQasem commented 2 years ago

I guess this could be fixed by editing the data variable to:

data = aes.IV  + aes.encrypt(data.encode("utf-8")) 

in the following line:

https://github.com/ahmedkhlief/Ninja/blob/8add2e0d39ae411f1f33fc7d73e8be4dec5023d6/core/Encryption.py#L64