Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fededim authored Jan 31, 2024
1 parent 8915e70 commit d7b921a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# BinaryToPowershellScript © 2023 Federico Di Marco
A simple C# console application to recreate one or more binary files through a Powershell script. You can choose 2 formats: as an explicit **byte array** (default option, either in hex or decimal format, bigger in size, but it should be more difficult to be detected) or as a **base64** string (option -b, it is shorter). By default it will generate a script file for all specified input files with the **_script.ps1** suffix, if the option -s is specified it will generate a single script called either **SingleScript.ps1**. The generated script should work both on standard PowerShell (tested on 5.1.22621.1778) and PowerShell Core (tested on 7.3.7).
<br />
Note: In order to bypass the most hardened environments I have implemented the same C# code also in Powershell, you can find it [here](https://github.com/fededim/BinaryToPowershellScript/blob/master/BinaryToPowershellScript/BinaryToPowershellScript.ps1) together with C# code. To bypass Powershell execution policies you can simply copy the code and paste it inside a Powershell console and hit return, after having done this you can convert any file you want just by calling the function BinaryToPowershellScript with the same below parameters.

CodeProject detailed article about how to use this code:
[How to Transform Binary Files into Powershell Script(s) in Order to Copy them Silently on a Server](https://www.codeproject.com/Articles/5369565/How-to-Transform-Binary-Files-into-Powershell-Scri)
In order to bypass the most hardened environments I have implemented the same C# code also in Powershell, you can find it [here](https://github.com/fededim/BinaryToPowershellScript/blob/master/BinaryToPowershellScript/BinaryToPowershellScript.ps1) together with C# code. To bypass Powershell execution policies you can simply copy the code and paste it inside a Powershell console and hit return, after having done this you can convert any file you want just by calling the function BinaryToPowershellScript with the same below parameters.

CodeProject detailed article about how to use this code: [How to Transform Binary Files into Powershell Script(s) in Order to Copy them Silently on a Server](https://www.codeproject.com/Articles/5369565/How-to-Transform-Binary-Files-into-Powershell-Scri)

# Usage

Expand Down

0 comments on commit d7b921a

Please sign in to comment.