Thread: i dont realy get this explain some one?

  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    6

    Unhappy i dont realy get this explain some one?

    # run calc.exe
    my $shellcode =
    "\xfc\xe8\x44\x00\x00\x00\x8b\x45\x3c\x8b\x7c\x05\ x78\x01\xef\x8b".
    "\x4f\x18\x8b\x5f\x20\x01\xeb\x49\x8b\x34\x8b\x01\ xee\x31\xc0\x99".
    "\xac\x84\xc0\x74\x07\xc1\xca\x0d\x01\xc2\xeb\xf4\ x3b\x54\x24\x04".
    "\x75\xe5\x8b\x5f\x24\x01\xeb\x66\x8b\x0c\x4b\x8b\ x5f\x1c\x01\xeb".
    "\x8b\x1c\x8b\x01\xeb\x89\x5c\x24\x04\xc3\x31\xc0\ x64\x8b\x40\x30".
    "\x85\xc0\x78\x0c\x8b\x40\x0c\x8b\x70\x1c\xad\x8b\ x68\x08\xeb\x09".
    "\x8b\x80\xb0\x00\x00\x00\x8b\x68\x3c\x5f\x31\xf6\ x60\x56\x89\xf8".
    "\x83\xc0\x7b\x50\x68\x7e\xd8\xe2\x73\x68\x98\xfe\ x8a\x0e\x57\xff".
    "\xe7\x63\x61\x6c\x63\x2e\x65\x78\x65\x00";

    how come this code invoke calc.exe?
    this code is written in perl how does it look if its written in c++?
    im a newbie when it comes to cpp

    thank you

    // Ogelami
    Last edited by ogelami; 05-18-2008 at 07:53 AM.

  2. #2
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Call me crazy, but if you have a question about Perl code, it might be better to ask in a Perl forum.

  3. #3
    Registered User
    Join Date
    May 2008
    Posts
    6
    Quote Originally Posted by medievalelks View Post
    Call me crazy, but if you have a question about Perl code, it might be better to ask in a Perl forum.

    no its not about perl, im just asking how to make such code in c++
    and how it works =))

  4. #4
    The larch
    Join Date
    May 2006
    Posts
    3,573
    Well, the last characters (before 0) are ascii codes spelling "calc.exe". The rest looks pretty much like garbage.

    One way to launch another program is system:
    Code:
    #include <cstdlib>
    
    int main()
    {
        system("calc.exe");
    }
    There are better ways, though.
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  5. #5
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    This looks suspiciously like a payload for a vulnerability exploit.

    Please note that according to the forum rules, all posts related to cracking are strictly forbidden.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  6. #6
    Registered User
    Join Date
    May 2008
    Posts
    6
    Quote Originally Posted by anon View Post
    Well, the last characters (before 0) are ascii codes spelling "calc.exe". The rest looks pretty much like garbage.

    One way to launch another program is system:
    Code:
    #include <cstdlib>
    
    int main()
    {
        system("calc.exe");
    }
    There are better ways, though.


    yes i do know that but is there a way to make it hex encoded or what its called?

    ,,

    yes it's a payload but the purpose is not to exploit...
    so im not breaking any rules can some one explain?


    and if i am breaking any rules tell me.
    Last edited by ogelami; 05-18-2008 at 07:51 AM.

  7. #7
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    The rule is about all posts related to cracking. Unfortunately, we are not mind readers and cannot know your purpose for real. For this reason, we have a very simple stance on the application of the rule. If you want more information, you'll have to find it on your own.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can you explain these bitwise operations?
    By 6tr6tr in forum C++ Programming
    Replies: 6
    Last Post: 10-29-2008, 01:19 PM
  2. Replies: 6
    Last Post: 08-23-2008, 01:16 PM
  3. One Easy" C " Question. Please Solve and Explain.
    By RahulDhanpat in forum C Programming
    Replies: 18
    Last Post: 03-24-2008, 01:39 PM
  4. Please Explain me few terms that i have listed in here.
    By chottachatri in forum C++ Programming
    Replies: 3
    Last Post: 02-26-2008, 08:20 AM
  5. Can someone explain "extern" to me?
    By valar_king in forum C++ Programming
    Replies: 3
    Last Post: 09-16-2001, 12:22 AM