Perl doesn't print 0x00

1

1

I wanted to experiment with the NOP SLED technique. I got the sled and the shellcode into an environment variable and I got its address.
So i wanted to execute the vulnerable program and as an argument use this address repeated, the problem is that it contain 0s (zeros): 0x00007fffffffe550

./program_vuln $(perl -e 'print "\x50\xe5\xff\xff\xff\x7f\x00\x00"')

Perl does not print the zeroes and the addressing in the stack became so messed up.

java_noob

Posted 2015-08-09T19:15:07.330

Reputation: 13

1This appears to be a perl use question and not an InfoSec question. – schroeder – 2015-08-09T19:19:13.873

perl used in infoSec :) – None – 2015-08-09T19:20:49.607

But a perl expert with 0 knowledge of InfoSec could also answer this question, no? – schroeder – 2015-08-09T19:24:02.503

While the application is InfoSec, the underlying problem is not an InfoSec problem - it's a Perl problem. – S.L. Barth - Reinstate Monica – 2015-08-09T19:24:36.417

Are you sure this belongs on Super User? This sort of question is about programming and it likely belongs on [so] instead. – bwDraco – 2015-08-09T19:27:39.907

problem solved by Steffen Ullrich while you guys are talking about if it is the right place to post this question – java_noob – 2015-08-09T19:33:28.830

Answers

1

This is not a problem with perl because it is obviously printing the 0x00:

perl -e 'print "\x50\xe5\xff\xff\xff\x7f\x00\x00"' | hd
00000000  50 e5 ff ff ff 7f 00 00                           |P.......|
00000008

Steffen Ullrich

Posted 2015-08-09T19:15:07.330

Reputation: 3 897

What worked like a charm here? The stack isn't messed up anymore? – ott-- – 2015-08-09T20:16:43.580