Skip to content

Commit

Permalink
Merge pull request #55 from Mayyhem/get-secret-updates
Browse files Browse the repository at this point in the history
Added command to deobfuscate secret strings offline
  • Loading branch information
Mayyhem authored Apr 15, 2024
2 parents 7d67cfd + a92e445 commit 0130c71
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
25 changes: 25 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,31 @@ static void Main(string[] args)
// Subcommands
//

// deobfuscate command
var deobCommand = new Command("deob", "Deobfuscate a policy secret hex string");
rootCommand.Add(deobCommand);
deobCommand.Add(new Argument<string>("secret-string", "The policy secret hex string to deobfuscate"));
deobCommand.Handler = CommandHandler.Create(
(string secretString) =>
{
try
{
bool bDecryptSuccess = Helpers.DecryptDESSecret(secretString, out string deobfuscatedString);
if (bDecryptSuccess)
{
Console.WriteLine($"[+] Deobfuscated secret: {deobfuscatedString}");
}
else
{
Console.WriteLine("[!] Could not deobuscate secret!");
}
}
catch (Exception ex)
{
Console.WriteLine($"[!] Could not deobuscate secret: {ex.Message}");
}
});

// exec command
var execCommand = new Command("exec", "Execute a command, binary, or script on a client or request NTLM authentication from a client\n" +
" Permitted security roles:\n" +
Expand Down
6 changes: 3 additions & 3 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SharpSCCM")]
[assembly: AssemblyCopyright(2023 Chris Thompson (@_Mayyhem)")]
[assembly: AssemblyCopyright(2024 Chris Thompson (@_Mayyhem)")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -27,5 +27,5 @@
// Minor Version
// Revision
//
[assembly: AssemblyVersion("2.0.8")]
[assembly: AssemblyFileVersion("2.0.8")]
[assembly: AssemblyVersion("2.0.9")]
[assembly: AssemblyFileVersion("2.0.9")]
4 changes: 4 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# SharpSCCM Release Notes

### Version 2.0.9 (April 15, 2024)
##### Changes
- Added option to deobfuscate a secret string offline

### Version 2.0.8 (March 19, 2024)
##### Changes
- Fix from @subat0mik for machines that require FIPS-compliant algorithms (PR #53)
Expand Down

0 comments on commit 0130c71

Please sign in to comment.