concretesubmarine.com/ FORUM

Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: How can I create shellcode?


Veteran Member

Status: Offline
Posts: 53
Date:
How can I create shellcode?
Permalink   
 


I wanted to ask if there is any way how to create shellcode that will be later used in some shellcode runner.

I know that there is tool like donut that can generate position independent shellcode from executables or msfvenom that can generate shellcode to for example call process 'calc.exe' or something.

But I would like to create my own shellcode and learn something about the way how msfvenom or donut can generate these shellcodes.

For example, I would like to try to create shellcode that will print "Hello, World!" to console.

 

And the created shellcode will be used in one of my shellcode runners in python.

Is this possible?



__________________


Veteran Member

Status: Offline
Posts: 66
Date:
Permalink   
 

Shellcodes are just PIC self-contained programs. If you want to develop a shellcode, write a program that uses no global variable or imported API. You may want to look at the PEB structure. Of course this assumes you have no other constraints on your shellcode (like size or null bytes).

__________________


Veteran Member

Status: Offline
Posts: 34
Date:
Permalink   
 

Creating shellcode can be a complex task that requires a good understanding of assembly language and the target architecture. One approach is to start by writing your code in assembly language, keeping it as small and efficient as possible. Once you have your assembly code, you can use an assembler like NASM or YASM to convert it into machine code. Then, you'll need to convert the machine code into shellcode analysis. This can be done manually by removing any null bytes and other characters that might cause issues, or you can use tools like Metasploit's msfvenom to automate the process.  It's important to note that creating shellcode can be risky, as it is often used in exploits and attacks. Make sure you have permission to create and use shellcode, and always test it in a safe, controlled environment.



-- Edited by sanchewz on Wednesday 12th of June 2024 11:59:15 AM

__________________


Guru

Status: Offline
Posts: 13265
Date:
Permalink   
 

This is very interesting content! I have thoroughly enjoyed reading your points and have come to the conclusion that you are right about many of them. You are great. embajada de turquía en mónaco



__________________
Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.



Create your own FREE Forum
Report Abuse
Powered by ActiveBoard