Skip to content

Commit

Permalink
Fix Arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Cn33liz committed Oct 22, 2019
1 parent 4c8f1c1 commit 746eff6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 7 additions & 1 deletion README.md
Expand Up @@ -13,7 +13,13 @@ The tool uses the following registry path in which it creates the hidden run key
To Create hidden registry (Run) key:

```
SharpHide.exe action=create keyvalue="C:\Windows\Temp\Bla.exe arg1 arg2"
SharpHide.exe action=create keyvalue="C:\Windows\Temp\Bla.exe"
```

To Create a hidden registry (Run) key with parameters:

```
SharpHide.exe action=create keyvalue="C:\Windows\Temp\Bla.exe" arguments="arg1 arg2"
```

Delete hidden registry (Run) key:
Expand Down
5 changes: 3 additions & 2 deletions SharpHide/Program.cs
Expand Up @@ -10,7 +10,8 @@ class Program
static void Usage()
{
Console.WriteLine("\r\n[+] SharpHide");
Console.WriteLine("[+] Create hidden registry (Run) key:\r\n SharpHide.exe action=create keyvalue=\"C:\\Windows\\Temp\\Bla.exe arg1 arg2\"");
Console.WriteLine("[+] Create hidden registry (Run) key:\r\n SharpHide.exe action=create keyvalue=\"C:\\Windows\\Temp\\Bla.exe\"");
Console.WriteLine("[+] Create hidden registry (Run) key with parameters:\r\n SharpHide.exe action=create keyvalue=\"C:\\Windows\\Temp\\Bla.exe\" arguments=\"arg1 arg2\"");
Console.WriteLine("[+] Delete hidden registry (Run) key:\r\n SharpHide.exe action=delete");
}

Expand Down Expand Up @@ -179,7 +180,7 @@ static void Main(string[] args)
}
}
else {
UNICODE_STRING ValueData = new UNICODE_STRING("\"" + arguments["keyvalue"] + "\"");
UNICODE_STRING ValueData = new UNICODE_STRING("\"" + arguments["keyvalue"] + "\" " + arguments["arguments"]);
Status = NtSetValueKey(regKeyHandle, ValueNamePtr, 0, RegistryKeyType.REG_SZ, ValueData.buffer, ValueData.MaximumLength);
if (Status.Equals(STATUS_SUCCESS)) {
Console.WriteLine("[+] Key successfully created.");
Expand Down

0 comments on commit 746eff6

Please sign in to comment.