Showing posts with label endianness. Show all posts
Showing posts with label endianness. Show all posts
Friday, 27 September 2013
Sunday, 8 September 2013
Exploit exercises - Protostar - Net 3
Last network level is a bit more challenging. There are a couple of traps here. The idea of the program is like that: it reads length(16-bit) of the future input, then reads that amount of bytes. First byte of the input should have the value of 23 to proceed to login function. Buffer with input data is used as an argument to the login function.
Labels:
endianness,
exploit-exercises,
gdb,
network,
protostar,
solution,
strace,
write-up
Exploit exercises - Protostar - Net 2
Third network level requires to sum 4 integers and send result. They are provided by the server. Nothing special just use of pack and unpack methods.
Exploit exercises - Protostar - Net 1
Next level requires to convert binary integer to its string representation. All we have to do is read 4 bytes, convert bytes to int then convert it into string. Ruby have unpack method of String class to do required transformation.
Exploit exercises - Protostar - Net 0
In this task we have to work with byte ordering and ways to send/receive them. I wouldn't tell about endianness because there are a lot of good internet sources that cover it. (e.g. wiki ).
Task binary sends a number and waits when we will provide little endian version of it. Our task is to get number from incoming message, convert it into binary form and then send it backwards. To get numbet you will probably want to use regular expression which will cut out contiguous digit string between quotation marks. Then there is a fast solution in Ruby to use pack method of the Array class which allows to convert integer from string to binary. Then we will just send it and receive congratulation message.
Task binary sends a number and waits when we will provide little endian version of it. Our task is to get number from incoming message, convert it into binary form and then send it backwards. To get numbet you will probably want to use regular expression which will cut out contiguous digit string between quotation marks. Then there is a fast solution in Ruby to use pack method of the Array class which allows to convert integer from string to binary. Then we will just send it and receive congratulation message.
Subscribe to:
Posts (Atom)