executing shellcode

Questions about programming languages and debugging
Post Reply
bubzuru
.net coder
.net coder
Posts: 700
Joined: 17 Apr 2007, 16:00
17
Contact:

executing shellcode

Post by bubzuru »

how can i execute shellcode from a vb.net app
i know it can be done cuz it can from almost every
other language including vbscript ??


User avatar
maboroshi
Dr. Mab
Dr. Mab
Posts: 1624
Joined: 28 Aug 2005, 16:00
18

Try

Post by maboroshi »

Maybe winsock will do the trick not to familiar with VB.... But look at adding payload to a socket with winsock may help your research ;)

Edit *

This link may help http://msdn2.microsoft.com/en-us/library/ms741416.aspx basically is a reference to winsock then you just need to find the syntax for Visual Basic

bubzuru
.net coder
.net coder
Posts: 700
Joined: 17 Apr 2007, 16:00
17
Contact:

Re: Try

Post by bubzuru »

Maboroshi wrote:Maybe winsock will do the trick not to familiar with VB.... But look at adding payload to a socket with winsock may help your research ;)

Edit *

This link may help http://msdn2.microsoft.com/en-us/library/ms741416.aspx basically is a reference to winsock then you just need to find the syntax for Visual Basic
maybe if you know c you could help me
more with this

here is the c code to execute shellcode

Code: Select all

#include <stdio.h>
#include <windows.h>

char ShellCode[] = "\xEB"
"\x0F\x58\x80\x30\x95\x40\x81\x38\x68\x61\x63\x6B\x75\xF4\xEB\x05\xE8\xEC\xFF\xFF"
"\xFF\xF1\x34\xA5\x95\x95\x95\xAB\x53\xD5\x97\x95\x56\x68\x61\x63\x6B\xCD";

int main()
{
	printf("Shellcode length: %d\n", strlen(ShellCode));
	return 0;
}
now how would that look in vb ?? :?:

User avatar
floodhound2
∑lectronic counselor
∑lectronic counselor
Posts: 2117
Joined: 03 Sep 2006, 16:00
17
Location: 127.0.0.1
Contact:

Post by floodhound2 »

Please explain what you are trying to do in more detail.

Visual basic is an object oriented language, so you have to use objects already made most will not cause damage to the operating system.

Shellcode is a relocatable piece of machine code used as the payload in the exploitation of a software bug. It is called "shellcode" because it typically starts a command shell from which the attacker can control the compromised machine.

VB is going to be tricky if it can be done at all. Perhaps calling some API? Let me know what you are trying to do, but I remain skeptical on this since VB and machine code don’t flow nicely together. Personally VB is not really programming its sort of an accumulation of borrowed code.

Do you just want to execute an executable or run a .bat file?
Need more input!!!
₣£ΘΘĐĦΘŮŇĐ

bubzuru
.net coder
.net coder
Posts: 700
Joined: 17 Apr 2007, 16:00
17
Contact:

Post by bubzuru »

well id just like to execute shell code
i cant thing ov any other way to put it
here is an example in vbscript

http://goodfellas.shellcode.com.ar/own/ ... 706223.txt

i thought i could just put the shellcode into a function
then execute the function but it didn't work

i know you can do this but i just dont know how :oops:

User avatar
floodhound2
∑lectronic counselor
∑lectronic counselor
Posts: 2117
Joined: 03 Sep 2006, 16:00
17
Location: 127.0.0.1
Contact:

Post by floodhound2 »

bubzuru wrote: i know you can do this but i just dont know how :oops:

:oops: Me either- I think I could figure it out but I am lazy today.
₣£ΘΘĐĦΘŮŇĐ

Post Reply