Ok so now i got the instruction set somehow figured out, but the problem is i do not know how the two variables you have used get refreshed so to speak, because at the start of the function they get initialized at 0 and then the function calls another function which does some magic and then it initializes them to the correct things, i do not really know so i am kinda also lost as to how those two variables get initialized. My guess is that they either point to a 'memory location' inside the program in the vm or either a 'register' (also a memory location but you know, like it is a register to the vm) based on what kind of an instruction is next. So I would like to know the structure of each of the machine code operations (like which part is the opcode which part says which register to use or something like that). I now know the instruction set (roughly) but i just want to know how the vm parses the instructions so to speak and also how you implemented the 'registers' of the vm. Can you explain it to me like I am 5 years old because i am kinda lost right now. XD (here is the instruction set i have figured out sorta (some parts are a shot in the dark): https://pastebin.com/vyJajfeF) |
==> |
I am a bit stuck. SPOILERALERT i know it is a vm of some kind but i do not know which variable is the instruction pointer and which variable is the stack pointer and which variable is the instruction register of the vm so it is quite hard for me to decipher the instruction set of the vm. Any help? |
==> |
SPOILERALERTPARTIALSOLUTIONSPOILERALERTPARTIALSOLUTIONSPOILERALERTPARTIALSOLUTIONSPOILERALERTPARTIALSOLUTION
Do NOT read this if you do not want the challenge to be spoiled!!!!
why does this not work? (python2)
import struct
padding = "g/bin/sh\x00QEZz0YPYGti4vBCKQ45XiBJycuSFfXDryxwoH04XteKs6gCSIsmJoQgD3OGiAUj" #"gQ3vlXjt1QEZz0YPYGti4vBCKQ45XiBJycuSFfXDryxwoH04XteKs6gCSIsmJoQgD3OGiAUj"
eip = struct.pack("L", 0x7ffff7a33440)
nops = "\x90"*100
payload = "\xcc\xcc\xcc\xcc"
print(padding + eip + nops + payload)
igonre the payload and the comment.
Do NOT read this if you do not want the challenge to be spoiled!!!!
SPOILERALERTPARTIALSOLUTIONSPOILERALERTPARTIALSOLUTIONSPOILERALERTPARTIALSOLUTIONSPOILERALERTPARTIALSOLUTIONSPOILERALERTPARTIALSOLUTIONSPOILERALERTPARTIALSOLUTION |
==> |
Never mind. |
==> |
I am an absolute noob. The zip file asking for password,but is this the challenge or is the passwords told somewhere? |
==> |