root@kali:~/slae/assembly/shellcode/execve# objdump -d sh -M intel sh: file format elf32-i386 Disassembly of section .text: 08049000 <_start>: 8049000: 31 c0 xor eax,eax 8049002: 50 push eax 8049003: 68 6e 2f 73 68 push 0x68732f6e 8049008: 68 2f 2f 62 69 push 0x69622f2f 804900d: 89 e3 mov ebx,esp 804900f: 50 push eax 8049010: 89 e2 mov edx,esp 8049012: 53 push ebx 8049013: 89 e1 mov ecx,esp 8049015: b0 0b mov al,0xb 8049017: cd 80 int 0x80 root@kali:~/slae/assembly/shellcode/execve# objdump -d sh |grep '[0-9a-f]:'|grep -v 'file'|cut -f2 -d:|cut -f1-6 -d' '|tr -s ' '|tr '\t' ' '|sed 's/ $//g'|sed 's/ /\\x/g'|paste -d '' -s |sed 's/^/"/'|sed 's/$/"/g' | sed 's/"//g' | sed 's/\\/0/g' |sed 's/.\{4\}/&,/g' | sed s/.$// 0x31,0xc0,0x50,0x68,0x6e,0x2f,0x73,0x68,0x68,0x2f,0x2f,0x62,0x69,0x89,0xe3,0x50,0x89,0xe2,0x53,0x89,0xe1,0xb0,0x0b,0xcd,0x80
Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?
You must be signed in to comment.
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: