INTRO TO ASSEMBLY LANGUAGE - skill assessment -TASK 2

update in case someone else has same issue: it should be nc IP PORT < shellcode.bin
If the error you get is “refused connection” then you might need to generate a new target. If the message is “shellcode failed to run” then the issue is indeed with your shellcode. Feel free to reach out if you’re stuck on this.

Hi! did you solve the task 1?

I am absolutely stuck on this one.

If someone could please give me some guidance on what to do.

I have gone through many iterations of optimized shellcode, and every time I send it to the server I get Failed to Run Shellcode error!

I am at a loss.

EDIT: I figured it out. It was all about how I was sending the shellcode to the server.

I was banging my head against the wall with this one. Just a checklist of things I should’ve done for future people. The advice above is all helpful and just verified stuff that my problems didn’t have to do with my code.

  1. I don’t know what I did differently but I reset my box after trying different shellcodes for different stuff like /bin/sh (I didn’t notice it gave us a file to fix at first). I didn’t know if I broke something, but after resetting my machine it immediately fixed it after putting in essentially the same code without null bytes for an hour or two (I tried changing around the registers and positions of stuff but they essentially did the same things).
  2. Use the assembler script. You’re using syscalls, so you need to also use ld. I kinda forgot that and just nasm’d it without doing ld and that wasted a lot of time.

Hope this helps.