Results 1 to 11 of 11

Thread: send an opcode

  1. #1
    Tequila_Burp is offline Member
    Join Date
    Sep 2008
    Posts
    6
    Rep Power
    0

    Default send an opcode

    How do i send an opcode with a socket
    what type of variable should i use o.O

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  3. #3
    Tequila_Burp is offline Member
    Join Date
    Sep 2008
    Posts
    6
    Rep Power
    0

    Default

    probably both =s

    am doing a little research with buffer overflows attacks and i want to send a shellcode and the EIP. But I don't know how to program in c or those kind of languages. I am about to finish doing the exploit. All I need is to know what type of variable i use to send the opcode. And am using a socket to send it.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default

    to send the opcode
    What do you mean by "opcode"? Is it machine language byte(s)?
    Where would you get the values for the machine you are running on?
    BTW I programmed machine language for many years. I don't understand what you want opcodes for.

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default

    Yes, opcode is an abbreviation for operation code.
    For example 0x47 is the opcode for a branch instruction on IBM 360

    I guess the question is: what operations are being asked about?
    Are we operating a piece of machinery or a software system or a business???

  7. #7
    Tequila_Burp is offline Member
    Join Date
    Sep 2008
    Posts
    6
    Rep Power
    0

    Default

    yes operation code.

    i have them on a text file.

    for example when i send them as a string the computer interpretates it as hex numbers.

    I send an A its a 41
    I send an its a 18
    I send an its a 16
    I send an its a 12
    how am i suppose to send a 00 ???

    i trying to know if there is another way to send the code.

    edit: this kind of exploits are always written in C, perl, python... is it possible to write them in java?
    edit2: by some reason the forum doesn't recognize special characters
    Last edited by Tequila_Burp; 09-30-2008 at 07:30 PM.

  8. #8
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default

    What do you mean by "send". There are I/O streams that are used to send bytes. One of them can write hex values from 00 to 255.
    Look at the API doc for OutputStream. Its extensions handle bytes vs characters

  9. #9
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    And me to Norm, have no idea what's he going to do with opcode in Java. Seems to me, useless. ;)

  10. #10
    fishtoprecords's Avatar
    fishtoprecords is offline Senior Member
    Join Date
    Jun 2008
    Posts
    571
    Rep Power
    7

    Default

    Quote Originally Posted by Eranga View Post
    Seems to me, useless. ;)
    Give the OP a day or so more to clarify his question, which is at best poorly phrased, or close the thread.

  11. #11
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    operation code is a portion of machine language instruction which are used to specify operations to be perform. There format are laid out in the instruction set architecture on the CPU.

    So depending on the architecture operands on those process may be register values, values in a stack, different memory values, I/O ports, and many more to go. In operations normal process are valid, both arithmetic and logic operations. Program controls and some special instructions are also used.

    So obviously best way to deal with opcodes is low level languages, such as C/C++.


Similar Threads

  1. how to send SMS using Java API
    By sanjeevtarar in forum Advanced Java
    Replies: 4
    Last Post: 09-13-2009, 03:15 PM
  2. send email using JMS
    By Heather in forum Advanced Java
    Replies: 9
    Last Post: 01-07-2009, 03:04 PM
  3. Send an array via Socket
    By lene in forum Networking
    Replies: 0
    Last Post: 04-23-2008, 04:29 PM
  4. CookieManager doesn't send cookies?
    By Zer0 in forum Networking
    Replies: 0
    Last Post: 02-03-2008, 05:07 PM
  5. send files through socket
    By bbq in forum Advanced Java
    Replies: 1
    Last Post: 06-05-2007, 02:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •