1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-04-18 07:11:12 +02:00
OJ c7f7bc2fc0
Remove method strings from TLV packets
We now use ints, and hopefully this means we don't have as much obvious
stuff in the binaries!

```
$ # Before:
$ strings metsrv.x86.dll | grep core_ | wc -l
46
$ # After:
$ strings metsrv.x86.dll | grep core_ | wc -l
0
```
Big win, and it's even bigger for the likes of stdapi.

Had to fix a bunch of other stuff along the way, including a subtle
issue with the Powershell Meterp bindings.
2020-04-28 23:41:06 +10:00

28 lines
759 B
C#
Executable File

using MSF.Powershell;
using MSF.Powershell.Meterpreter;
using System;
using System.Collections.Generic;
using System.Text;
namespace MSF.PowershellTester
{
class Program
{
static void Main(string[] args)
{
//var x = MSF.Powershell.Runner.Get("Default");
//System.Console.Write(x.Execute("$x = $(whoami)"));
//System.Console.Write(x.Execute("$x"));
//MSF.Powershell.Runner.Remove("Default");
Tlv t = new Tlv();
t.Pack(TlvType.ElevateTechnique, 1);
t.Pack(TlvType.ElevateServiceName, "abcd1234");
var x = t.ToRequest(CommandId.PrivElevateGetsystem);
var y = 0;
y++;
}
}
}