Compare commits

...
2526 Commits
Author SHA1 Message Date
moloch-- 0acc6911d8 Tweak ai mode init 2026-03-26 16:59:27 -07:00
moloch-- 4ca026906b Merge master 2026-03-26 15:54:00 -07:00
moloch-- 97a249e28e Implement http auth for mcp 2026-03-26 15:32:26 -07:00
moloch-- 9f331687d3 wip on agentic actions 2026-03-24 19:06:47 -07:00
Joe 14d68d6fcd Merge pull request #2225 from BishopFox/ai/tui2
Ai/tui
2026-03-22 08:36:46 -07:00
moloch-- 05c5334fea Switch to openai sdk 2026-03-21 09:23:49 -07:00
moloch-- d277a14c57 Add examples dir 2026-03-21 08:29:27 -07:00
moloch-- a7b5dbe6ee Tweak colors for user blocks 2026-03-20 20:29:28 -07:00
moloch-- c188dc1e69 Make messages copy-able 2026-03-20 20:19:02 -07:00
moloch-- 9fc9d1762e Merge branch 'master' into ai/tui2 2026-03-20 20:00:05 -07:00
Joe 4ef86448d0 Merge pull request #2224 from BishopFox/clean-makefile
Cleanup makefile vars
2026-03-20 08:22:50 -07:00
moloch-- 02117a6072 Cleanup makefile vars 2026-03-20 07:51:48 -07:00
moloch-- c272c8abac Update mcp dep 2026-03-19 09:26:17 -07:00
moloch-- cdf2412b39 Update mcp dep 2026-03-19 09:25:56 -07:00
moloch-- 40f52791d3 Update gprc dep 2026-03-19 08:55:25 -07:00
moloch-- a5d8bd16b9 Merge branch 'master' of github.com:BishopFox/sliver 2026-03-19 08:53:40 -07:00
moloch-- bf113f2151 npm update 2026-03-19 08:53:29 -07:00
moloch-- 4cd010afb9 wip on copy/paste 2026-03-19 08:52:46 -07:00
Joe 04b0bdd199 Merge pull request #2222 from skoveit/fix/alias-save-beacon-hostname
fix: populate hostname from beacon when using --save flag
2026-03-16 19:05:11 -07:00
Joe 9682db93b3 Merge branch 'master' into fix/alias-save-beacon-hostname 2026-03-16 18:47:06 -07:00
Joe 1d7ffb4ac2 Merge pull request #2221 from BishopFox/ai/tui
Ai/tui
2026-03-16 18:46:53 -07:00
0xOral c5e7cd6354 fix: use beacon.GetHostname() instead of direct field access 2026-03-17 03:16:19 +02:00
0xOral b20ba7284b fix: use beacon hostname when saving output with --save flag 2026-03-17 02:59:00 +02:00
moloch-- 49498210f8 Fix WireGuard generate test IP collisions 2026-03-16 17:20:33 -07:00
moloch-- 14e9121302 Go 1.25.8 2026-03-15 20:25:02 -07:00
moloch-- 8bd0257dd9 Go 1.25.8 2026-03-15 20:14:18 -07:00
Joe 93fdfb3add Merge branch 'master' into ai/tui 2026-03-15 20:03:27 -07:00
moloch-- e02b03cc70 Go 1.25.7 2026-03-15 20:03:01 -07:00
Joe 6831fe50a6 Merge pull request #2220 from skoveit/feat/multi-protocol-beacons
feat: multi-protocol implant builds via TUI
2026-03-15 20:02:36 -07:00
moloch-- 405108866d Update gh action workflows to 1.26.1 2026-03-15 15:34:34 -07:00
moloch-- 4d551b71e7 Fix huh form rendering 2026-03-15 14:11:33 -07:00
moloch-- a7edd9838d Sync prompt to stdout 2026-03-15 13:50:04 -07:00
moloch-- 9ef54ca6b1 Add mouse support to ai tui 2026-03-15 12:48:43 -07:00
moloch-- 4622c50288 Add ai chat sync 2026-03-15 12:26:03 -07:00
moloch-- b1ee0355af isolate multiplayer wg from c2 wg 2026-03-15 11:51:09 -07:00
moloch-- 01d9b213f2 fix grpc/mtls+wg for multiplayer 2026-03-15 11:11:27 -07:00
moloch-- f56886bce5 Merge grpc/mtls+wg branch 2026-03-15 10:55:50 -07:00
moloch-- 88176dfd00 Improve docs command 2026-03-15 10:31:41 -07:00
moloch-- 45dc3ea09b Improve doc file selector 2026-03-15 10:25:38 -07:00
moloch-- 682b3c2409 Upgrade to charm v2 libs 2026-03-15 09:47:29 -07:00
moloch-- 3a93f312b4 Add optional Wireguard multiplayer 2026-03-15 09:38:54 -07:00
moloch-- 2ca95f7a7c Add docs command 2026-03-15 09:21:24 -07:00
moloch-- d2319432ab Create docs go pkg 2026-03-15 08:53:52 -07:00
moloch-- 253f1a8806 Create docs go pkg 2026-03-15 08:52:05 -07:00
moloch-- 2c025d5970 Add new conversation modal 2026-03-15 07:56:11 -07:00
moloch-- f0034683f9 Tweak tui borders 2026-03-15 07:16:45 -07:00
moloch-- 8e8398b654 Tweak border 2026-03-14 23:20:07 -07:00
moloch-- aa02293f05 Fix borders 2026-03-14 22:34:58 -07:00
moloch-- f967a32308 Add scrollbar 2026-03-14 22:22:46 -07:00
moloch-- 99ec812455 Improve scroll of conversation pane, move context info to modal 2026-03-14 22:08:28 -07:00
moloch-- eeef542eeb Make conversation scrollable 2026-03-14 21:48:54 -07:00
moloch-- 6d7a10b392 Switch to fantasy to call models 2026-03-14 21:22:01 -07:00
Joe ca40c0a1e7 Merge pull request #2219 from BishopFox/fix/windows-ci
Fix Windows CI
2026-03-14 20:48:12 -07:00
moloch-- 4a5ad6ea92 Redesign delete modal 2026-03-14 20:13:02 -07:00
moloch-- 266dabf6c3 Redesign modals 2026-03-14 20:03:49 -07:00
moloch-- a4c8968539 Resize tui on window resize 2026-03-14 18:54:09 -07:00
moloch-- 613c030ea3 Add markdown rendering 2026-03-14 15:38:54 -07:00
moloch-- 9f6bfb6714 Working animation 2026-03-14 15:27:35 -07:00
0xOral a764814a8e ux: refine reconfig command warnings and safety prompts 2026-03-14 23:16:30 +02:00
0xOral 0c9ce138a0 allow runtime protocol switching 2026-03-14 22:54:25 +02:00
0xOral 6c1dcf6a06 add flags to include multiple transport protocols at build time 2026-03-14 22:53:33 +02:00
moloch-- fffe93819d Improve server-side ai grpc handlers 2026-03-14 13:31:32 -07:00
moloch-- 635ee421e3 Add animation 2026-03-14 12:54:20 -07:00
moloch-- 3ce6d69474 Add server-side ai-config form 2026-03-14 12:00:28 -07:00
moloch-- cd523c7f77 Wire tui to ai grpc 2026-03-14 11:43:21 -07:00
moloch-- 1f1b759914 Merge branch 'codex/add-bubbletea-ai-tui-layout' into ai/tui 2026-03-14 11:15:14 -07:00
moloch-- b78915fcbd Basic db layout 2026-03-14 11:14:54 -07:00
moloch-- fa0e13a5cc Basic tui layout 2026-03-14 11:14:03 -07:00
moloch-- 924bcddfd2 Fix gogo test on Windows 2026-03-14 10:25:34 -07:00
moloch-- affbf61452 Fix unit test on windows 2026-03-14 09:57:52 -07:00
moloch-- 7c6b2f70e4 Add windows ci runner 2026-03-14 08:42:57 -07:00
moloch-- c46f2938de Fix cross-platform issues with running ci on windows 2026-03-14 08:37:31 -07:00
moloch-- b355fe70d6 Add Windows makefile 2026-03-13 16:14:11 -07:00
moloch-- 10b1079286 Tweak agents.md 2026-03-13 15:29:45 -07:00
Joe 9c042e6977 Merge pull request #2217 from BishopFox/fix/cert-revoke
Improve operator cert revocation
2026-03-13 12:04:26 -07:00
Joe 62583cac8f Merge branch 'master' into fix/cert-revoke 2026-03-13 11:02:34 -07:00
moloch 95764945b8 Improve operator cert revocation 2026-03-13 10:59:00 -07:00
Joe 26abda1c15 Merge pull request #2216 from skoveit/fix/timeout-int64p-mismatch
fix: timeout flag ignored in aliases and extensions due to type mismatch
2026-03-13 07:38:21 -07:00
moloch 01dd3cac72 Go mod tidy 2026-03-13 07:02:06 -07:00
0xOral f8faa1f767 fix: normalize all command timeout flags to Int64P across client codebase 2026-03-13 02:49:01 +02:00
0xOral a9e48e84cd fix: extension timeout flag ignored due to IntP/Int64P mismatch 2026-03-13 02:30:55 +02:00
0xOral 9d6704d925 fix: alias -t flag always capped at 30s due to IntP/Int64P type mismatch (#2183) 2026-03-13 02:04:35 +02:00
Joe ce5157e2e9 Merge pull request #2213 from skoveit/fix/wininet-handle-leak
fix(wininet): Fix handle leak in WinINet driver
2026-03-11 08:29:42 -07:00
0xOral 7d19051df8 fix(wininet): close connection and request handles after each request 2026-03-11 01:32:27 +02:00
Joe a0d3bd579f Merge pull request #2211 from skoveit/feat/configurable-portfwd-keepalive
feat: make TCP keepalive period configurable for portfwd and rportfwd
2026-03-08 10:36:42 -07:00
0xOral 82c309632a default keepalive value 30s for both rportfwd and portfwd 2026-03-08 17:27:27 +02:00
0xOral 5c0b8ec460 disable keepalive with --keepalive -1 value 2026-03-08 17:25:06 +02:00
0xOral 7791a86eb4 configurable keepalive: portfwd --keepalive 2026-03-08 17:20:35 +02:00
Joe 7ac4db3fa0 Merge pull request #2207 from BishopFox/fix/beacon-getsystem
Fix for getsystem in beacon mode
2026-03-05 18:31:39 -07:00
moloch-- 512bc822ef Implement fix for getsystem in beacon mode 2026-03-05 08:22:42 -08:00
Joe f2bb9c3733 Merge pull request #2205 from BishopFox/feature/lazy-lg-msg
Lazy spool large messages to disk
2026-03-04 15:40:56 -07:00
moloch-- 0bd4f100fd Lazy spool large messages to disk 2026-03-04 14:21:07 -08:00
Joe 3230322fd6 Merge pull request #2201 from BishopFox/feature/exec-shellcode
Add support for wasm-donut options in windows `execute-shellcode`
2026-03-02 08:23:49 -07:00
moloch-- 82d979436b Add support for additional wasm-donute options in windows execute-shellcode 2026-03-01 22:35:37 -08:00
Joe d2632e75bd Merge pull request #2199 from BishopFox/feature/go-tests2
Refactor unit tests to not write to main db
2026-03-01 09:47:23 -07:00
moloch-- a55831fb44 Go v1.25.7 2026-02-28 22:39:46 -08:00
moloch-- 39d4edec43 Tweak go-tests.sh 2026-02-28 22:08:59 -08:00
moloch-- bbdb08e7a4 Refactor go-tests.sh 2026-02-28 14:12:37 -08:00
moloch-- 39b488bd25 Refactor unit tests to not write to main db 2026-02-28 13:11:14 -08:00
Joe e7b8a24534 Merge pull request #2198 from BishopFox/feature/handler-recover
Feature/handler recover
2026-02-28 11:39:00 -07:00
moloch-- 17b9d611f8 Add panic/recover to mtls, dns, and wg handlers 2026-02-28 09:56:48 -08:00
moloch-- ed9075d065 Add better nil checks to various pb handlers 2026-02-28 09:52:40 -08:00
Joe 1f7221933d Merge pull request #2194 from BishopFox/crush/v2
Upgrade crush libs to v2
2026-02-25 09:22:24 -07:00
moloch-- 6333e0691a Upgrade crush libs to v2 2026-02-24 17:40:13 -08:00
moloch-- 3bbaf80510 v1.7.3 2026-02-23 20:49:28 -08:00
moloch-- 25726d8105 Revert wasm-donut to v0.0.3 2026-02-23 20:48:53 -08:00
moloch-- 67e9a7f37f Update wasm-donut to v0.0.6 2026-02-23 19:33:26 -08:00
moloch-- a5b6935da6 Tweak AGENTS.md 2026-02-23 07:10:28 -08:00
moloch-- 2e36f45bdf v1.7.2 2026-02-22 17:33:08 -08:00
Joe 3e06a9d5ee Merge pull request #2191 from BishopFox/feature/file-tab-completer
Feature/file tab completer
2026-02-22 18:32:27 -07:00
moloch-- 952b2df49d Update beignet 2026-02-22 16:42:32 -08:00
moloch-- 9769f1bb57 Fix mod vendor 2026-02-22 16:41:16 -08:00
moloch-- f5f2c80ad3 Update malasada to v0.0.3 2026-02-22 16:38:41 -08:00
moloch-- bb2edf63cf Add file tab completer to more commands 2026-02-22 16:37:30 -08:00
moloch-- cd711afe8a Add tab completer to generate --save 2026-02-22 16:26:32 -08:00
Joe f9bbbb34bb Merge pull request #2190 from BishopFox/skoveit-feature/PE-Metadata-Spoofing
Skoveit feature/pe metadata spoofing
2026-02-21 23:29:33 -07:00
moloch-- 64b91c56c0 Fix unit tests 2026-02-21 15:14:26 -08:00
moloch-- a6c7867a26 Fix unit tests 2026-02-21 14:22:18 -08:00
moloch-- 7f25c3bb06 Expand pe metadata spoofing feature 2026-02-21 12:36:47 -08:00
moloch-- 153cf29551 Fix unit tests 2026-02-21 06:30:01 -08:00
jjensn b85161e797 Declare vars before use 2026-02-21 06:29:59 -08:00
jjensn ed906fcffe typo: Add yamux client constructor 2026-02-21 06:29:58 -08:00
jjensn 3bbcf5697a Yamux logging for debug implants 2026-02-21 06:29:56 -08:00
moloch-- 4a425d2fd6 Fix 'websites rm' add tab completer issue #2185 2026-02-21 06:29:55 -08:00
Adam d0f752e118 Fix execute infinite spin
Signed-off-by: Adam <[email protected]>
2026-02-21 06:29:54 -08:00
Adam 7167621577 Change env-inheritance flag default to false
Signed-off-by: Adam <[email protected]>
2026-02-21 06:29:47 -08:00
Joe c3582fc203 Merge pull request #2189 from BishopFox/jjensn-fix/yamux-disable-logging
Jjensn fix/yamux disable logging
2026-02-19 22:29:46 -07:00
moloch-- 07c95b203f Fix unit tests 2026-02-19 18:05:57 -08:00
moloch-- 958e44deef Fix 'websites rm' add tab completer issue #2185 2026-02-19 17:54:55 -08:00
Adam 836395a2d6 Fix execute infinite spin
Signed-off-by: Adam <[email protected]>
2026-02-19 17:54:53 -08:00
Adam 1a7a1c9b2d Change env-inheritance flag default to false
Signed-off-by: Adam <[email protected]>
2026-02-19 17:54:27 -08:00
Joe 4ba285796f Merge pull request #2188 from BishopFox/fix/websites-rm
Fix 'websites rm' add tab completer issue #2185
2026-02-19 18:51:41 -07:00
moloch-- a05dfad100 Fix 'websites rm' add tab completer issue #2185 2026-02-19 17:30:33 -08:00
Joe 0eb29ad9b8 Merge pull request #2187 from Aptimex/execute-fix
Fix: Execute default env inheritance issues
2026-02-19 18:06:43 -07:00
Adam ad8b329f85 Fix execute infinite spin
Signed-off-by: Adam <[email protected]>
2026-02-19 16:45:39 -07:00
Adam c6206257b6 Change env-inheritance flag default to false
Signed-off-by: Adam <[email protected]>
2026-02-19 16:20:59 -07:00
Ronan Kervella 8bbf06c156 Merge branch 'master' into feature/PE-Metadata-Spoofing 2026-02-19 12:42:31 -08:00
jjensn 4d4eab998f Declare vars before use 2026-02-18 13:34:24 -05:00
jjensn c081f17380 typo: Add yamux client constructor 2026-02-17 13:17:44 -05:00
jjensn fafbac3fa6 Yamux logging for debug implants 2026-02-17 12:59:34 -05:00
moloch-- d9c89c81cf Fix typo in docs 2026-02-16 13:14:40 -08:00
moloch-- 061221905b Add discord button to upper right 2026-02-16 13:09:03 -08:00
moloch-- d0600e2be7 Tweak docs site loading 2026-02-16 10:44:51 -08:00
moloch-- 26abbe3860 Update wasm-donut to v0.0.5 2026-02-16 09:58:57 -08:00
Anas 55a386ae1c Merge branch 'master' into feature/PE-Metadata-Spoofing 2026-02-16 19:54:15 +02:00
moloch-- 2bfdb218ff Update wasm-donut to v0.0.5 2026-02-16 09:44:22 -08:00
moloch-- 715b84e799 Update readme 2026-02-16 09:26:49 -08:00
moloch-- faea2ff639 Add link buttons to home page 2026-02-16 08:58:39 -08:00
moloch-- 1b253f8dec Add community talks section 2026-02-16 08:46:12 -08:00
moloch-- eb38724322 Add mtls and wg c2 docs 2026-02-16 08:35:01 -08:00
moloch-- 05dedf4473 Add mermaid chart component to md renderer 2026-02-16 08:06:36 -08:00
moloch-- 28c6b82a79 Update config file docs 2026-02-16 07:46:18 -08:00
Anas 1f553496e3 Merge branch 'master' into feature/PE-Metadata-Spoofing 2026-02-16 15:50:07 +02:00
0xOral cd5db464e0 fix protoc version 2026-02-16 15:25:21 +02:00
moloch-- 0bf0ac6c7b Update config file md 2026-02-15 21:52:57 -08:00
Joe 0cf5a47cfd Merge pull request #2181 from BishopFox/fix/gzip-bomb
Add limit to gzip size
2026-02-15 22:27:56 -07:00
moloch-- 8d6759924b Add limit to gzip size 2026-02-15 21:13:54 -08:00
Joe 8d5dbd2050 Merge pull request #2180 from BishopFox/feature/shell-mgmt
Feature/Shell Management
2026-02-15 22:12:08 -07:00
moloch-- 804e149113 Add shell kill option 2026-02-15 20:58:07 -08:00
moloch-- 9ced4cfd50 Add shell mgmt features 2026-02-15 20:51:18 -08:00
0xOral c8be5a5b1b add --spoof feature 2026-02-16 02:27:59 +02:00
moloch-- b7abf98c95 Tweak yt header 2026-02-15 07:30:51 -08:00
moloch-- 918ac1bb91 Tweak payload compatibility tables 2026-02-14 16:24:44 -08:00
moloch-- 1e57818312 Tweak cross-compile docs 2026-02-14 11:34:11 -08:00
moloch-- c44c14dd46 Tweak cross-compile docs 2026-02-14 11:33:48 -08:00
moloch-- 35f41cd62d Tweak compile from source instructions 2026-02-14 11:29:35 -08:00
moloch-- 4eff1cc053 Add getting started workshop 2026-02-14 11:22:12 -08:00
moloch-- 16981da431 upgrade docs to nextjs v16 2026-02-14 11:16:38 -08:00
moloch-- 3830c76292 npm update 2026-02-14 09:43:13 -08:00
moloch-- 73de93d6fb Fix content scrolling 2026-02-14 09:42:04 -08:00
moloch-- c7770c2f6e Add more yt links 2026-02-14 09:31:02 -08:00
moloch-- 21db908ce4 Hide footer on yt play 2026-02-14 09:23:11 -08:00
moloch-- b7b0247652 Add basic yt embeds 2026-02-14 08:52:15 -08:00
moloch-- 3dc7dc03d0 Fix moving sidebar 2026-02-14 08:40:26 -08:00
moloch-- 229452d7ed Fix moving sidebar 2026-02-14 08:39:23 -08:00
moloch-- d29ce9a08b Add payload compatibility table to docs 2026-02-14 08:19:18 -08:00
Joe 46f2b2b402 Merge pull request #2177 from BishopFox/skoveit-feature/dynamic-c2-endpoint
Skoveit feature/dynamic c2 endpoint
2026-02-13 11:50:36 -07:00
Joe 6ee2006387 Merge pull request #2170 from xtle0o0/fix/external-builder-authz-scope
Restrict external builder RPCs to assigned build jobs
2026-02-13 11:50:22 -07:00
moloch-- 2fd13ee2bc Regenerate pb 2026-02-13 07:22:06 -08:00
0xOral 2697568336 fix-export-ca-error-message 2026-02-13 07:21:54 -08:00
Joe 5013048b0b Merge pull request #2176 from skoveit/fix-export-ca-error-message
fix-export-ca-error-message
2026-02-13 08:13:46 -07:00
Joe 627b15572c Merge branch 'master' into feature/dynamic-c2-endpoint 2026-02-13 08:11:56 -07:00
0xOral 42c40c9b8d fix-export-ca-error-message 2026-02-12 19:45:52 +02:00
0xOral 405b282fed Dynamic C2 Endpoint Switching 2026-02-12 18:47:26 +02:00
Joe e32cd36e01 Merge pull request #2172 from skoveit/fix-off-by-one-naming
Fix: server panic on single-word lists and off-by-one in codename generation
2026-02-10 22:30:32 -07:00
Joe 492a2aeed6 Merge pull request #2171 from loresuso/loresuso/fix-zombie-shell
fix: wait system shell to cleanup zombie processes
2026-02-10 22:29:53 -07:00
Lorenzo Susini d6dafb0391 fix: wait system shell to cleanup zombie processes
Signed-off-by: Lorenzo Susini <[email protected]>
2026-02-10 18:01:39 +01:00
0xOral 49a1bcfd7d fix(codenames): fix off-by-one error and prevent panic on single-word lists 2026-02-10 17:05:13 +02:00
xtle0o0 a8d1bf6fb1 Restrict external builder RPCs to assigned builds 2026-02-10 12:00:24 +01:00
moloch-- 2f386b7e09 v1.7.1 2026-02-08 14:19:47 -08:00
Joe d7dce58397 Merge pull request #2168 from BishopFox/feature/mutli-console
Feature/mutli console
2026-02-08 07:47:05 -07:00
moloch-- 15114138a8 Save interactive settings to disk 2026-02-08 06:32:17 -08:00
moloch-- 2716090410 Add custom prompt configurations 2026-02-08 06:28:45 -08:00
moloch-- a805161245 Add themes and console switcher 2026-02-07 15:46:17 -08:00
Joe afd57891cd Merge pull request #2166 from BishopFox/linux/shellcode
Linux/shellcode
2026-02-07 14:32:19 -07:00
moloch--andCodex bdf4a6ed0d Codex changes
Co-authored-by: Codex
2026-02-07 12:54:03 -08:00
moloch-- 87b1efaa5f Make sure zig builds get stripped 2026-02-07 12:25:04 -08:00
moloch-- 009e505a54 Update shellcode unit tests 2026-02-07 10:46:01 -08:00
moloch-- c0dd2d5b51 Update docs, wire linux shellcode into client/ code 2026-02-07 10:33:13 -08:00
moloch-- 6dab9dc6c5 Update malasada to v0.0.2 2026-02-07 10:11:15 -08:00
moloch-- 854249fa25 Add linux shellcode for amd64/arm64 to rpc 2026-02-07 09:33:42 -08:00
moloch-- 7db573a03e Tweak file header 2026-02-07 07:32:48 -08:00
moloch-- 0bef5491dc Fix linux --format shared builds 2026-02-07 00:26:33 -08:00
moloch-- 1c50e5a87b Remove unused tests 2026-02-06 17:53:50 -08:00
moloch-- 8dae2d0d52 v1.7.0 2026-02-06 17:50:35 -08:00
Joe 023776f7e3 Merge pull request #2165 from BishopFox/crack/basic
Update gRPC APIs
2026-02-06 18:48:21 -07:00
moloch-- b7566a3b09 Update client grpc to modern apis 2026-02-06 17:31:08 -08:00
moloch-- b889e2eb6f Fix merge 2026-02-06 16:30:53 -08:00
moloch-- 4466ace279 Merge master 2026-02-06 16:29:39 -08:00
Joe 2b65089b27 Merge pull request #2164 from BishopFox/fix/dns-dos
Fix/dns dos
2026-02-06 15:41:17 -07:00
moloch-- 87d5fd53a8 Add e2e dns c2 tests 2026-02-06 13:54:07 -08:00
moloch-- cf79a2d284 Merge patch for oversized msg size checks 2026-02-06 12:16:03 -08:00
moloch-- 6d0276ff67 Add more tests for dns gc 2026-02-06 11:56:55 -08:00
moloch-- 9b001ab88e Remove totp from dns c2, implement pending msg gc 2026-02-06 11:40:00 -08:00
Joe 503218f3f4 Merge pull request #2163 from BishopFox/feature/exec-bg
Feature/exec bg
2026-02-06 10:44:20 -07:00
moloch-- 495dce0987 Improve error and nil checks in mtls comms 2026-02-06 08:22:26 -08:00
moloch-- a7ff35c229 Tweak selection form height 2026-02-06 07:58:17 -08:00
moloch-- 162fc4fb8a Merge branch 'feature/background-execute-flag' into feature/exec-bg 2026-02-06 07:31:10 -08:00
moloch-- 636ea0a9b2 Cleanup execute children output 2026-02-06 07:31:01 -08:00
moloch-- 84ed9bc4e7 Merge branch 'feature/background-execute-flag' into feature/exec-bg 2026-02-06 07:27:57 -08:00
moloch-- b985d8ff9f Fix cmd group help 2026-02-06 07:27:50 -08:00
moloch-- 5a43705e1d Merge branch 'feature/background-execute-flag' into feature/exec-bg 2026-02-06 07:13:34 -08:00
Joe 76af248850 Merge pull request #2162 from BishopFox/darwin/shellcode
Darwin/arm64 Shellcode
2026-02-06 07:59:56 -07:00
moloch-- 8ea7eb4236 Remove old test 2026-02-05 21:30:45 -08:00
Joe 8f3c3ec1e0 Merge branch 'master' into darwin/shellcode 2026-02-05 22:19:10 -07:00
moloch-- 8d4bf9c759 Fixes to xor_dynamic arm64 2026-02-05 21:18:17 -08:00
moloch-- 628757250e Add execute background flag 2026-02-05 20:56:07 -08:00
moloch-- 85094fc695 Port xor encoders to arm64 2026-02-05 20:41:00 -08:00
moloch-- 0a88ad77f7 Port xor encoders to arm64 2026-02-05 19:15:34 -08:00
moloch-- 4d04f08421 Port xor encoders to arm64 2026-02-05 19:14:25 -08:00
moloch-- 4a01971f7d Allow specifying multiple shellcode encoders by name 2026-02-05 18:39:07 -08:00
moloch-- 977c63dc16 Add shellcode support for darwin/arm64 2026-02-05 17:57:08 -08:00
Joe 2d65d7d6a5 Merge pull request #2161 from BishopFox/c2/mux
C2/mux
2026-02-05 18:36:17 -07:00
moloch-- 4f5ca51cfe Implement generate.darwinShellcode() 2026-02-05 17:16:14 -08:00
moloch-- 83208eeab4 Fix io import for named pipe build 2026-02-05 16:43:53 -08:00
moloch-- 21674a9f0a Merge branch 'codex/fix-client-wg-lport-flag' into c2/mux 2026-02-05 15:50:58 -08:00
moloch-- a18bda14e2 Fix wg lport check 2026-02-05 15:50:47 -08:00
moloch-- 37f9670783 Add mux to wg c2 2026-02-05 15:50:13 -08:00
moloch-- 1745886622 Add mux and signing to wg c2 2026-02-05 14:54:32 -08:00
moloch-- bd7361825c v1.6.11 2026-02-05 12:59:32 -08:00
Joe 32af81c132 Merge pull request #2160 from BishopFox/fix/wepath
Use correct path construction in website.ToProtobuf()
2026-02-05 13:47:35 -07:00
moloch-- 818127349c Use correct path construction in website.ToProtobuf() 2026-02-05 12:29:59 -08:00
moloch-- a712bead88 Tweak mux ids 2026-02-05 12:10:24 -08:00
moloch-- aa86a1d12c Add more signing unit tests 2026-02-05 11:38:37 -08:00
moloch-- afb58f7155 Add envelope signing over mtls 2026-02-05 11:10:35 -08:00
moloch-- 97d5adccd7 Add beacon tests 2026-02-05 09:28:55 -08:00
moloch-- 83cc755388 Add multiplexing to mtls comms 2026-02-05 07:17:25 -08:00
moloch-- 4dc1fe145c Fix missing import 2026-02-04 09:46:38 -08:00
Joe 5e27b23bde Merge pull request #2158 from BishopFox/fix/shell
Fix `shell` pty resizing
2026-02-03 17:47:44 -07:00
Joe 6011d23a9f Merge pull request #2159 from JakubStanior/fix/2129
Use lport from server config in daemon mode  / fix #2129
2026-02-03 17:42:18 -07:00
Jakub Stankiewicz 976d720043 Add default lport from server config in daemon mode 2026-02-03 23:31:08 +01:00
moloch-- 86f41e9abc Fix shell pty resizing 2026-02-02 19:19:14 -08:00
Joe 8b9fc399fa Merge pull request #2156 from BishopFox/fix/armory-win
Ensure armory temp files cross‑plat
2026-02-02 20:12:49 -07:00
moloch-- 27c75c14e6 Ensure armory temp files cross‑plat 2026-02-02 18:17:28 -08:00
moloch-- 11d6af8aa0 Fix duplicated 'unknown cmd' output 2026-02-01 10:44:38 -08:00
moloch-- 54dc6dcec3 v1.6.10 2026-01-31 17:45:38 -08:00
Joe c7412d4d5b Merge pull request #2154 from BishopFox/go/v1.25.6
Go/v1.25.6
2026-01-31 09:44:33 -07:00
moloch-- c3817dc175 Pin tag patch version Go 1.25.6 2026-01-31 08:20:09 -08:00
moloch-- 09cedf588e Update to go 1.25.6 2026-01-31 08:18:39 -08:00
moloch-- 66aed89ebd Merge master 2026-01-31 08:03:24 -08:00
moloch-- 16397e7a0f Update default runtime arg 2026-01-31 07:53:18 -08:00
moloch-- 5062b483b7 Update wasm-donut 2026-01-31 07:43:21 -08:00
moloch-- b268295c8d Switch to wasm-donut 2026-01-30 22:23:56 -08:00
moloch-- 2b3f23cec9 Move donut options to generate flags 2026-01-30 17:19:57 -08:00
moloch-- 25d242230b Rengerate pb 2026-01-30 15:10:02 -08:00
Joe 110658ec39 Merge pull request #2152 from BishopFox/feature/shellcode-encoders
Feature/shellcode encoders
2026-01-30 16:09:46 -07:00
moloch-- b4345226c1 Merge branch 'feature/shellcode-encoders' into crack/basic 2026-01-30 15:09:21 -08:00
moloch-- e99999ebb6 Cleanup shellcode encoder list output 2026-01-30 14:20:48 -08:00
moloch-- 24795e7cba Update shellcode encode rpc to support new encoders 2026-01-30 14:14:45 -08:00
moloch-- 32e3386a3e Add sgn to unified ShellcodeEncoders 2026-01-30 13:40:16 -08:00
moloch-- 7feea8bef3 Add more shellcode encoders 2026-01-30 13:02:14 -08:00
moloch-- d182434d54 Implement amd64/xor_dynamic shellcode encoder 2026-01-30 12:45:22 -08:00
moloch-- 0237af0c6e Implement amd64/xor_dynamic shellcode encoder 2026-01-30 12:45:08 -08:00
moloch-- 1fa36e46c4 Implement amd64/xor_dynamic shellcode encoder 2026-01-30 12:44:49 -08:00
moloch-- 4d9bae0778 Port basic xor shellcode encoder to golang 2026-01-30 12:28:15 -08:00
moloch-- 9a9b40e400 Move sng to server/encoders/shellcode/sgn 2026-01-30 11:51:57 -08:00
moloch-- d784b305ef Move sng to server/encoders/shellcode/sgn 2026-01-30 11:50:24 -08:00
moloch-- 7a224b4757 Update year 2026-01-30 11:40:58 -08:00
Joe 76ae704ce4 Merge pull request #2151 from BishopFox/feature/xxd
Feature/xxd
2026-01-30 12:06:11 -07:00
moloch-- 71cd8fa610 Skip generate tests if there's no edits to related code 2026-01-30 10:35:16 -08:00
moloch-- e9fdcc1285 Improve hex-edit ux 2026-01-30 10:30:15 -08:00
moloch-- 870c995ae2 Add hexedit feature 2026-01-30 10:20:56 -08:00
Joe 15d7e7c4d1 Merge pull request #2150 from BishopFox/feature/chtimes
Expand time formats supported by chtimes
2026-01-30 10:50:56 -07:00
moloch-- 750cdfce0a Expand time formats supported by chtimes 2026-01-30 09:41:55 -08:00
Joe 0f128a22b3 Merge pull request #1807 from navsec/socks5-stability
SOCKS5 Stability Improvements for HTTP/mTLS Transports
2026-01-30 10:07:13 -07:00
Joe 3296a8f483 Merge branch 'master' into socks5-stability
Signed-off-by: Joe <[email protected]>
2026-01-30 10:07:05 -07:00
Joe b77ade2bb9 Merge pull request #2148 from BishopFox/fix/info
Fix/info
2026-01-30 08:47:32 -07:00
moloch-- 41dc54d736 Implement mount for darwin 2026-01-29 22:22:59 -08:00
moloch-- 8a0694cb38 Add mount on darwin 2026-01-29 22:08:28 -08:00
moloch-- 52c0618bc3 Add os version implementations for linux/darwin 2026-01-29 21:50:16 -08:00
moloch-- e2e1912628 Add search to edit cmd 2026-01-29 21:01:16 -08:00
moloch-- 36794f1b07 Implement skip to line number 2026-01-29 20:50:11 -08:00
moloch-- ccd8f75b03 v1.6.9 2026-01-29 20:36:45 -08:00
moloch-- dc89afe404 Add optional line numbers 2026-01-29 20:32:15 -08:00
moloch-- 9db1f3a967 Add syntax highlighting 2026-01-29 20:22:23 -08:00
moloch-- a2ab3aede6 Implement 'edit' command 2026-01-29 20:07:51 -08:00
moloch-- c9f4970e4b Add crack db models 2026-01-29 19:35:39 -08:00
moloch-- e72fa3dbd0 Switch crack.yaml to snake case 2026-01-29 16:30:51 -08:00
moloch-- 2e93ce5684 Merge branch 'master' into crack/basic 2026-01-29 16:16:43 -08:00
Joe 545fc27d03 Merge pull request #2147 from BishopFox/feature/certs-db
Feature/certs db
2026-01-29 09:59:10 -07:00
moloch-- 5bf65aa2b0 Fix notification indentation 2026-01-29 08:51:01 -08:00
Joe ebaf07ff1f Merge branch 'master' into feature/certs-db 2026-01-29 09:16:35 -07:00
moloch-- fc95d3e354 Fix notifications build on windows 2026-01-29 08:15:32 -08:00
moloch-- 88dca9337b Fix notifications docs anchors 2026-01-29 08:11:17 -08:00
moloch-- 44d9f8d5aa Update cli to work with db CAs 2026-01-29 08:01:35 -08:00
moloch-- f76e9e367d Move CAs to db 2026-01-29 07:56:20 -08:00
moloch-- 69fa4143f6 Improve logging for invalid configs 2026-01-29 07:08:34 -08:00
moloch-- dcbda0c64e Improve logging for notifications 2026-01-29 06:50:18 -08:00
moloch-- 3db48408af Initial notifications implementation 2026-01-29 06:44:11 -08:00
moloch-- 828838cddf Re-add new gprc server config fields 2026-01-29 05:52:41 -08:00
moloch-- 16c1dc21fd Merge master 2026-01-29 05:47:18 -08:00
moloch-- 3c8edb7294 v1.6.8 2026-01-28 20:14:36 -08:00
moloch-- 2e2206e0ae Fix emtpy prompt after event 2026-01-28 19:58:08 -08:00
Joe a43648a24a Merge pull request #2146 from BishopFox/fix/websites-css
Fix/websites css
2026-01-28 19:50:20 -07:00
moloch-- f65f98bf65 Improve websites content-type sniffing issue #2033 2026-01-28 18:14:27 -08:00
Joe 26d14e15ad Merge pull request #2144 from BishopFox/fix/update
Fix/update
2026-01-28 19:07:58 -07:00
moloch-- cee2cc76c4 Convert tui-settings to yaml 2026-01-28 18:06:41 -08:00
moloch-- daa33b6301 Convert server configs to yaml syntax, with backwards compatibility 2026-01-28 17:59:34 -08:00
moloch-- ef52973536 Convert configs to yml 2026-01-28 17:39:14 -08:00
moloch-- 6a7bd0803a Update --save help 2026-01-28 17:21:35 -08:00
moloch-- 6c70c1c1e6 Add signature validation logic 2026-01-28 17:20:24 -08:00
moloch-- ddc222b8a2 Improvements to update 2026-01-28 17:07:47 -08:00
moloch-- 5506a582ac Add SliverPublicKey 2026-01-28 16:45:32 -08:00
Joe 63d872c98b Merge pull request #2142 from BishopFox/fix/sgn
Fix/sgn
2026-01-28 17:31:46 -07:00
moloch-- ef9f5dde0d Fix unit tests 2026-01-28 07:21:38 -08:00
moloch-- e35b7fdb97 Update sgn to v0.0.5 2026-01-27 21:28:21 -08:00
moloch-- efbbf382eb Merge branch 'master' into fix/sgn 2026-01-27 21:26:42 -08:00
moloch-- 0b8d00900d v1.6.7 2026-01-27 21:06:39 -08:00
moloch-- 9077596f25 Damn it Claude 2026-01-27 21:04:30 -08:00
moloch-- 0a8104a32e Damn it Claude 2026-01-27 21:03:25 -08:00
moloch-- 15a0ba4c1e Damn it Claude 2026-01-27 21:01:55 -08:00
moloch-- d452c8a676 Write .bin even if sgn fails 2026-01-27 20:49:28 -08:00
Joe fb74b491fa Merge pull request #2141 from BishopFox/fix/console-inputs
Update readline/console deps
2026-01-27 21:38:20 -07:00
moloch-- 2af6e11adc Update readline/console deps 2026-01-27 19:55:18 -08:00
moloch-- 33c656d082 Implement first part of crack cmd 2026-01-24 18:28:07 -08:00
moloch-- 99a44e340f Improve crack benchmark output 2026-01-24 11:50:20 -08:00
moloch-- de5fa3458b Allow keep alives 2026-01-23 17:05:53 -08:00
Joe a3a98858fd Merge pull request #2135 from BishopFox/fix/sqlite
Add sqlite pragmas to db config
2026-01-21 22:28:56 -07:00
moloch-- d0652f2fd3 Add sqlite pragmas to db config 2026-01-21 16:08:07 -08:00
Joe 936f067363 Merge pull request #2130 from BishopFox/feature/website-info
Feature/website info
2026-01-21 10:25:56 -07:00
moloch-- 041c3c7048 Improve tab completer for websites cmd 2026-01-20 21:29:39 -08:00
moloch-- b48f74af58 Add original file name and sha256 to websites cmd 2026-01-20 19:13:42 -08:00
moloch-- 6ec8849b20 v1.6.6 2026-01-16 09:18:39 -08:00
Joe db7cf1ed62 Merge pull request #2125 from BishopFox/fix/winlsdir
Improved `err` and `nil` checks in `dirListHandler`
2026-01-16 10:17:01 -07:00
moloch-- 16e1e77068 Implement better err and nil checks in dirListHandler issue #2122 2026-01-16 07:06:43 -08:00
moloch-- 1cfa694aa2 Merge branch 'update/deps' into tui/adv-forms 2026-01-16 06:57:06 -08:00
moloch-- 5898877136 Fix --rc scripts 2026-01-16 06:56:41 -08:00
moloch-- a7d8cac565 Update generate form 2026-01-16 06:41:58 -08:00
moloch-- 0e73afca47 Update deps 2026-01-16 06:07:10 -08:00
moloch-- 432941d694 Tab complete parent commands from submenu 2026-01-16 05:58:35 -08:00
moloch-- ac521bf53c v1.6.4 2026-01-15 16:10:06 -08:00
Joe 9720c9f14f Merge pull request #2121 from BishopFox/feature/flag-completers
Improved flag completers
2026-01-15 17:09:30 -07:00
moloch-- 4a224fdb9c Improve completers for --interact flags 2026-01-15 15:14:20 -08:00
moloch-- 671eb4d777 Add tab completer to 'use' cmd 2026-01-15 15:03:21 -08:00
moloch-- 16cf816610 Implement os and arch completers 2026-01-15 13:54:21 -08:00
moloch-- 879f576c6e Add MCP to docs 2026-01-15 08:05:02 -08:00
moloch-- 2df78cdbf5 Update readme 2026-01-15 07:45:49 -08:00
moloch-- a05ffc0ae1 Fix footer/card z-index issue in docs site 2026-01-15 07:44:30 -08:00
moloch-- 6b4b218f09 Tweak docs 2026-01-15 07:33:40 -08:00
Joe 4d0d46afd6 Merge pull request #2118 from BishopFox/exec/env
Updates to `execute`
2026-01-13 22:45:02 -07:00
moloch-- f24c057503 Implement --env and --env-inheritance for 'execute' to allow greater control over subprocess env 2026-01-13 20:55:20 -08:00
moloch-- 7e3c1f1549 v1.6.3 2026-01-13 16:28:27 -08:00
Joe 1d4c0ec8a5 Merge pull request #2106 from cmprmsd/feature/extension-alias-autocompletion
Add argument completion for aliases and extensions
2026-01-13 17:25:11 -07:00
Joe 92dda6aa4f Merge pull request #2112 from BishopFox/6b37dependabot/go_modules/google.golang.org/protobuf-1.36.11
Bump google.golang.org/protobuf from 1.36.10 to 1.36.11
2026-01-13 17:24:30 -07:00
Joe 9a605dfda6 Merge pull request #2113 from BishopFox/0f1edependabot/go_modules/golang.org/x/sys-0.40.0
Bump golang.org/x/sys from 0.39.0 to 0.40.0
2026-01-13 17:24:14 -07:00
Joe e918885556 Merge pull request #2114 from Gubarz/getsystem
Fix: getsystem shellcode generation
2026-01-13 17:24:00 -07:00
Joe 263702594f Merge pull request #2115 from Gubarz/execute-assembly
Revert go-donut from 2022 patch to 2021
2026-01-13 17:23:17 -07:00
Joe 72b8dfb454 Merge pull request #2116 from BishopFox/fix/armory-all
Fix armory install all cmd
2026-01-13 17:23:00 -07:00
moloch-- aa2383ac24 Fix armory install all cmd 2026-01-12 21:45:21 -08:00
dependabot[bot] b6f0ea013d Bump golang.org/x/sys from 0.39.0 to 0.40.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.39.0 to 0.40.0.
- [Commits](https://github.com/golang/sys/compare/v0.39.0...v0.40.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-version: 0.40.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-01-13 05:34:38 +00:00
dependabot[bot] eb82e18a52 Bump google.golang.org/protobuf from 1.36.10 to 1.36.11
Bumps google.golang.org/protobuf from 1.36.10 to 1.36.11.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-version: 1.36.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-01-13 05:34:34 +00:00
Joe 40ea51b685 Merge pull request #2111 from BishopFox/3a38dependabot/go_modules/golang.org/x/net-0.48.0
Bump golang.org/x/net from 0.47.0 to 0.48.0
2026-01-12 22:33:30 -07:00
Joe 1285b44c50 Merge pull request #2110 from BishopFox/d73edependabot/go_modules/github.com/miekg/dns-1.1.70
Bump github.com/miekg/dns from 1.1.69 to 1.1.70
2026-01-12 22:33:18 -07:00
Joe cb63a3378f Merge pull request #2109 from BishopFox/dca1dependabot/go_modules/tailscale.com-1.92.5
Bump tailscale.com from 1.90.6 to 1.92.5
2026-01-12 22:33:02 -07:00
Gubarz 4f90bfdcda revert go-donut from 2022 to 2021 2026-01-12 13:48:53 -07:00
Gubarz 5bb1dcc137 Fix getsystem rpc errors 2026-01-12 12:25:00 -07:00
dependabot[bot] 57c417c48f Bump golang.org/x/net from 0.47.0 to 0.48.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.47.0 to 0.48.0.
- [Commits](https://github.com/golang/net/compare/v0.47.0...v0.48.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.48.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-01-12 03:05:52 +00:00
dependabot[bot] 55fc59f6f5 Bump github.com/miekg/dns from 1.1.69 to 1.1.70
Bumps [github.com/miekg/dns](https://github.com/miekg/dns) from 1.1.69 to 1.1.70.
- [Commits](https://github.com/miekg/dns/compare/v1.1.69...v1.1.70)

---
updated-dependencies:
- dependency-name: github.com/miekg/dns
  dependency-version: 1.1.70
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-01-12 03:05:44 +00:00
dependabot[bot] 332852d095 Bump tailscale.com from 1.90.6 to 1.92.5
Bumps [tailscale.com](https://github.com/tailscale/tailscale) from 1.90.6 to 1.92.5.
- [Release notes](https://github.com/tailscale/tailscale/releases)
- [Commits](https://github.com/tailscale/tailscale/compare/v1.90.6...v1.92.5)

---
updated-dependencies:
- dependency-name: tailscale.com
  dependency-version: 1.92.5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-01-12 03:05:34 +00:00
cmprmsd a903d2f596 Add support for predefined argument completion choices. in extensions and aliases
Example:
{
      "name": "browser",
      "desc": "target browser (chrome, edge, brave, all)",
      "type": "string",
      "optional": true,
      "choices": ["chrome", "edge", "brave", "all"]
    },
2026-01-11 22:11:40 +01:00
cmprmsd 4a4bb683e3 Add argument completion for aliases and extensions
- Introduced `AliasArgument` struct to define arguments for alias commands.
- Enhanced `LoadAlias` function to build usage and help messages including argument details.
- Implemented argument completion for alias commands using Carapace.
- Updated `makeAliasArgCompleter` to support positional and flag-style argument completions.
- Refactored `makeExtensionArgCompleter` to include similar completion features for extension commands.
- Improved user experience by displaying argument descriptions in completion lists one argument per line (instead of grouped).
2026-01-09 15:46:32 +01:00
moloch-- 016299c756 v1.6.2 2026-01-08 12:56:41 -08:00
Joe 075caaccda Merge pull request #2104 from BishopFox/rc/flush
Flush output on exit
2026-01-08 13:54:54 -07:00
Joe 729be253d3 Merge branch 'master' into rc/flush 2026-01-08 13:12:05 -07:00
moloch-- 13bd48182f Cleanup exit msg 2026-01-08 12:11:50 -08:00
moloch-- 67188dabea Flush output on exit 2026-01-08 12:10:30 -08:00
Joe 6e4c38c10e Merge pull request #2103 from BishopFox/fix-rportfwd
Fix rportfwd
2026-01-08 12:48:28 -07:00
Joe 00ecb1f4fd Merge pull request #2094 from BishopFox/5032dependabot/go_modules/github.com/spf13/cobra-1.10.2
Bump github.com/spf13/cobra from 1.10.1 to 1.10.2
2026-01-08 12:21:04 -07:00
Joe bac047fedd Merge pull request #2102 from 13621/revertpr2070
Fix DNS beacon closing immediately after registering
2026-01-08 12:20:48 -07:00
rkervella 10c16be351 Fix rportfwd 2026-01-08 10:48:57 -08:00
13621 d51ea9dbab fix: revert pr2070
Signed-off-by: 13621 <[email protected]>
2026-01-07 18:35:09 +00:00
dependabot[bot] 0eb41094de Bump github.com/spf13/cobra from 1.10.1 to 1.10.2
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.10.1 to 1.10.2.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.10.1...v1.10.2)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-version: 1.10.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-01-05 06:05:01 +00:00
Joe a219a97cb4 Merge pull request #2092 from BishopFox/3cabdependabot/go_modules/filippo.io/age-1.3.1
Bump filippo.io/age from 1.2.1 to 1.3.1
2026-01-04 23:04:08 -07:00
Joe b617bb4cf4 Merge pull request #2095 from BishopFox/21cddependabot/go_modules/github.com/ncruces/go-sqlite3-0.30.4
Bump github.com/ncruces/go-sqlite3 from 0.29.1 to 0.30.4
2026-01-04 23:03:54 -07:00
Joe 613b53430b Merge pull request #2093 from BishopFox/eb28dependabot/go_modules/github.com/miekg/dns-1.1.69
Bump github.com/miekg/dns from 1.1.68 to 1.1.69
2026-01-04 23:03:39 -07:00
Joe 472de54757 Merge pull request #2096 from BishopFox/b1e7dependabot/go_modules/golang.org/x/mod-0.31.0
Bump golang.org/x/mod from 0.30.0 to 0.31.0
2026-01-04 23:03:26 -07:00
Joe bdbc3bd7b5 Merge pull request #2090 from AnvithLobo/fix-forms
Fix interactive prompt cancellation handling
2026-01-04 23:03:11 -07:00
dependabot[bot] 87db61bcfb Bump github.com/miekg/dns from 1.1.68 to 1.1.69
Bumps [github.com/miekg/dns](https://github.com/miekg/dns) from 1.1.68 to 1.1.69.
- [Commits](https://github.com/miekg/dns/compare/v1.1.68...v1.1.69)

---
updated-dependencies:
- dependency-name: github.com/miekg/dns
  dependency-version: 1.1.69
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-01-05 05:13:43 +00:00
dependabot[bot] 095eb2722b Bump golang.org/x/mod from 0.30.0 to 0.31.0
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.30.0 to 0.31.0.
- [Commits](https://github.com/golang/mod/compare/v0.30.0...v0.31.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-version: 0.31.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-01-05 05:13:43 +00:00
dependabot[bot] abbb0da434 Bump github.com/ncruces/go-sqlite3 from 0.29.1 to 0.30.4
Bumps [github.com/ncruces/go-sqlite3](https://github.com/ncruces/go-sqlite3) from 0.29.1 to 0.30.4.
- [Release notes](https://github.com/ncruces/go-sqlite3/releases)
- [Commits](https://github.com/ncruces/go-sqlite3/compare/v0.29.1...v0.30.4)

---
updated-dependencies:
- dependency-name: github.com/ncruces/go-sqlite3
  dependency-version: 0.30.4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-01-05 05:13:41 +00:00
dependabot[bot] 52f7484a71 Bump filippo.io/age from 1.2.1 to 1.3.1
Bumps [filippo.io/age](https://github.com/FiloSottile/age) from 1.2.1 to 1.3.1.
- [Release notes](https://github.com/FiloSottile/age/releases)
- [Commits](https://github.com/FiloSottile/age/compare/v1.2.1...v1.3.1)

---
updated-dependencies:
- dependency-name: filippo.io/age
  dependency-version: 1.3.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-01-05 05:13:38 +00:00
moloch-- a79b5fd7b9 go mod tidy 2026-01-04 21:11:55 -08:00
Joe 3e98d2d7a1 Merge pull request #2091 from BishopFox/feature/rc
Implement --rc for scripting initial inputs
2026-01-04 20:31:55 -07:00
moloch-- 13bf9d0a01 Implement --rc for scripting initial inputs 2026-01-04 17:51:59 -08:00
AnvithLobo 7aae725b88 Set form width dynamically based on terminal size
Introduced getTerminalWidth to determine the terminal width  and set the form width accordingly
2026-01-05 05:31:56 +05:30
AnvithLobo afd01073e4 Handle selection errors in builder and encoder prompts
Added error handling for empty selections in external builder and traffic encoder selection dialogs. Now returns a specific error or prints an error message if no selection is made
2026-01-05 04:58:53 +05:30
AnvithLobo ae0c33f41b Handle no selection in C2 profile selection
Updated the selectC2Profile function to return an error if no profile is selected, and modified callers to handle this error gracefully.
2026-01-05 04:47:40 +05:30
AnvithLobo 18da00b449 Fix: Allow user to cancel select prompts
Saves the original value before running the select prompt and restores it if the form is cancelled or an error occurs. This prevents unintended return value when the prompt was cancelled.
2026-01-05 04:39:11 +05:30
moloch-- dc736f6095 Update readme 2026-01-04 12:18:58 -08:00
Joe e02d53ce67 Merge pull request #2088 from BishopFox/fix/readline
Reduce flickering text in readline
2026-01-04 13:02:14 -07:00
Joe 064cd6a2cc Merge pull request #2087 from BishopFox/fix/mods3
Rename implant/sliver imports
2026-01-04 12:00:46 -07:00
moloch-- eab9d0b653 Reduce flickering text in readline 2026-01-04 10:59:20 -08:00
Joe 29c4ec0afa Merge pull request #2032 from carterburn/feature/aka-command
New command: add command aliases (aka)
2026-01-04 11:19:15 -07:00
moloch-- b7c336cb76 Rename implant/sliver imports 2026-01-04 10:17:56 -08:00
moloch-- d8ddd09c86 Update pretty table 2026-01-04 09:42:44 -08:00
Joe 04bb356207 Merge branch 'master' into feature/aka-command 2026-01-04 10:19:52 -07:00
Joe a003a5e3cf Merge pull request #2086 from AnvithLobo/master
Fix beacon panic race condition
2026-01-04 09:19:53 -07:00
Joe 75e3cad76a Merge branch 'master' into feature/aka-command 2026-01-04 09:06:36 -07:00
AnvithLobo 8aa0cbee7e Fix beacon panic race condition
Tasks are now dispatched to background goroutines, and their results are collected asynchronously via a channel. Check-ins include any pending results from previous tasks, improving responsiveness and reliability. Introduced beaconDispatchTasks to manage background execution and result collection.
2026-01-04 07:57:26 +05:30
Joe 30a50717e1 Merge pull request #2029 from BishopFox/7a58dependabot/go_modules/github.com/klauspost/compress-1.18.1
Bump github.com/klauspost/compress from 1.18.0 to 1.18.1
2026-01-02 21:34:03 -07:00
Joe f4c9e7109b Merge pull request #2084 from BishopFox/fix/mods2
Improvements to Implant Build Layout
2026-01-02 21:19:16 -07:00
moloch-- 08f3997756 Fix sliver.h -> main.h 2026-01-02 21:40:45 -06:00
moloch-- 3aebebecbb Implement RenameImport() 2026-01-02 21:22:19 -06:00
moloch-- 1d7eca8e39 Validate module path 2026-01-02 21:06:14 -06:00
moloch-- 773ee5f867 Rename sliver.go -> main.go 2026-01-02 20:55:26 -06:00
moloch-- 7608a4b0a0 Add GoPackage to ImplantConfig pb 2026-01-02 20:41:35 -06:00
moloch-- 9ecd36b7b6 Implement module rename 2026-01-02 20:33:27 -06:00
moloch-- d8fc5a6df4 Tweak project dir structure 2026-01-02 19:02:07 -06:00
moloch-- 649a6582e0 Add -mod=vendor to GoBuild 2026-01-02 18:53:31 -06:00
moloch-- 00e8a0cfca Move main implant code out of main pkg 2026-01-02 18:50:26 -06:00
moloch-- e9890bc8f9 Set limit to unauthed body req size 2026-01-02 17:32:43 -06:00
Joe 8b798f8307 Merge pull request #2083 from BishopFox/feature/mcp
Experiamental MCP Support
2026-01-02 16:25:24 -07:00
moloch-- d4728af1ea Add mcp logging 2026-01-02 16:26:01 -06:00
moloch-- d1b7d91b1a Add basic file operations to mcp 2026-01-02 12:48:35 -06:00
moloch-- cac6dced34 Tweak mcp 2026-01-02 11:14:32 -06:00
moloch-- a35bf0c1fc Implement mcp stdio option 2026-01-02 07:01:55 -06:00
moloch-- 67616e50c1 Wire rpc to mcp 2026-01-01 22:43:52 -06:00
moloch-- 54de8a2a97 Outline mcp 2026-01-01 22:32:25 -06:00
moloch-- 20916c655c Improve kick-operator command 2026-01-01 11:17:07 -06:00
Joe 6c18201ed6 Merge pull request #2081 from BishopFox/fix/rpc-errors
Improve gRPC Error Codes
2026-01-01 09:57:00 -07:00
moloch-- 29165aff0d Add /artifacts to gitignore 2026-01-01 10:04:53 -06:00
moloch-- 704285f28d Fix release workflow 2026-01-01 09:50:59 -06:00
moloch-- a007872fbc Include version history in release action 2026-01-01 09:48:56 -06:00
moloch-- c90e674f25 Merge branch 'master' into fix/rpc-errors 2026-01-01 09:40:57 -06:00
moloch-- 679b8d0c51 Add missing --permissions all flag 2026-01-01 09:40:43 -06:00
moloch-- 0a42a03052 Add missing --permissions all flag 2026-01-01 09:40:31 -06:00
moloch-- 73852e5bf2 Remove mingw, add operator --permissions flag 2026-01-01 09:37:16 -06:00
moloch-- 5bcf59e1b3 Fix installation script for amd64 minisig name 2026-01-01 09:32:02 -06:00
moloch-- 935c737c35 Implement better grpc error codes 2026-01-01 09:30:14 -06:00
moloch-- 5c04e61235 Simplify signing operation AGAIN 2025-12-31 16:25:10 -06:00
moloch-- cff7a8ce53 Simplify signing operation 2025-12-31 15:53:07 -06:00
moloch-- e6f452ea2e Simplify signing operation 2025-12-31 15:29:46 -06:00
moloch-- c5f533bc80 Simplify signing operation 2025-12-31 15:13:03 -06:00
moloch-- bc08760320 nop 2025-12-31 14:56:02 -06:00
moloch-- 9b37bee391 nop 2025-12-31 14:37:52 -06:00
moloch-- 709085238d Improve release minisign key handling 2025-12-31 14:20:12 -06:00
moloch-- 6e4240f0d9 Fix release workflow 2025-12-31 14:04:46 -06:00
moloch-- c95e5c6cd7 Implement armory forms 2025-12-31 13:48:00 -06:00
moloch-- ed3ab31741 Implement armory forms 2025-12-31 13:41:53 -06:00
moloch-- 9372b768be Update docs for minisign, remove gpg 2025-12-31 13:38:45 -06:00
moloch-- 2d7406f415 Update readme and npm 2025-12-31 13:13:44 -06:00
moloch-- 85ba0cb587 Update docs for v1.6 2025-12-31 11:33:21 -06:00
moloch-- 251871cca1 Switch to minisign for install script, add arm64 support 2025-12-31 11:15:33 -06:00
moloch-- 604318ea54 Update release workflow, add support for windows/arm64 2025-12-31 11:08:21 -06:00
moloch-- bc72b20f9b Update release workflow 2025-12-31 10:40:42 -06:00
Joe 61022e1eb1 Merge pull request #2078 from BishopFox/fix/forms
Refactor Survey to Huh
2025-12-31 09:17:11 -07:00
moloch-- a8d59daded tidy 2025-12-31 10:12:28 -06:00
moloch-- 9195376993 Refactor survey to huh 2025-12-31 10:04:27 -06:00
moloch-- a6de8e0304 Add profile forms 2025-12-31 09:13:21 -06:00
Joe d3ebd34b0d Merge pull request #2077 from BishopFox/fix/forms
Implement basic forms
2025-12-31 07:46:07 -07:00
moloch-- 310619526d Tweak settings 2025-12-31 08:40:02 -06:00
moloch-- 1990777c4b Tweak settings 2025-12-31 08:39:55 -06:00
moloch-- 9570556a87 Refactor to use debug.BuildInfo for version info 2025-12-31 08:27:09 -06:00
moloch-- b563919c19 Update x/crypto 2025-12-31 08:03:33 -06:00
moloch-- f1858ee8f3 Add 'generate beacon' form 2025-12-31 07:58:27 -06:00
moloch-- 46a8313a33 Tweak generate form 2025-12-31 07:51:57 -06:00
Joe 22454f3385 Merge pull request #2070 from xp3s/fix/dns-beacon-close-session
fix: DNS beacon Close() should call CloseSession() to prevent UDP port leak
2025-12-30 22:43:38 -07:00
moloch-- 868b2c294c Merge branch 'master' into fix/dnsc2 2025-12-30 23:04:32 -06:00
moloch-- 9827b4df4b Add forms pkg 2025-12-30 23:04:03 -06:00
moloch-- a48309a813 Add forms pkg 2025-12-30 23:03:55 -06:00
moloch-- 5df5dec5d4 Add forms pkg 2025-12-30 23:03:46 -06:00
Joe a0fb2a229f Merge branch 'master' into fix/dns-beacon-close-session 2025-12-30 21:59:35 -07:00
Joe 3ff3ef2ed4 Merge pull request #2076 from BishopFox/fix/dnsc2
Add cleanup to unit tests to avoid excessive disk usage
2025-12-30 21:59:21 -07:00
moloch-- 73cc8c38ff Add cleanup to unit tests to avoid excessive disk usage 2025-12-30 17:47:49 -06:00
Joe 896c763166 Merge branch 'master' into fix/dns-beacon-close-session 2025-12-30 16:42:38 -07:00
Joe ec7e2facbc Merge pull request #2075 from BishopFox/fix/dnsc2
Improvements to DNS C2, Port go-assest.sh to Golang
2025-12-30 15:37:37 -07:00
Joe 4969c2dc51 Merge branch 'master' into fix/dnsc2 2025-12-30 15:36:27 -07:00
moloch-- 94cb60b1f7 Updates to tests and implementation of dns c2 2025-12-30 16:35:37 -06:00
moloch-- 33fcfd54ef Update makefile to make goos/goarch override easier 2025-12-30 13:04:52 -06:00
moloch-- 10bb248e50 Code cleanup 2025-12-30 12:18:05 -06:00
moloch-- e023fd507e Port go-assets.sh to golang with go run 2025-12-30 11:55:56 -06:00
moloch-- 1a9f0f38dd Port go-assets.sh to golang with go run 2025-12-30 10:56:02 -06:00
moloch-- 02831a80bf Cleanup outputs of go-assets.sh 2025-12-30 10:26:24 -06:00
moloch-- 9ccff1798e Expand and update dns c2 unit tests 2025-12-30 09:46:49 -06:00
Joe cd5ef8b5c6 Merge pull request #2063 from BishopFox/3e11dependabot/npm_and_yarn/docs/sliver-docs/next-15.5.9
Bump next from 15.5.7 to 15.5.9 in /docs/sliver-docs
2025-12-30 08:12:38 -07:00
moloch-- dda1fdbbc2 Update dns unit tests 2025-12-30 08:52:26 -06:00
Joe 3b49df5662 Merge pull request #2067 from BishopFox/350cdependabot/github_actions/actions/upload-artifact-6
Bump actions/upload-artifact from 5 to 6
2025-12-29 21:44:47 -07:00
Joe 32be71ff8e Merge pull request #2069 from BishopFox/0d1adependabot/github_actions/actions/download-artifact-7
Bump actions/download-artifact from 6 to 7
2025-12-29 21:44:33 -07:00
Joe 3f77da1524 Merge pull request #2068 from BishopFox/f7cedependabot/github_actions/actions/cache-5
Bump actions/cache from 4 to 5
2025-12-29 21:44:19 -07:00
Joe bae3e9e45d Merge pull request #2074 from BishopFox/polite-zig
Update zig download to be more polite and secure issue #2065
2025-12-29 14:52:04 -07:00
moloch-- 205f5b4196 Update zig download to be more polite and secure issue #2065 2025-12-29 12:04:27 -06:00
xp3s 12f12218e0 fix: DNS beacon Close() should call CloseSession() to prevent UDP port leak
The DNS beacon's Close() method was empty, causing DNS client worker
goroutines and UDP connections to accumulate over time. This fix ensures
that CloseSession() is called to properly release resources when the
beacon connection is closed.
2025-12-15 17:13:19 +08:00
dependabot[bot] fae7e211a7 Bump actions/download-artifact from 6 to 7
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-12-15 03:02:52 +00:00
dependabot[bot] 346da14431 Bump actions/cache from 4 to 5
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-12-15 03:02:47 +00:00
dependabot[bot] 15174f6c31 Bump actions/upload-artifact from 5 to 6
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-12-15 03:02:44 +00:00
dependabot[bot] f29df040bb Bump next from 15.5.7 to 15.5.9 in /docs/sliver-docs
Bumps [next](https://github.com/vercel/next.js) from 15.5.7 to 15.5.9.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v15.5.7...v15.5.9)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 15.5.9
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-12-12 01:53:24 +00:00
Joe 0bbecc16ec Merge pull request #2060 from BishopFox/go/v1.25.5
Go v1.25.5
2025-12-05 13:29:26 -07:00
moloch-- 0c216161c2 npm update 2025-12-05 12:28:39 -08:00
moloch-- 8ad9c62eb5 Go v1.25.5 2025-12-04 20:12:24 -08:00
Joe 4c99fbfd82 Merge pull request #2059 from BishopFox/e722dependabot/npm_and_yarn/docs/sliver-docs/next-15.5.7
Bump next from 15.5.4 to 15.5.7 in /docs/sliver-docs
2025-12-04 15:48:34 -07:00
dependabot[bot] ed713e199c Bump next from 15.5.4 to 15.5.7 in /docs/sliver-docs
Bumps [next](https://github.com/vercel/next.js) from 15.5.4 to 15.5.7.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v15.5.4...v15.5.7)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 15.5.7
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-12-04 20:55:48 +00:00
Joe aacdb71c4a Merge pull request #2058 from BishopFox/e72edependabot/npm_and_yarn/docs/sliver-docs/mdast-util-to-hast-13.2.1
Bump mdast-util-to-hast from 13.2.0 to 13.2.1 in /docs/sliver-docs
2025-12-04 13:54:17 -07:00
dependabot[bot] 6968c3aae5 Bump mdast-util-to-hast from 13.2.0 to 13.2.1 in /docs/sliver-docs
Bumps [mdast-util-to-hast](https://github.com/syntax-tree/mdast-util-to-hast) from 13.2.0 to 13.2.1.
- [Release notes](https://github.com/syntax-tree/mdast-util-to-hast/releases)
- [Commits](https://github.com/syntax-tree/mdast-util-to-hast/compare/13.2.0...13.2.1)

---
updated-dependencies:
- dependency-name: mdast-util-to-hast
  dependency-version: 13.2.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-12-02 04:02:29 +00:00
Joe 410fd93025 Merge pull request #2052 from BishopFox/d161dependabot/github_actions/actions/checkout-6
Bump actions/checkout from 5 to 6
2025-11-23 22:11:44 -07:00
dependabot[bot] f2a0435dd2 Bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-11-24 03:04:10 +00:00
dependabot[bot] c09c57da3f Bump github.com/klauspost/compress from 1.18.0 to 1.18.1
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.18.0 to 1.18.1.
- [Release notes](https://github.com/klauspost/compress/releases)
- [Changelog](https://github.com/klauspost/compress/blob/master/.goreleaser.yml)
- [Commits](https://github.com/klauspost/compress/compare/v1.18.0...v1.18.1)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-version: 1.18.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-11-03 20:05:33 +00:00
Joe d66ec956a4 Merge pull request #2037 from BishopFox/2979dependabot/go_modules/tailscale.com-1.90.6
Bump tailscale.com from 1.90.2 to 1.90.6
2025-11-03 12:57:04 -07:00
dependabot[bot] 8229722735 Bump tailscale.com from 1.90.2 to 1.90.6
Bumps [tailscale.com](https://github.com/tailscale/tailscale) from 1.90.2 to 1.90.6.
- [Release notes](https://github.com/tailscale/tailscale/releases)
- [Commits](https://github.com/tailscale/tailscale/compare/v1.90.2...v1.90.6)

---
updated-dependencies:
- dependency-name: tailscale.com
  dependency-version: 1.90.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-11-03 03:04:28 +00:00
Joe dcd81a4db7 Merge pull request #2035 from BishopFox/util/rand
Secure Rand Utils
2025-11-02 10:01:16 -07:00
Joe 2617387417 Merge pull request #2028 from BishopFox/586cdependabot/go_modules/tailscale.com-1.90.2
Bump tailscale.com from 1.88.4 to 1.90.2
2025-11-02 09:39:38 -07:00
moloch-- 56aee7d6e4 Add missing pkg 2025-11-02 09:21:34 -07:00
moloch-- b4f07e8629 Fix various uses of util in implant/ 2025-11-02 08:39:31 -07:00
moloch-- 280cb34049 Replace most instances of insecureRand with util funcs wrapping secure rand 2025-11-02 08:25:14 -07:00
Carter Burn a21b0da928 Merge branch 'BishopFox:master' into feature/aka-command 2025-10-28 21:16:15 -04:00
carterburn 8a0ba038f6 Add readme to give aka command breakdown 2025-10-27 21:29:35 -04:00
Joe 8e5c5f1450 Merge commit from fork
Fix GHSA-q8j9-34qf-7vq7
2025-10-27 15:58:48 -07:00
Joe b8f4f0c1ea Merge pull request #2027 from BishopFox/dbf6dependabot/github_actions/actions/upload-artifact-5
Bump actions/upload-artifact from 4 to 5
2025-10-26 22:16:59 -07:00
Joe 17cb7fbd50 Merge pull request #2030 from BishopFox/cd33dependabot/github_actions/actions/download-artifact-6
Bump actions/download-artifact from 5 to 6
2025-10-26 22:16:47 -07:00
Joe 9963bc6a3f Merge pull request #2031 from BishopFox/implant/dep-updates
Update implant's x/crypto version
2025-10-26 22:16:30 -07:00
moloch-- 274943f383 Update implant's x/crypto version 2025-10-26 20:13:26 -07:00
dependabot[bot] be81755056 Bump actions/download-artifact from 5 to 6
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-10-27 03:05:46 +00:00
dependabot[bot] a5861c43f2 Bump tailscale.com from 1.88.4 to 1.90.2
Bumps [tailscale.com](https://github.com/tailscale/tailscale) from 1.88.4 to 1.90.2.
- [Release notes](https://github.com/tailscale/tailscale/releases)
- [Commits](https://github.com/tailscale/tailscale/compare/v1.88.4...v1.90.2)

---
updated-dependencies:
- dependency-name: tailscale.com
  dependency-version: 1.90.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-10-27 03:04:45 +00:00
dependabot[bot] e3025a2da2 Bump actions/upload-artifact from 4 to 5
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-10-27 03:03:53 +00:00
carterburn dd072bbdb6 Merge remote-tracking branch 'origin/master' into feature/aka-command 2025-10-26 21:48:59 -04:00
carterburn 1e3c736acf Update types to support storing aka aliases
Updated the way aka aliases are stored to support saving the aka aliases
to disk.

Aka aliases will automatically be saved to disk and loaded on client
startup.
2025-10-26 21:45:03 -04:00
Joe 3c46cf2210 Merge branch 'master' into socks5-stability 2025-10-24 11:41:27 -07:00
Joe 40cc1f4eeb Merge pull request #2024 from BishopFox/blincoln-2025-10-21-01
Fix Windows network adapter retrieval for DNS C2, add additional logging
2025-10-24 11:41:04 -07:00
carterburn 3d880914d9 Clean up settings and hook for no quotes
Previous commit forced the user to use quotes in the creation command
and in any arguments that include spaces when expanded a command alias.

This commit removes that requirement and allows the user to manipulate
the shell interface as if they were typing commands directly.
2025-10-23 20:39:19 -04:00
carterburn 1162de9ee3 Initial design of command aliases
Command aliases will allow a user to define "aliases" for shorthands and
to pass default arguments

Currently, aliases with more than one word commands (like a command
alias for "execute -o") require the use of single or double quotes to
pass the arguments correctly. Additionally, any use of flags in the
actual command will attempt to parse for the "aka" command and we want
the "aka create" command to be bare to just grab everything after the
command alias name.

Subsequent changes will include:
- better parsing of flags as described above
- saving command aliases to disk
- better help messages
2025-10-23 06:05:01 -04:00
Ben Lincoln b117a1325d Fix Windows network adapter retrieval for DNS C2, add additional logging 2025-10-21 12:08:44 -07:00
Joe a809989536 Merge pull request #2022 from BishopFox/go/v1.25.3
Update to Go v1.25.3
2025-10-19 22:11:07 -07:00
moloch-- a9ee3ca9ed Update some deps 2025-10-19 21:31:03 -07:00
moloch-- 56d972dd32 Update some deps 2025-10-19 21:17:40 -07:00
moloch-- b4091264d7 Update to Go v1.25.3 2025-10-19 21:09:39 -07:00
Joe 23bf325a66 Merge pull request #2015 from BishopFox/sgn-wasm
Sgn wasm
2025-10-19 20:42:54 -07:00
moloch-- d9344a4c79 Run native bin for unit tests 2025-10-19 19:41:04 -07:00
moloch-- 67d9a772e3 Add shellcode+sgn build to unit tests 2025-10-19 18:56:08 -07:00
moloch-- dae284e62e Add sgn unit tests to go-tests.sh 2025-10-19 18:35:11 -07:00
moloch-- 60f48bdc51 Add sgn unit tests 2025-10-19 18:26:15 -07:00
moloch-- 0d7885de29 Replace subprocess with library call 2025-10-19 17:18:34 -07:00
moloch-- d41d29fc1e Replace CGO build of sgn with wasm/pure-go 2025-10-19 17:09:36 -07:00
Joe 3f400bd3f0 Merge pull request #2004 from BishopFox/5069dependabot/github_actions/actions/upload-pages-artifact-4
Bump actions/upload-pages-artifact from 3 to 4
2025-10-12 15:39:17 -07:00
Joe d43f664821 Merge pull request #2003 from BishopFox/7682dependabot/github_actions/actions/setup-go-6
Bump actions/setup-go from 5 to 6
2025-10-12 15:39:06 -07:00
Joe 85c57c07da Merge pull request #2006 from BishopFox/3c4bdependabot/github_actions/actions/download-artifact-5
Bump actions/download-artifact from 4 to 5
2025-10-12 15:38:56 -07:00
Joe 60d15447e0 Merge pull request #2005 from BishopFox/dd46dependabot/github_actions/actions/setup-node-5
Bump actions/setup-node from 4 to 5
2025-10-12 15:38:44 -07:00
Joe 6351b2d671 Merge pull request #2007 from BishopFox/52f6dependabot/github_actions/actions/checkout-5
Bump actions/checkout from 4 to 5
2025-10-12 15:38:32 -07:00
dependabot[bot] c7535ec509 Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-10-06 03:03:10 +00:00
dependabot[bot] 67e17d073b Bump actions/download-artifact from 4 to 5
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-10-06 03:03:05 +00:00
dependabot[bot] c5cb4dcb6c Bump actions/setup-node from 4 to 5
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 5.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-10-06 03:03:02 +00:00
dependabot[bot] 0b9fe603a8 Bump actions/upload-pages-artifact from 3 to 4
Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-pages-artifact/releases)
- [Commits](https://github.com/actions/upload-pages-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-pages-artifact
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-10-06 03:02:59 +00:00
dependabot[bot] c7141892d1 Bump actions/setup-go from 5 to 6
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5 to 6.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-10-06 03:02:56 +00:00
Joe c5556f9e2b Merge pull request #2001 from BishopFox/codex/ioutil
Codex refactors ioutil usage
2025-10-05 18:06:31 -07:00
Joe 1bc45c2ab2 Merge pull request #1985 from hypnoticpattern/fix-daemon-multiplayer-conflict
Add info about potential causes for sliver daemon port binding error
2025-10-05 17:03:19 -07:00
moloch-- 739ad98b81 Codex refactors ioutil usage 2025-10-05 17:02:37 -07:00
Joe 95c1697d1b Merge pull request #1979 from z3xddd/add-ntcreatethreadex-syscall
feat: Add NtCreateThreadEx syscall for advanced evasion techniques
2025-10-05 12:09:34 -07:00
moloch-- f7b9571cfc Increase workflow time limits 2025-10-05 11:52:21 -07:00
Joe 0d08f8c62f Merge pull request #2000 from BishopFox/codex/deps
Dependency Updates
2025-10-05 11:51:52 -07:00
Joe aa9c8d89e9 Merge branch 'master' into add-ntcreatethreadex-syscall 2025-10-05 10:38:30 -07:00
moloch-- 152e60ba29 Fix fmt string syntax 2025-10-05 10:05:52 -07:00
moloch-- d13a71b808 Update most go deps, compiles okay 2025-10-05 10:04:24 -07:00
moloch-- b17e2f056f Update most go deps, compiles okay 2025-10-05 10:04:11 -07:00
moloch-- 42fb1e835e Snap to anchor on load 2025-10-04 21:09:02 -07:00
moloch-- 521356ff6e Make sidebar sticky 2025-10-04 21:03:39 -07:00
moloch-- 74b5d720b2 Fix docs build errors 2025-10-04 20:02:48 -07:00
moloch-- cd75545323 Add mobile version of docs site 2025-10-04 19:07:13 -07:00
Joe 396dc9724f Merge branch 'master' into add-ntcreatethreadex-syscall 2025-10-04 18:05:59 -07:00
moloch-- 33398146d3 Fix broken AV links 2025-10-04 18:02:52 -07:00
moloch-- 21039554e5 Add NoStarch 'Red Team Engineering' book to Community Guides 2025-10-04 18:02:07 -07:00
moloch-- cca73be1c8 Add missing types pkg 2025-10-04 17:57:09 -07:00
moloch-- 596bc455d8 Apply a pixel offset to anchor links 2025-10-04 17:55:28 -07:00
moloch-- 400c36c5df Small tweaks to how code blocks are rendered 2025-10-04 17:52:42 -07:00
moloch-- c94dde3efb Add docs watcher in dev mode, fix markdown syntax, update cross-compiler instructions 2025-10-04 17:32:26 -07:00
moloch-- 827a9ca156 Fix docs errors and warnings 2025-10-04 16:53:56 -07:00
Joe d066dbc49a Merge pull request #1999 from moloch--/codex/docs
Update Docs and Fix Various Quirks
2025-10-04 16:47:31 -07:00
Joe f1fbc345a2 Merge branch 'master' into codex/docs 2025-10-04 16:47:20 -07:00
moloch-- 2889c1ee29 Fix font for <code> 2025-10-04 16:46:31 -07:00
moloch-- 28ee216b36 Fix styling of <pre> blocks 2025-10-04 16:44:17 -07:00
moloch-- 2dd3e84f60 Re-implement markdown rendering 2025-10-04 15:39:20 -07:00
moloch-- 067cdf712d Sticky sidebar 2025-10-04 15:21:37 -07:00
moloch-- 22ae941e17 Tweak sidebar radius 2025-10-04 15:15:10 -07:00
moloch-- 7c0c2c2dda Tweak scroll styling 2025-10-04 15:12:55 -07:00
moloch-- 39de742223 Tweak styling 2025-10-04 15:10:03 -07:00
moloch-- b07e750cf5 Add missing tailwind.config.js 2025-10-04 15:06:19 -07:00
Joe 8786979001 Merge pull request #1998 from moloch--/codex/basics
Codex/basics
2025-10-04 14:53:40 -07:00
moloch-- aa223e4488 Update docs to latest tailwind, react, and heroui, some formatting broken 2025-10-04 14:26:03 -07:00
moloch-- 8785c55cf3 Update zig download to use mirrors 2025-10-04 13:27:52 -07:00
Joe 38fa64d266 Merge branch 'master' into codex/basics 2025-10-04 11:51:50 -07:00
moloch-- b04fff21fd Fix format str errors 2025-10-04 11:49:32 -07:00
moloch-- 3f656da786 Add readmes and AGENT.md 2025-10-04 10:25:58 -07:00
Joe 55311868a7 Merge pull request #1983 from hypnoticpattern/enrich-session-logs
Enrich client logging in implant sessions
2025-10-03 07:21:04 -07:00
Ronan Kervella 422a1d39c3 Merge pull request #1996 from moloch--/go/v1.25
Go v1.25.1
2025-09-18 07:57:18 -07:00
moloch-- 6938759e9d Update workflows to use go v1.25.x 2025-09-17 12:09:56 -07:00
moloch-- 5febe5e539 Go v1.25.1 2025-09-17 10:11:12 -07:00
hypnoticpattern 38479e34aa Add comment about the conflict 2025-08-10 15:02:59 -07:00
hypnoticpattern abe8f8e77b Enrich client logging in implant sessions 2025-08-10 10:39:33 -07:00
Israel Comazzetto dos Reis c0f3161525 feat: Add NtCreateThreadEx syscall for advanced evasion techniques 2025-07-29 01:57:48 -03:00
moloch-- c6bbba16e1 Go v1.24.5 2025-07-21 15:33:25 -07:00
Joe af4f99de51 Merge pull request #1970 from atomicchonk/master
Suggested adjective and noun changes
2025-07-18 07:59:28 -07:00
Max Andreacchi 8e6e8e18ad Update nouns.txt
Suggested updates to nouns list to remove some nouns that result in NSFW names upon beacon generation.

Signed-off-by: Max Andreacchi <[email protected]>
2025-07-17 20:05:13 -04:00
Max Andreacchi 544e577eb2 Update adjectives.txt
Updated list to remove adjectives that could result in NSFW names for beacons

Signed-off-by: Max Andreacchi <[email protected]>
2025-07-17 20:01:30 -04:00
Joe 9939d2c320 Merge pull request #1956 from tandem97/master
closes #1955
2025-06-30 13:28:41 -07:00
Joe f47af1e94e Merge pull request #1958 from Hunter-0x07/fix-c2generator-closure
Fix: correct closure capture in C2Generator to prevent loop variable bug
2025-06-16 17:52:10 -07:00
Hunter-0x07 d3302583f5 Fix: correct closure capture in C2Generator to prevent loop variable bug 2025-06-03 14:37:14 +08:00
tandem97 d9403c7f05 fixes #1955 2025-05-31 00:23:40 +03:00
Joe 65eb72506b Merge pull request #1947 from BishopFox/bugfix_shellcodeDefaultExport
add exports when creating profile for windows shellcode
2025-05-15 06:57:19 -07:00
Tim Makram Ghatas d86cdcad8e add exports when creating profile for windows shellcode 2025-05-15 11:53:39 +02:00
Joe 7d7f858c15 Merge pull request #1943 from Signum21/ps_faronics_anti_executable
Added ps detection for Faronics Anti-Executable processes
2025-05-13 09:08:06 -07:00
Joe ee1ad9edd1 Merge pull request #1944 from BishopFox/bugfix_addDefaultExport
Bugfix add default export
2025-05-13 09:07:52 -07:00
Tim Makram Ghatas d985564198 add exports to db for implantconfig object 2025-05-12 14:03:08 +02:00
Tim Makram Ghatas c1b5a3f7b4 ensure server generate call always has a default value for the exports variable 2025-05-12 13:52:40 +02:00
Signum21 927ff9c4ab Added ps detection for Faronics Anti-Executable processes
Signed-off-by: Signum21 <[email protected]>
2025-05-09 00:07:37 +02:00
Joe 3411b438b6 Merge pull request #1942 from BishopFox/doc_1.6_update
Doc 1.6 update
2025-05-08 11:20:02 -07:00
Joe 40bc0d6464 Merge pull request #1941 from BishopFox/fix_pivots
Fix pivots
2025-05-08 11:13:03 -07:00
Tim Makram Ghatas b0639275f4 Merge branch 'master' into doc_1.6_update 2025-05-08 20:11:15 +02:00
Tim Makram Ghatas 6216cd1dc6 update c2profile docs 2025-05-08 20:10:44 +02:00
Joe 78e6b3a9b3 Merge branch 'master' into fix_pivots 2025-05-07 07:48:33 -07:00
Joe 509d1b46ff Merge pull request #1940 from BishopFox/add_implant_configurations
Bugfixes and additional compilation options
2025-05-07 07:48:23 -07:00
Tim Makram Ghatas f06b2c2192 Merge branch 'master' into fix_pivots 2025-05-07 14:58:54 +02:00
Tim Makram Ghatas 4138ddd84a fix multiLibrary test 2025-05-05 23:46:37 +02:00
Tim Makram Ghatas e9a300bab2 add duplicate implant running check for all exports 2025-05-05 16:20:18 +02:00
Tim Makram Ghatas 6edd10a010 allow specifying exports in generate command 2025-05-05 16:17:13 +02:00
Tim Makram Ghatas b438df4db9 add donut bypass field to server.json 2025-04-26 11:25:58 +01:00
Tim Makram Ghatas 49eab476bb update base58 id write in implant 2025-04-26 09:34:56 +01:00
Joe 8976654010 Merge pull request #1928 from BishopFox/v1.6.0/fix-beacon-tasks
Fixes for Issues with Beacon Tasks
2025-04-22 18:51:26 -07:00
Ronan Kervella a78b8c2097 Merge branch 'master' into v1.6.0/fix-beacon-tasks 2025-04-21 10:52:42 -07:00
Ronan Kervella 5709bb9a24 Merge pull request #1935 from BishopFox/v1.6.0/ps-toggle-info
Simplified Default ps Output
2025-04-21 10:52:24 -07:00
Raf 25668a6d82 Correcting condition in client ps command 2025-04-21 12:57:50 -04:00
rkervella 87dfe96ee9 Remove insertion to db, already performed elsewhere 2025-04-18 12:32:48 -07:00
rkervella 5bb4338d76 Add an IPTable to the tun device and set the default INPUT
chain to deny everything. Add an `AllowTCPPort` method to add
exceptions at runtime.
2025-04-18 12:31:45 -07:00
rkervella bb35fa56d6 Use AllowTCPPort to whitelist the required ports for the wg listner 2025-04-18 12:30:59 -07:00
rkervella fbab18b2fe Remove job insertion to db, already done elsewhere 2025-04-18 12:30:22 -07:00
Raf 3ae8353030 Changes to reduce the amount of information pulled by ps by default, changing deprecated x/sys/windows calls 2025-04-15 08:27:32 -04:00
Raf a3d053bde5 Merge branch 'master' into v1.6.0/fix-beacon-tasks 2025-04-14 08:17:01 -04:00
Tim Makram Ghatas 7e27a18245 Merge branch 'master' into fix_pivots 2025-04-12 18:07:33 +02:00
Tim Makram Ghatas 6d09b27c85 updated documentation for 1.6 2025-04-11 17:26:47 +02:00
Tim Makram Ghatas c389bac46e bugfix - switch pivot decryption to alternative function without signature verification 2025-04-11 17:23:35 +02:00
Raf fae8e77665 Fix SQL issues when accessing or cancelling beacon tasks, fix panic when cancelling a task by ID 2025-04-11 10:59:55 -04:00
Joe 38cf0aeb8b Merge pull request #1924 from mosesrenegade/master
Cursed Chrome Cookie Fix
2025-04-11 07:36:02 -07:00
Joe a755750a89 Merge pull request #1926 from BishopFox/bugfix_listeners
Bugfix listeners
2025-04-11 07:35:37 -07:00
Tim Makram Ghatas 555ee5c63d remove unused persistent flags 2025-04-11 15:45:18 +02:00
Tim Makram Ghatas 0fc51677c1 fix bug for payload staging 2025-04-11 13:54:00 +02:00
Tim Makram Ghatas cc1c7a5364 crop c2profile output to 50 char max for paths and files 2025-04-11 13:53:18 +02:00
Timothy Makram Ghatas d1fa99d6eb Merge branch 'master' into bugfix_listeners 2025-04-11 01:25:43 +02:00
Timothy Makram Ghatas 6697801f59 Merge pull request #1925 from BishopFox/bof_flag_args
Bof flag args
2025-04-11 01:25:09 +02:00
Tim Makram Ghatas 32fa69356c fix to address integer conversion in bof default value routine written by ccardio 2025-04-10 21:52:28 +02:00
Timothy Makram Ghatas c42d754e72 Update list.go
remove outer loop and switch to contains for extension lists

Signed-off-by: Timothy Makram Ghatas <[email protected]>
2025-04-10 21:50:35 +02:00
c2biz e4babaf471 add flag-style arg parsing for BOF extensions 2025-04-10 15:42:04 -04:00
c2biz da196a789d fix DLL based extension argument parsing 2025-04-10 15:39:35 -04:00
c2biz 6a656d63ab Merge branch 'extensions_cmd_improvements' into bof_flag_args 2025-04-10 15:27:47 -04:00
c2biz b0e226199a Merge remote-tracking branch 'origin/master' into extensions_cmd_improvements 2025-04-10 15:27:43 -04:00
Tim Makram Ghatas 7cce6b17b2 fix console test 2025-04-10 19:16:07 +02:00
Tim Makram Ghatas d07aae4d0b restrict operator certificates to SHA256 to fix grpcio bugs (#1877) 2025-04-10 18:45:40 +02:00
Tim Makram Ghatas f4a2ba536c store tcp listener in database 2025-04-10 18:29:35 +02:00
Moses Frost 2bbd69719d This commit is a fix for the Cursed module cookie subcommand. The library upstream changed it's cookie values from a string value to a struct and the download command needed to be modified to work with the struct 2025-04-09 16:05:17 -04:00
Joe cf4ff14342 Merge pull request #1914 from m1tm4n404/from-as-casting
build Dockerfile: use uppercase FROM / AS combination
2025-03-31 08:14:11 -07:00
Timothy Makram Ghatas ae3a2fd51e Merge pull request #1919 from BishopFox/extend_nonce_configurations
Extend nonce configurations
2025-03-31 17:13:52 +02:00
Tim Makram Ghatas d14ba3d35f Merge branch 'master' into extend_nonce_configurations 2025-03-27 22:40:00 +01:00
Tim Makram Ghatas 10ef8b3e88 remove need for http job restart on c2profile import and allow hiding nonce in url segment instead of a parameter 2025-03-27 02:01:26 +01:00
Tim Makram Ghatas 4bc65e2193 allow specifying implant name for profile generate and fix duplicate name bug 2025-03-27 00:35:12 +01:00
Tim Makram Ghatas a45a5795d3 fix autocompletion for c2profile in generate 2025-03-27 00:06:03 +01:00
Tim Makram Ghatas e1c5b77db4 add default server header to server json config for anonymous requests 2025-03-26 23:58:43 +01:00
Tim Makram Ghatas 280d08d074 refactored nonce parsing in url parameters 2025-03-25 14:25:47 +01:00
svd 1d55b34b62 fixing from as casting 2025-03-23 15:18:36 +03:00
Joe d32302a1ab Merge pull request #1911 from kmathisbf/ps_cortex
Add Palo Alto Cortex XDR binaries to `knownSecurityTools`
2025-03-18 18:36:40 -07:00
kmathisbf 2eabfc255b Fix typo 2025-03-18 18:10:23 -04:00
kmathisbf d0375da6e4 Add Palo Alto Cortex processes to knownSecurityTools 2025-03-18 18:02:15 -04:00
Tim Makram Ghatas 4523c83b89 fix implant bug for url generation 2025-03-11 16:25:36 +01:00
Tim Makram Ghatas 1decc7f462 update client side c2 profile to match new format 2025-03-10 15:42:57 +01:00
Tim Makram Ghatas f97a1e3fdf remove legacy c2profile import validation 2025-03-10 15:19:24 +01:00
Tim Makram Ghatas 1e12ea3242 remove support for default server header when unauthenticated, to be reimplemented later on 2025-03-10 15:17:09 +01:00
Tim Makram Ghatas 8919bc3b07 update http c2 config and remove segmenttype from model and protobuf 2025-03-10 15:12:57 +01:00
Tim Makram Ghatas 1a2b392d20 remove unused queries from helpers 2025-03-10 14:58:54 +01:00
Tim Makram Ghatas 11a6584973 update http c2 model 2025-03-10 14:55:49 +01:00
Tim Makram Ghatas 1e06fe6612 update protobuf to merge all http extensions into an array and split max/min generation and implant configuration variables 2025-03-10 14:55:13 +01:00
Tim Makram Ghatas 65ee18026e update server side code to remove the need for url extensions in http handler 2025-03-07 19:07:56 +01:00
Tim Makram Ghatas 9c1617c213 add noncequerylength to implant 2025-03-07 16:21:04 +01:00
Tim Makram Ghatas d74067ddff allow arbitrary nonce length in c2profile server side 2025-02-25 19:51:33 +01:00
Tim Makram Ghatas 60772c7659 add default length for url nonce length 2025-02-25 17:36:49 +01:00
Tim Makram Ghatas 25a70e6e4f add nonce length to protobuf definition and db model 2025-02-25 17:23:30 +01:00
Joe a89675d961 Merge pull request #1879 from BishopFox/fix_missing_extension
Keep track of file extension
2025-02-21 08:05:41 -07:00
Joe 0f340a25cf Merge pull request #1889 from BishopFox/fix/GHSA-fh4v-v779-4g2w
Track tunnel creation for `rportfwd`
2025-02-14 09:27:58 -06:00
Joe 9cdc326b57 Merge pull request #1882 from BishopFox/fix_1842
missing default value
2025-02-14 09:27:43 -06:00
Ronan Kervella 3faabd36c1 Merge branch 'master' into fix_missing_extension 2025-02-13 15:18:07 -08:00
Ronan Kervella 113ef5d7d0 Merge branch 'master' into fix_1842 2025-02-13 15:16:52 -08:00
Tim Makram Ghatas 9fa1e15425 set stage2 before encryption/compression 2025-02-10 13:48:20 +01:00
Tim Makram Ghatas 2d9a46543d Keep track of file extension in implant config and automatically append correct extension when saving builds 2025-02-09 17:46:33 +01:00
rkervella e5e589e1b0 Simplify expression 2025-02-08 11:13:01 -08:00
rkervella 2e0fab3a71 Track reverse portfwd state 2025-02-08 11:09:54 -08:00
Joe 2f486be19c Merge pull request #1872 from BishopFox/go/v1.23.5
Update to Go v1.23.5 and Garble v1.23.5
2025-02-05 10:56:03 -06:00
moloch-- 85868e5b8f Update to Go v1.23.5 and Garble v1.23.5 2025-01-29 11:28:42 -07:00
Joe 31c70938bd Merge pull request #1858 from BishopFox/48b9dependabot/go_modules/golang.org/x/net-0.33.0
Bump golang.org/x/net from 0.26.0 to 0.33.0
2025-01-21 11:07:27 -06:00
c2biz 99571dc73e fix bug in extensions rm command 2025-01-21 10:54:32 -05:00
c2biz 5c2848c84c improve extensions list output 2025-01-21 07:26:06 -05:00
c2biz ffcfa8d1b5 add extension short help to SliverCommand help menu 2025-01-20 14:20:09 -05:00
c2biz debc03203c restrict 'extensions list' sub-command to session mode 2025-01-20 14:07:45 -05:00
dependabot[bot] 63668f57b5 Bump golang.org/x/net from 0.26.0 to 0.33.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.26.0 to 0.33.0.
- [Commits](https://github.com/golang/net/compare/v0.26.0...v0.33.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-01-20 18:01:38 +00:00
Joe aefe6b31e9 Merge pull request #1854 from BishopFox/74eedependabot/go_modules/golang.org/x/crypto-0.32.0
Bump golang.org/x/crypto from 0.29.0 to 0.32.0
2025-01-20 12:00:00 -06:00
Joe f854af1134 Merge pull request #1855 from BishopFox/abide_generate_name
Abide generate name
2025-01-20 11:59:44 -06:00
Joe a9ef42a416 Merge branch 'master' into abide_generate_name 2025-01-20 11:03:14 -06:00
Joe 67c6140e6a Merge pull request #1857 from BishopFox/v1.6.0/download-refactor
Simplifying Implant Download Code
2025-01-20 11:02:33 -06:00
c2biz b84037af11 fix bug in PrintExtensions 2025-01-17 18:11:11 -05:00
c2biz 61ed176683 fix dupe issue in GetAllExtensionManifests() 2025-01-17 17:51:08 -05:00
c2biz 12e44644ed introduce package_name field 2025-01-17 15:16:03 -05:00
Raf 59352177eb Simplifying file downloads to address issue #1812 2025-01-17 12:30:49 -05:00
c2biz 0b185cc885 fix bin path bug for temp-installed extensions and display bug in PrintExtensions() 2025-01-17 00:20:28 -05:00
c2biz ae0c106595 add GetAllExtensionManifests() to obtain installed and temp-installed extensions 2025-01-16 23:53:18 -05:00
c2biz 6d2b0f8319 fix bug for temporarily installed (extensions load) extensions 2025-01-16 18:34:46 -05:00
c2biz 60443f4fc7 split extensions' subcommands: 'install', 'load', 'rm' in server context and 'list' in sliver context 2025-01-16 12:27:57 -05:00
c2biz 418fe757d1 moved extensions command from sliver to server menu 2025-01-16 08:57:57 -05:00
c2biz c9a624831a fix input bug to AllowedName in GenerateExternal() 2025-01-15 09:23:02 -05:00
c2biz ed64f2e0d2 fix bug ignoring supplied name for generate functions 2025-01-15 08:40:45 -05:00
dependabot[bot] 5f18609ed7 Bump golang.org/x/crypto from 0.29.0 to 0.32.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.29.0 to 0.32.0.
- [Commits](https://github.com/golang/crypto/compare/v0.29.0...v0.32.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-01-13 03:30:28 +00:00
Timothy Makram Ghatas 53c61cb024 Merge pull request #1844 from w4lle-code/fix_c2profile_import_overwrite_url_parameters
fix to import overwrite c2Profile to url_parameters
2025-01-07 16:25:50 +01:00
Timothy Makram Ghatas 3d70247f8b Update httpclient.go - use updated uri for debug logs
Signed-off-by: Timothy Makram Ghatas <[email protected]>
2025-01-07 15:33:29 +01:00
Timothy Makram Ghatas 52b1c7b93b Merge branch 'master' into fix_c2profile_import_overwrite_url_parameters 2025-01-07 14:57:24 +01:00
Timothy Makram Ghatas daeb463f77 Update httpclient.go
add check for method in implant httpclient

Signed-off-by: Timothy Makram Ghatas <[email protected]>
2025-01-07 14:46:32 +01:00
Joe 0c75f70a1d Merge pull request #1847 from BishopFox/404ddependabot/npm_and_yarn/docs/sliver-docs/next-14.2.22
Bump next from 14.2.20 to 14.2.22 in /docs/sliver-docs
2025-01-06 13:41:51 -06:00
AndresFelipeGualdron 674df112a4 adding method of url parameter in template 2025-01-04 20:12:10 -05:00
AndresFelipeGualdron 26efc776c7 fix to import no overwrite c2Profile 2025-01-03 22:32:53 -05:00
dependabot[bot] f221dc95cf Bump next from 14.2.20 to 14.2.22 in /docs/sliver-docs
Bumps [next](https://github.com/vercel/next.js) from 14.2.20 to 14.2.22.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.2.20...v14.2.22)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-01-04 02:59:04 +00:00
AndresFelipeGualdron 187fc6acd2 fix to import overwrite c2Profile to url_parameters 2025-01-03 12:01:42 -05:00
Joe 9ecb68f6a3 Merge pull request #1841 from BishopFox/fix_c2profile_display
fix broken pr for http headers and add additional constraints for c2p…
2025-01-02 20:42:29 -06:00
Tim Makram Ghatas f0113655ce fix broken pr for http headers and add additional constraints for c2profile import 2025-01-02 14:53:31 +01:00
Joe 31265c626b Merge pull request #1836 from BishopFox/b3f8dependabot/npm_and_yarn/docs/sliver-docs/next-14.2.20
Bump next from 14.2.12 to 14.2.20 in /docs/sliver-docs
2024-12-18 15:26:49 -06:00
dependabot[bot] e2603ac3ae Bump next from 14.2.12 to 14.2.20 in /docs/sliver-docs
Bumps [next](https://github.com/vercel/next.js) from 14.2.12 to 14.2.20.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.2.12...v14.2.20)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-12-18 19:02:18 +00:00
Ronan Kervella edcdfb5937 Merge branch 'master' into socks5-stability 2024-12-04 09:36:59 -10:00
Ronan Kervella 7acbed9637 Merge pull request #1724 from BishopFox/4ddedependabot/go_modules/gorm.io/driver/postgres-1.5.9
Bump gorm.io/driver/postgres from 1.5.7 to 1.5.9
2024-12-03 10:33:02 -10:00
Ronan Kervella 20786fa6fb Merge branch 'master' into 4ddedependabot/go_modules/gorm.io/driver/postgres-1.5.9
Signed-off-by: Ronan Kervella <[email protected]>
2024-12-03 10:34:33 -08:00
Ronan Kervella 03c750a8b5 Merge pull request #1741 from BishopFox/378ddependabot/go_modules/gorm.io/driver/mysql-1.5.7
Bump gorm.io/driver/mysql from 1.5.6 to 1.5.7
2024-12-03 10:30:21 -08:00
Ronan Kervella 4da8c6053f Merge branch 'master' into 4ddedependabot/go_modules/gorm.io/driver/postgres-1.5.9 2024-12-02 16:12:23 -08:00
Ronan Kervella a43061c61b Merge branch 'master' into 378ddependabot/go_modules/gorm.io/driver/mysql-1.5.7 2024-12-02 15:40:49 -08:00
Ronan Kervella f81efdb38c Merge branch 'master' into socks5-stability 2024-12-02 15:40:40 -08:00
Ronan Kervella 11dc6bac4d Merge pull request #1824 from BishopFox/b42adependabot/go_modules/github.com/ncruces/go-sqlite3-0.20.3
Bump github.com/ncruces/go-sqlite3 from 0.15.0 to 0.20.3
2024-12-02 15:39:58 -08:00
dependabot[bot] 7d5a886397 Bump github.com/ncruces/go-sqlite3 from 0.15.0 to 0.20.3
Bumps [github.com/ncruces/go-sqlite3](https://github.com/ncruces/go-sqlite3) from 0.15.0 to 0.20.3.
- [Release notes](https://github.com/ncruces/go-sqlite3/releases)
- [Commits](https://github.com/ncruces/go-sqlite3/compare/v0.15.0...v0.20.3)

---
updated-dependencies:
- dependency-name: github.com/ncruces/go-sqlite3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-12-02 03:42:38 +00:00
Joe 77aef8179d Merge branch 'master' into 4ddedependabot/go_modules/gorm.io/driver/postgres-1.5.9 2024-11-25 10:28:39 -06:00
Ronan Kervella db34ded0a1 Merge branch 'master' into socks5-stability 2024-11-18 15:06:32 -08:00
navsec 8a7a92a9b9 Refine implant/server signaling for tunnel closures 2024-11-18 17:02:15 -06:00
navsec 3eda32f9d7 Performance Optimizations and Implant SOCKS Changes 2024-11-17 15:01:04 -06:00
Joe 69e7c8ce71 Merge pull request #1811 from rwincey/c2_profile_headers_fix
Fixed implant custom HTTP header code
2024-11-11 14:40:00 -06:00
navsec c18c193ea7 Improve SOCKS lifecycle mangement and resolve leak 2024-11-06 23:24:44 -06:00
b0yd 82e294e3ef Gofmt 2024-11-06 15:40:48 +00:00
b0yd ccf3701011 Fixed implant custom HTTP header code 2024-11-06 15:26:40 +00:00
navsec 79a8758448 SOCKS5 Stability Improvements for HTTP/mTLS 2024-10-31 12:46:40 -05:00
Joe e4b64e1050 Merge pull request #1800 from toasted-time-traveller/fix-wording
Added a missing word and a missing period.
2024-10-30 12:19:52 -05:00
Joe 0b8f702aa0 Merge pull request #1787 from An00bRektn/master
Update link in Community Guides section of docs
2024-10-30 12:19:14 -05:00
Ronan Kervella 8caf90536b Merge branch 'master' into master 2024-10-30 08:27:08 -07:00
toasted-time-traveller 50e7d89576 Added the missing word 'at' to the note section and a period to the 'Feedback' section in README 2024-10-23 03:38:28 +02:00
Joe fe5e9382d7 Merge pull request #1796 from AD2011/patch-1
Correct Windows compile command
2024-10-17 10:40:53 -05:00
Abir Dey 934c01f08d Correct Windows compile command
Signed-off-by: Abir Dey <[email protected]>
2024-10-17 14:17:28 +05:30
An00bRektn 4ced15e528 Changed link to point to updated location 2024-10-04 17:14:39 -05:00
Joe 3c151ed172 Merge pull request #1784 from BishopFox/docs/community-guides
Add detecting sliver c2 with zeek to community guides
2024-09-29 17:04:22 -05:00
moloch-- dd09895d7e Add detecting sliver c2 with zeek to community guides 2024-09-26 13:02:06 -04:00
Joe 3dd2b2ddce Merge pull request #1779 from AFrenchBanana/fix/DuplicateWord
Removed duplicate word from help menu
2024-09-22 13:28:01 -05:00
Joe e4027d6373 Merge pull request #1780 from BishopFox/7953dependabot/npm_and_yarn/docs/sliver-docs/next-14.2.12
Bump next from 14.2.3 to 14.2.12 in /docs/sliver-docs
2024-09-19 09:40:59 -05:00
dependabot[bot] 7e880d33c7 Bump next from 14.2.3 to 14.2.12 in /docs/sliver-docs
Bumps [next](https://github.com/vercel/next.js) from 14.2.3 to 14.2.12.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.2.3...v14.2.12)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-09-18 02:47:07 +00:00
ryan dodd 356b17160e Removed duplicate word from comment 2024-09-17 21:34:09 +01:00
Joe 9a9b0c74ba Merge pull request #1763 from BishopFox/1cbddependabot/go_modules/github.com/tetratelabs/wazero-1.8.0
Bump github.com/tetratelabs/wazero from 1.7.2 to 1.8.0
2024-09-07 15:39:38 -05:00
Joe dbde661d90 Merge pull request #1772 from BishopFox/2e71dependabot/npm_and_yarn/docs/sliver-docs/micromatch-4.0.8
Bump micromatch from 4.0.5 to 4.0.8 in /docs/sliver-docs
2024-09-07 15:15:50 -05:00
dependabot[bot] 8904267cad Bump micromatch from 4.0.5 to 4.0.8 in /docs/sliver-docs
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-09-07 10:28:02 +00:00
Joe c58cb2d4e7 Merge pull request #1765 from BishopFox/go/v1.22.5
Go 1.22.5, Zig 0.13.0
2024-08-23 13:47:48 -05:00
moloch-- cf971ea599 Go 1.22.5, Zig 0.13.0 2024-08-23 10:26:52 -07:00
Ronan Kervella 71c922c914 Merge pull request #1762 from martinboca/docs/fix-typos
fixed typos in docs
2024-08-20 11:04:40 -07:00
dependabot[bot] 3607b526f0 Bump github.com/tetratelabs/wazero from 1.7.2 to 1.8.0
Bumps [github.com/tetratelabs/wazero](https://github.com/tetratelabs/wazero) from 1.7.2 to 1.8.0.
- [Release notes](https://github.com/tetratelabs/wazero/releases)
- [Commits](https://github.com/tetratelabs/wazero/compare/v1.7.2...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/tetratelabs/wazero
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-08-19 03:25:13 +00:00
Martín Bocanegra 1c87e8134c fixed typos 2024-08-18 21:40:11 -03:00
Ronan Kervella 2a849312cc Merge branch 'master' into 378ddependabot/go_modules/gorm.io/driver/mysql-1.5.7 2024-07-31 13:21:26 -07:00
Ronan Kervella 127caf54ae Merge pull request #1740 from BishopFox/e942dependabot/go_modules/golang.org/x/crypto-0.25.0
Bump golang.org/x/crypto from 0.24.0 to 0.25.0
2024-07-31 13:21:13 -07:00
Ronan Kervella 5902f4b02d Merge branch 'master' into e942dependabot/go_modules/golang.org/x/crypto-0.25.0 2024-07-31 12:08:33 -07:00
Joe 40dfa95291 Merge pull request #1752 from BishopFox/wiki_1.6_update
Wiki 1.6 update
2024-07-22 16:31:31 -05:00
Tim Makram Ghatas b8cef5fbd6 removed broken links from chapter 7 and added disclaimer to all pages 2024-07-22 21:26:49 +02:00
Tim Makram Ghatas eed6890700 update tutorial text and add 1.6 disclaimer 2024-07-22 20:14:34 +02:00
Tim Makram Ghatas 36e0c71b10 Merge branch 'master' into wiki_1.6_update 2024-07-22 19:50:58 +02:00
dependabot[bot] 1bf020c594 Bump gorm.io/driver/mysql from 1.5.6 to 1.5.7
Bumps [gorm.io/driver/mysql](https://github.com/go-gorm/mysql) from 1.5.6 to 1.5.7.
- [Commits](https://github.com/go-gorm/mysql/compare/v1.5.6...v1.5.7)

---
updated-dependencies:
- dependency-name: gorm.io/driver/mysql
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-07-18 18:08:17 +00:00
dependabot[bot] 072111a692 Bump golang.org/x/crypto from 0.24.0 to 0.25.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.24.0 to 0.25.0.
- [Commits](https://github.com/golang/crypto/compare/v0.24.0...v0.25.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-07-18 18:08:15 +00:00
Joe 2cd7a96324 Merge pull request #1743 from BishopFox/49f9dependabot/go_modules/google.golang.org/grpc-1.64.1
Bump google.golang.org/grpc from 1.64.0 to 1.64.1
2024-07-18 13:05:58 -05:00
Joe d8ff64222d Merge pull request #1751 from BishopFox/v1.6.0/remove-msf-stager
Removing generate msf-stager command
2024-07-18 13:03:49 -05:00
Raf 0deaee625d Removing generate msf-stager command
Removing the generate msf-stager command and adding documentation on how to use msfvenom / msfconsole to generate stager binaries.
2024-07-18 13:14:16 -04:00
Ronan Kervella bdfd89167d Merge pull request #1737 from lip234/master
Fixes #1736
2024-07-11 10:53:34 -07:00
dependabot[bot] 6b35032c0e Bump google.golang.org/grpc from 1.64.0 to 1.64.1
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.64.0 to 1.64.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.64.0...v1.64.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-07-09 21:45:35 +00:00
lip234 8bf4f8ef02 Fixes #1736
Fixes issue in the implant where `ps` command leads to infinite loop on Darwin under certain conditions.
2024-07-08 13:35:30 -06:00
Ronan Kervella 7676fc6c37 Merge pull request #1720 from BishopFox/9d54dependabot/npm_and_yarn/docs/sliver-docs/braces-3.0.3
Bump braces from 3.0.2 to 3.0.3 in /docs/sliver-docs
2024-07-03 10:05:45 -07:00
Ronan Kervella d2ff8dca46 Merge branch 'master' into 9d54dependabot/npm_and_yarn/docs/sliver-docs/braces-3.0.3 2024-07-02 15:09:08 -07:00
Ronan Kervella 9c3d7abff5 Merge pull request #1723 from BishopFox/b71edependabot/go_modules/modernc.org/sqlite-1.30.1
Bump modernc.org/sqlite from 1.30.0 to 1.30.1
2024-07-02 15:08:41 -07:00
Ronan Kervella 4df4e21255 Merge branch 'master' into b71edependabot/go_modules/modernc.org/sqlite-1.30.1 2024-07-02 12:59:33 -07:00
Ronan Kervella 3fdde93255 Merge pull request #1733 from BishopFox/2d74dependabot/go_modules/github.com/spf13/cobra-1.8.1
Bump github.com/spf13/cobra from 1.8.0 to 1.8.1
2024-07-02 12:59:14 -07:00
dependabot[bot] 65a7faebd5 Bump github.com/spf13/cobra from 1.8.0 to 1.8.1
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-07-01 03:57:53 +00:00
Ronan Kervella c3b0909be0 Merge branch 'master' into 4ddedependabot/go_modules/gorm.io/driver/postgres-1.5.9 2024-06-28 11:10:57 -07:00
Ronan Kervella 641361d7c3 Merge pull request #1722 from BishopFox/cacfdependabot/go_modules/github.com/klauspost/compress-1.17.9
Bump github.com/klauspost/compress from 1.17.8 to 1.17.9
2024-06-28 10:44:17 -07:00
dependabot[bot] 4a149f073a Bump gorm.io/driver/postgres from 1.5.7 to 1.5.9
Bumps [gorm.io/driver/postgres](https://github.com/go-gorm/postgres) from 1.5.7 to 1.5.9.
- [Commits](https://github.com/go-gorm/postgres/compare/v1.5.7...v1.5.9)

---
updated-dependencies:
- dependency-name: gorm.io/driver/postgres
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-06-17 03:11:56 +00:00
dependabot[bot] ba43b3fd4b Bump modernc.org/sqlite from 1.30.0 to 1.30.1
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.30.0 to 1.30.1.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.30.0...v1.30.1)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-06-17 03:11:48 +00:00
dependabot[bot] 5c2314702b Bump github.com/klauspost/compress from 1.17.8 to 1.17.9
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.17.8 to 1.17.9.
- [Release notes](https://github.com/klauspost/compress/releases)
- [Changelog](https://github.com/klauspost/compress/blob/master/.goreleaser.yml)
- [Commits](https://github.com/klauspost/compress/compare/v1.17.8...v1.17.9)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-06-17 03:11:31 +00:00
Joe 3051de7a61 Merge pull request #1711 from BishopFox/8a2bdependabot/go_modules/golang.org/x/crypto-0.24.0
Bump golang.org/x/crypto from 0.23.0 to 0.24.0
2024-06-15 12:11:12 -05:00
dependabot[bot] 1abf8e54c3 Bump braces from 3.0.2 to 3.0.3 in /docs/sliver-docs
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-06-15 17:10:59 +00:00
Joe 93624cdb2d Merge pull request #1712 from BishopFox/e733dependabot/go_modules/modernc.org/sqlite-1.30.0
Bump modernc.org/sqlite from 1.29.10 to 1.30.0
2024-06-15 12:10:24 -05:00
dependabot[bot] a7c6ea1f43 Bump modernc.org/sqlite from 1.29.10 to 1.30.0
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.29.10 to 1.30.0.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.29.10...v1.30.0)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-06-10 03:32:41 +00:00
dependabot[bot] f23093c3a9 Bump golang.org/x/crypto from 0.23.0 to 0.24.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.23.0 to 0.24.0.
- [Commits](https://github.com/golang/crypto/compare/v0.23.0...v0.24.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-06-10 03:31:01 +00:00
Ronan Kervella 6f4a150d82 Merge pull request #1705 from BishopFox/autoremove_socks_proxies
autoremove socks proxies
2024-06-03 09:31:59 -07:00
Tim Makram Ghatas 6790cd1647 automatically remove socks proxies during a kill/close command for a session 2024-06-02 15:06:38 +02:00
Joe 05408ef4ea Merge pull request #1700 from BishopFox/0850dependabot/go_modules/tailscale.com-1.66.4
Bump tailscale.com from 1.66.3 to 1.66.4
2024-05-31 10:41:32 -05:00
Joe 2bc3fe8a57 Merge pull request #1704 from BishopFox/improve_socks_menu
Improve socks menu
2024-05-31 10:40:48 -05:00
Joe 015942a1e4 Merge pull request #1703 from BishopFox/implement_clean_command
Implement clean command
2024-05-31 10:40:00 -05:00
Tim Makram Ghatas 321da76fd9 add server command to list/stop socks proxies and modify implant socks command to only display proxies for the currently selected session 2024-05-31 12:41:29 +02:00
Tim Makram Ghatas 2407b4dd2e remove profiles and implants. Beacons are just removed instead of killing them. 2024-05-31 12:10:49 +02:00
Tim Makram Ghatas ea06daa5ac add clean command and function definitions 2024-05-31 11:46:54 +02:00
dependabot[bot] f67b08768d Bump tailscale.com from 1.66.3 to 1.66.4
Bumps [tailscale.com](https://github.com/tailscale/tailscale) from 1.66.3 to 1.66.4.
- [Release notes](https://github.com/tailscale/tailscale/releases)
- [Commits](https://github.com/tailscale/tailscale/compare/v1.66.3...v1.66.4)

---
updated-dependencies:
- dependency-name: tailscale.com
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-05-27 03:35:03 +00:00
Joe d0e5fbb680 Merge pull request #1693 from BishopFox/981ddependabot/go_modules/google.golang.org/grpc-1.64.0
Bump google.golang.org/grpc from 1.63.2 to 1.64.0
2024-05-22 13:48:45 -05:00
dependabot[bot] 6dd56bbfd5 Bump google.golang.org/grpc from 1.63.2 to 1.64.0
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.63.2 to 1.64.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.63.2...v1.64.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-05-22 15:47:44 +00:00
Joe 8f15f896ac Merge pull request #1697 from BishopFox/1071dependabot/go_modules/modernc.org/sqlite-1.29.10
Bump modernc.org/sqlite from 1.29.9 to 1.29.10
2024-05-22 10:46:17 -05:00
Joe a0706ffc1f Merge pull request #1699 from BishopFox/fix_externalbuild_encoderids
send encoder id's to external server during external implant generation
2024-05-22 09:40:30 -05:00
Ronan Kervella 550700de98 Merge branch 'master' into fix_externalbuild_encoderids 2024-05-22 06:49:01 -07:00
dependabot[bot] 652d960d59 Bump modernc.org/sqlite from 1.29.9 to 1.29.10
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.29.9 to 1.29.10.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.29.9...v1.29.10)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-05-21 21:39:28 +00:00
Ronan Kervella 292f41c665 Merge pull request #1696 from BishopFox/b516dependabot/go_modules/github.com/tetratelabs/wazero-1.7.2
Bump github.com/tetratelabs/wazero from 1.7.1 to 1.7.2
2024-05-21 14:32:56 -07:00
dependabot[bot] ef324e8b9d Bump github.com/tetratelabs/wazero from 1.7.1 to 1.7.2
Bumps [github.com/tetratelabs/wazero](https://github.com/tetratelabs/wazero) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/tetratelabs/wazero/releases)
- [Commits](https://github.com/tetratelabs/wazero/compare/v1.7.1...v1.7.2)

---
updated-dependencies:
- dependency-name: github.com/tetratelabs/wazero
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-05-21 17:09:18 +00:00
Joe a405ae8f20 Merge pull request #1694 from BishopFox/e220dependabot/go_modules/tailscale.com-1.66.3
Bump tailscale.com from 1.64.2 to 1.66.3
2024-05-21 12:08:00 -05:00
Ronan Kervella 222cc3437b Merge branch 'master' into e220dependabot/go_modules/tailscale.com-1.66.3 2024-05-21 08:35:08 -07:00
Ronan Kervella fdeca972bd Merge pull request #1692 from BishopFox/generate_c2profiles
improve c2profiles command
2024-05-20 15:30:59 -07:00
Tim Makram Ghatas 69bcf72e80 send encoder id's to external server during external implant generation 2024-05-21 00:04:33 +02:00
Timothy Makram Ghatas d60dd6a5a0 Merge branch 'master' into generate_c2profiles 2024-05-20 23:26:37 +02:00
Tim Makram Ghatas 8737bba4c3 enforce unique startsession extensions 2024-05-20 23:25:10 +02:00
Tim Makram Ghatas 97716d2b9e only stager extensions need to be unique 2024-05-20 23:01:38 +02:00
Tim Makram Ghatas 844a6f8d25 check there are sufficient unused extensions in the provided file 2024-05-20 22:58:09 +02:00
Tim Makram Ghatas b6f2c1b4bb fix documentation for generate command 2024-05-20 22:23:56 +02:00
Ronan Kervella c6397918c6 Merge branch 'master' into e220dependabot/go_modules/tailscale.com-1.66.3 2024-05-20 11:02:00 -07:00
Ronan Kervella 848704eb3c Merge pull request #1695 from BishopFox/0bafdependabot/go_modules/github.com/fatih/color-1.17.0
Bump github.com/fatih/color from 1.16.0 to 1.17.0
2024-05-20 11:01:48 -07:00
dependabot[bot] c3571b001a Bump github.com/fatih/color from 1.16.0 to 1.17.0
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.16.0 to 1.17.0.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.16.0...v1.17.0)

---
updated-dependencies:
- dependency-name: github.com/fatih/color
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-05-20 03:37:24 +00:00
dependabot[bot] 53449c1a83 Bump tailscale.com from 1.64.2 to 1.66.3
Bumps [tailscale.com](https://github.com/tailscale/tailscale) from 1.64.2 to 1.66.3.
- [Release notes](https://github.com/tailscale/tailscale/releases)
- [Commits](https://github.com/tailscale/tailscale/compare/v1.64.2...v1.66.3)

---
updated-dependencies:
- dependency-name: tailscale.com
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-05-20 03:37:15 +00:00
Tim Makram Ghatas cf6682dff7 allow generating c2profiles using a file containing one url per line. Fix autocomplete for export c2profile name 2024-05-19 13:18:26 +02:00
Joe 2a1453ee37 Merge pull request #1691 from BishopFox/v1.6.0/certificate-management
View Certificate Information
2024-05-17 12:46:13 -05:00
Raf a9f06fc299 Merge branch 'master' into v1.6.0/certificate-management 2024-05-17 09:39:30 -04:00
Raf 5839c59682 Changing help text for certificates command 2024-05-17 09:35:54 -04:00
Raf 860810c148 Adding filters to certificate command 2024-05-17 09:33:24 -04:00
Ronan Kervella d92f079f97 Merge pull request #1690 from w33ts/patch-1
Fixed command typo in Getting Started.md
2024-05-17 13:19:58 +02:00
w33ts 4315a3fce3 Fixed command typo in Getting Started.md
There is a command that says "systemctrl" instead of "systemctl". Yup, I'm *that* guy now.

Signed-off-by: w33ts <[email protected]>
2024-05-16 21:50:34 -05:00
Joe 5d142acb86 Merge pull request #1681 from BishopFox/1c54dependabot/go_modules/golang.org/x/net-0.25.0
Bump golang.org/x/net from 0.24.0 to 0.25.0
2024-05-16 14:43:36 -05:00
Raf 0ee50c3150 Adding ID to certificates output, adjusting for narrow terms 2024-05-16 13:37:30 -04:00
Joe c0840eb9d6 Merge branch 'master' into 1c54dependabot/go_modules/golang.org/x/net-0.25.0 2024-05-16 10:54:09 -05:00
Joe 8b3e3cd6ab Merge pull request #1682 from BishopFox/5a34dependabot/go_modules/github.com/cheggaaa/pb/v3-3.1.5
Bump github.com/cheggaaa/pb/v3 from 3.1.2 to 3.1.5
2024-05-16 10:53:39 -05:00
Joe ffd2fa6e8b Merge pull request #1686 from BishopFox/fix-install-script
Fixing install script for Arch
2024-05-16 10:53:23 -05:00
Joe 130b5f9706 Merge pull request #1687 from BishopFox/v1.6.0/database-implant-table-fixes
Improving PostgreSQL Support
2024-05-16 10:53:06 -05:00
Raf 549a54cf4b Initial components of the certificates command
This commit adds a command (certificates) to the client that retrieves selected certificate information from the database.
2024-05-16 11:32:34 -04:00
Raf e2d11c40dd Fixed poor declaration of DB models for migration 2024-05-14 11:49:44 -04:00
Raf 9749cd8e58 Merge branch 'master' into v1.6.0/database-implant-table-fixes 2024-05-14 10:42:22 -04:00
Raf 4082378313 Adding nil check to listener deletion to prevent panic 2024-05-14 10:23:42 -04:00
Raf df65d7fe11 More thorough deletion of jobs from the DB when they are killed 2024-05-14 10:22:00 -04:00
Raf 99ce1cfb7a Fixing FK constraint while deleting profiles 2024-05-14 09:07:06 -04:00
Raf 5f2abac8d0 Database model fixes for non-SQLite databases, part 2
Changing implant generation without an associated profile to insert NULL into the database instead of the zero GUID
2024-05-13 15:43:04 -04:00
dependabot[bot] f265214006 Bump github.com/cheggaaa/pb/v3 from 3.1.2 to 3.1.5
Bumps [github.com/cheggaaa/pb/v3](https://github.com/cheggaaa/pb) from 3.1.2 to 3.1.5.
- [Commits](https://github.com/cheggaaa/pb/compare/v3.1.2...v3.1.5)

---
updated-dependencies:
- dependency-name: github.com/cheggaaa/pb/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-05-13 17:14:40 +00:00
dependabot[bot] 23bdc7053d Bump golang.org/x/net from 0.24.0 to 0.25.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.24.0 to 0.25.0.
- [Commits](https://github.com/golang/net/compare/v0.24.0...v0.25.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-05-13 17:14:34 +00:00
Joe 9510a5f0c1 Merge pull request #1685 from BishopFox/47b6dependabot/go_modules/google.golang.org/protobuf-1.34.1
Bump google.golang.org/protobuf from 1.34.0 to 1.34.1
2024-05-13 12:13:32 -05:00
Joe 72ea11790f Merge pull request #1683 from BishopFox/e97ddependabot/go_modules/golang.org/x/crypto-0.23.0
Bump golang.org/x/crypto from 0.22.0 to 0.23.0
2024-05-13 12:13:19 -05:00
Raf d651e0888f Database model fixes for non-SQLite databases, part 1
Changing database migrations to occur in sequence instead of all at once for more accurate error reporting in the log
Changing HostUUID in the models.Host struct to be unique to fix a constraint issue
Changing models.HttpC2Header to contain pointers to ServerConfigIDs and ImplantConfigIDs so that NULL values can be inserted into the database when a type of config does not apply.
2024-05-13 12:55:53 -04:00
Raf f2bb628883 Fixing install script for Arch 2024-05-13 09:15:20 -04:00
dependabot[bot] 8e5ff45306 Bump google.golang.org/protobuf from 1.34.0 to 1.34.1
Bumps google.golang.org/protobuf from 1.34.0 to 1.34.1.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-05-13 08:03:08 +00:00
Ronan Kervella 9dbd5a1c92 Merge branch 'master' into e97ddependabot/go_modules/golang.org/x/crypto-0.23.0 2024-05-13 10:02:18 +02:00
Ronan Kervella 6115702268 Merge pull request #1684 from BishopFox/527ddependabot/go_modules/modernc.org/sqlite-1.29.9
Bump modernc.org/sqlite from 1.29.8 to 1.29.9
2024-05-13 10:01:48 +02:00
dependabot[bot] ed1739c8d2 Bump modernc.org/sqlite from 1.29.8 to 1.29.9
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.29.8 to 1.29.9.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.29.8...v1.29.9)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-05-13 03:08:40 +00:00
dependabot[bot] 88da1fe868 Bump golang.org/x/crypto from 0.22.0 to 0.23.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.22.0 to 0.23.0.
- [Commits](https://github.com/golang/crypto/compare/v0.22.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-05-13 03:08:17 +00:00
Joe b520eaf6e6 Merge pull request #1679 from BishopFox/v1.6.0/fix-console-hang
Fix #1668
2024-05-10 09:31:13 -05:00
rkervella 635086364e Fix #1668 2024-05-10 11:46:31 +02:00
Ronan Kervella 4bfdb7bcee Merge pull request #1676 from BishopFox/v1.6.0/package-output
New Output Handler for Extensions and Aliases
2024-05-08 09:46:49 +02:00
Ronan Kervella 7e4ba5d3e7 Merge branch 'master' into v1.6.0/package-output 2024-05-07 17:20:47 +02:00
Ronan Kervella c642bfcacb Merge pull request #1675 from BishopFox/xforwardedfor_fix
extract original host ip if forwarded by one or more hosts
2024-05-07 17:20:17 +02:00
Timothy Makram Ghatas a424412edd Merge branch 'master' into xforwardedfor_fix 2024-05-07 15:34:08 +02:00
Raf 4d15774c9b Merge branch 'master' into v1.6.0/package-output 2024-05-07 09:05:14 -04:00
Raf 51c45a48e8 Adding error handling for bad ingestion 2024-05-07 09:04:55 -04:00
Tim Makram Ghatas 94f01c8230 added default case if only one forwarding ip exists 2024-05-07 14:41:51 +02:00
Raf 0307bf16eb Adding a new output handler for extensions and aliases that deserializes JSON output into tables 2024-05-07 08:30:17 -04:00
Tim Makram Ghatas 1a73128163 extract original host ip if forwarded by one or more hosts 2024-05-07 12:31:01 +02:00
Joe eff371f6b7 Merge pull request #1671 from BishopFox/d2cbdependabot/go_modules/github.com/stretchr/testify-1.9.0
Bump github.com/stretchr/testify from 1.8.4 to 1.9.0
2024-05-06 10:37:28 -05:00
Joe 3a48d8480e Merge pull request #1674 from BishopFox/f9f5dependabot/go_modules/golang.org/x/text-0.15.0
Bump golang.org/x/text from 0.14.0 to 0.15.0
2024-05-06 10:37:16 -05:00
Joe 5cd83392e0 Merge pull request #1672 from BishopFox/7227dependabot/go_modules/github.com/glebarez/sqlite-1.11.0
Bump github.com/glebarez/sqlite from 1.10.0 to 1.11.0
2024-05-06 10:37:06 -05:00
Joe fffaca3945 Merge pull request #1670 from BishopFox/7890dependabot/go_modules/github.com/ncruces/go-sqlite3-0.15.0
Bump github.com/ncruces/go-sqlite3 from 0.7.2 to 0.15.0
2024-05-06 10:36:54 -05:00
dependabot[bot] fae797eff0 Bump github.com/ncruces/go-sqlite3 from 0.7.2 to 0.15.0
Bumps [github.com/ncruces/go-sqlite3](https://github.com/ncruces/go-sqlite3) from 0.7.2 to 0.15.0.
- [Release notes](https://github.com/ncruces/go-sqlite3/releases)
- [Commits](https://github.com/ncruces/go-sqlite3/compare/v0.7.2...v0.15.0)

---
updated-dependencies:
- dependency-name: github.com/ncruces/go-sqlite3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-05-06 08:14:52 +00:00
dependabot[bot] 64a7095f5f Bump github.com/stretchr/testify from 1.8.4 to 1.9.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.4 to 1.9.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.4...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-05-06 08:13:52 +00:00
dependabot[bot] 82909ad1d9 Bump github.com/glebarez/sqlite from 1.10.0 to 1.11.0
Bumps [github.com/glebarez/sqlite](https://github.com/glebarez/sqlite) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/glebarez/sqlite/releases)
- [Commits](https://github.com/glebarez/sqlite/compare/v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: github.com/glebarez/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-05-06 08:13:37 +00:00
Ronan Kervella e2e9bc18dc Merge branch 'master' into f9f5dependabot/go_modules/golang.org/x/text-0.15.0 2024-05-06 01:12:43 -07:00
Ronan Kervella 5bed9d4e90 Merge pull request #1673 from BishopFox/c6e8dependabot/go_modules/github.com/jedib0t/go-pretty/v6-6.5.9
Bump github.com/jedib0t/go-pretty/v6 from 6.5.8 to 6.5.9
2024-05-06 01:12:20 -07:00
dependabot[bot] 60e87f9e08 Bump golang.org/x/text from 0.14.0 to 0.15.0
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.14.0 to 0.15.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.14.0...v0.15.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-05-06 03:45:35 +00:00
dependabot[bot] d4c37f45d2 Bump github.com/jedib0t/go-pretty/v6 from 6.5.8 to 6.5.9
Bumps [github.com/jedib0t/go-pretty/v6](https://github.com/jedib0t/go-pretty) from 6.5.8 to 6.5.9.
- [Release notes](https://github.com/jedib0t/go-pretty/releases)
- [Commits](https://github.com/jedib0t/go-pretty/compare/v6.5.8...v6.5.9)

---
updated-dependencies:
- dependency-name: github.com/jedib0t/go-pretty/v6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-05-06 03:45:25 +00:00
Joe 79d22bafbf Merge pull request #1669 from ngn13/wg-config-fix
fix: add missing newline
2024-05-05 10:56:55 -05:00
ngn 6396a64878 add missing newline
Signed-off-by: ngn <[email protected]>
2024-05-04 23:41:34 +00:00
Tim Makram Ghatas fb1e59ef5a update http payload staging tutorial 2024-05-04 09:48:46 +02:00
Joe 335797e661 Merge pull request #1667 from BishopFox/docs/community-guides
Docs/community guides
2024-05-03 21:13:39 -05:00
moloch-- d767bd019c Add youtube embed component 2024-05-03 19:13:02 -07:00
moloch-- 590f9c3f96 Add youtube embed component 2024-05-03 18:59:42 -07:00
Joe cff899aa49 Merge pull request #1646 from testwill/close_resource
fix: close resource
2024-05-03 12:17:46 -05:00
Joe ca2dc9d267 Merge pull request #1665 from BishopFox/c2profile_update_bugfix
C2profile update bugfix
2024-05-03 12:17:19 -05:00
Ronan Kervella afdd77c642 Merge branch 'master' into close_resource 2024-05-03 09:21:54 -07:00
Ronan Kervella 8a5970c3da Merge branch 'master' into c2profile_update_bugfix 2024-05-03 09:21:40 -07:00
Ronan Kervella 2eb2ac8121 Merge pull request #1659 from C-Sto/bugfix-extensions
fix extension registration, run, and load flows
2024-05-03 09:21:29 -07:00
Ronan Kervella daf7d404b1 Merge branch 'master' into c2profile_update_bugfix 2024-05-03 09:21:23 -07:00
Ronan Kervella 3b308920f4 Merge branch 'master' into close_resource 2024-05-03 08:34:23 -07:00
Ronan Kervella c73b183f74 Merge branch 'master' into bugfix-extensions 2024-05-03 08:32:44 -07:00
Ronan Kervella 7564312f5e Merge pull request #1666 from BishopFox/v1.6.0/fix-alias-hostproc
Fix Default Linux Host Process for Aliases
2024-05-03 08:32:22 -07:00
Raf 6134b78afb Fix default linux host process for aliases 2024-05-03 08:24:32 -04:00
Tim Makram Ghatas a1318f1061 Merge branch 'master' into wiki_1.6_update 2024-05-03 10:39:03 +02:00
Ronan Kervella 3db9946608 Merge branch 'master' into bugfix-extensions 2024-05-02 14:11:02 -07:00
Joe ef09058498 Merge pull request #1664 from BishopFox/v1.6.0/ls-rootdir
Adding root directory entry to `ls` command
2024-05-02 16:06:46 -05:00
Tim Makram Ghatas 9543951747 update http payload staging wiki 2024-05-02 23:02:28 +02:00
Tim Makram Ghatas 331faeb8ef fix commandline paramameters for profile staging 2024-05-02 20:30:33 +02:00
Tim Makram Ghatas 0926339482 update http staging wiki page 2024-05-02 20:10:59 +02:00
Tim Makram Ghatas 4ae195e3eb fix c2 profile update issue with headers, cookies and segments 2024-05-02 19:09:46 +02:00
Ronan Kervella f8f8ba5864 Merge branch 'master' into bugfix-extensions 2024-05-02 09:59:25 -07:00
Tim Makram Ghatas 7f60e133dc update tutorial first three chapters with asciinema and fix markdown loading issue 2024-05-02 18:58:09 +02:00
Raf 216e3b9759 Adds an entry in the directory listing returned by ls for the root directory ('.'). 2024-05-02 12:12:32 -04:00
Tim Makram Ghatas ba3893980d Merge branch 'master' into wiki_1.6_update 2024-05-02 09:25:13 +02:00
Tim Makram Ghatas 363f59d276 Add first draft tutorial draft for 1.6 2024-05-02 09:21:29 +02:00
Joe f1bc5074f9 Merge pull request #1663 from BishopFox/docs/compile-from-source
Add to index
2024-05-01 21:40:10 -05:00
moloch-- 5083faa1e1 Add to index 2024-05-01 19:39:34 -07:00
Joe 1b5d3436eb Merge pull request #1662 from BishopFox/docs/compile-from-source
Improve compile from source docs
2024-05-01 21:23:20 -05:00
moloch-- 56303eb89a Improve compile from source docs 2024-05-01 19:22:57 -07:00
Joe 9397fcb4ae Merge pull request #1661 from BishopFox/fix_stage_encoder
fix merge error for stage encoders
2024-05-01 20:11:35 -05:00
Joe 04c6c3f800 Merge pull request #1658 from C-Sto/bugfix-extensionnoargs
fix: handle noargs case
2024-05-01 20:08:17 -05:00
C-Sto 7842a6c4c6 add init back in, handle nils/zero values more elegantly 2024-05-02 08:49:21 +08:00
Tim Makram Ghatas 6c815a4432 fix merge error for stage encoders 2024-05-02 02:06:54 +02:00
C-Sto 81358e31bb fix extension registration, run, and load flows 2024-05-01 12:31:19 +08:00
C-Sto 7bea772dbd fix: handle noargs case 2024-05-01 12:15:33 +08:00
Joe 0b235b4d42 Merge pull request #1656 from BishopFox/fix/deps
Update Various Server and Implant Dependencies
2024-04-30 16:33:11 -07:00
moloch-- 1402a75b18 Update implant deps 2024-04-30 15:26:16 -07:00
moloch-- ff5e4a4a24 Update implant deps 2024-04-30 15:26:02 -07:00
moloch-- e59c90c89a Update wireguard 2024-04-30 15:21:03 -07:00
moloch-- 49771f0159 Update binject deps 2024-04-30 15:05:46 -07:00
moloch-- a2808b19f6 Update binject deps 2024-04-30 15:05:40 -07:00
Joe eddfb7073c Merge pull request #1655 from BishopFox/fix/init-logging
Fix/init logging
2024-04-30 14:58:00 -07:00
moloch-- 930799495c Update various deps 2024-04-30 14:49:40 -07:00
moloch-- 5016fb8d7c Update wazero 2024-04-30 14:34:59 -07:00
moloch-- 65382f7b77 Update wazero 2024-04-30 14:34:52 -07:00
moloch-- c1d00f0e48 Update gorm, etc 2024-04-30 14:34:17 -07:00
moloch-- e89280d64a Update modernc.org/sqlite 2024-04-30 14:20:24 -07:00
moloch-- aa4c9d7b8a Update tailscale 2024-04-30 14:09:05 -07:00
moloch-- 2be820daf1 Update tailscale 2024-04-30 14:08:55 -07:00
moloch-- 0a44fde9fa Linter fixes 2024-04-30 13:39:06 -07:00
moloch-- 151dfe2643 Fix nil err logging on client start 2024-04-30 13:25:37 -07:00
Joe fa7033f0c4 Merge pull request #1654 from BishopFox/tests/zig-docker
Remove docker platform specification
2024-04-30 08:07:16 -07:00
moloch-- 4eab1b582a Correct comment 2024-04-29 21:03:24 -07:00
moloch-- f78db1a825 Remove docker platform specification 2024-04-29 20:58:28 -07:00
Joe eb61740f5d Merge pull request #1653 from BishopFox/tests/zig-updates
Expand unit tests for better arm64 coverage
2024-04-29 20:32:16 -07:00
moloch-- 39d0f3b838 Expand unit tests for better arm64 coverage 2024-04-29 19:13:48 -07:00
Joe 8f084c99a4 Merge pull request #1651 from BishopFox/3139dependabot/go_modules/golang.org/x/net-0.24.0
Bump golang.org/x/net from 0.23.0 to 0.24.0
2024-04-29 17:36:46 -07:00
dependabot[bot] 87720d8a41 Bump golang.org/x/net from 0.23.0 to 0.24.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.23.0 to 0.24.0.
- [Commits](https://github.com/golang/net/compare/v0.23.0...v0.24.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-04-29 23:51:46 +00:00
Joe f8dd5230c1 Merge pull request #1652 from BishopFox/zig
Embedded Zig Cross-Compiler
2024-04-29 16:50:21 -07:00
moloch-- 9296a8abce Remove mingw env vars from unit test workflow 2024-04-29 16:10:01 -07:00
moloch-- abc8747a51 Remove mingw from docker, cleanup util 2024-04-29 15:41:40 -07:00
moloch-- dcbfe10bc4 Cleanup commands 2024-04-29 14:51:08 -07:00
moloch-- 4336f933e0 Unit tests passing 2024-04-29 14:42:37 -07:00
moloch-- 6a4521a4b0 Add zig as default cc/cxx except for macos, add cc/cxx to server config 2024-04-29 13:46:19 -07:00
moloch-- bf80f8f7e6 Fix unobfuscated builds 2024-04-29 09:16:01 -07:00
Joe 174455cbcc Merge pull request #1648 from BishopFox/go/v1.22.2
Go 1.22.2
2024-04-29 09:07:32 -07:00
moloch-- 09564cf241 Added more tar validation 2024-04-28 22:41:53 -07:00
moloch-- 03fa4029d3 Add zig to go-assets script 2024-04-28 22:34:49 -07:00
moloch-- b33e012f2a Basic zig cc implementation 2024-04-28 21:19:41 -07:00
moloch-- 98f13030f9 Go 1.22.2 2024-04-28 20:00:32 -07:00
Joe 040863b757 Merge pull request #1645 from BishopFox/fix/dnspb
Tweak builder
2024-04-26 09:29:49 -07:00
guangwu 7fe0b295f5 fix: close resource
Signed-off-by: guangwu <[email protected]>
2024-04-25 20:54:30 +08:00
Joe 1624c84eb6 Merge branch 'master' into fix/dnspb
Signed-off-by: Joe <[email protected]>
2024-04-24 15:23:23 -07:00
Joe 44368b26ad Merge pull request #1644 from BishopFox/fix/sideload-spaces
Fix bug in `sideload`, `execute-assembly` and `spawndll`` where spaces were removed in command line arguments
2024-04-24 15:22:37 -07:00
moloch-- 0eb93d51c0 Tweak builder pb 2024-04-24 16:52:58 -05:00
Ronan Kervella c7cd14eae2 Merge pull request #1627 from BishopFox/54b2dependabot/go_modules/github.com/jedib0t/go-pretty/v6-6.5.8
Bump github.com/jedib0t/go-pretty/v6 from 6.4.6 to 6.5.8
2024-04-23 15:19:25 -07:00
Ronan Kervella 9c9caba8d8 Merge branch 'master' into fix/sideload-spaces 2024-04-23 11:53:50 -07:00
rkervella 4b6219d860 Fix #1598 2024-04-23 11:49:54 -07:00
Ronan Kervella a47aeb7e73 Merge pull request #1643 from BishopFox/remove-prelude
Remove prelude operator support
2024-04-23 11:49:29 -07:00
Ronan Kervella d3255ec7bb Merge branch 'master' into remove-prelude 2024-04-23 11:02:49 -07:00
Ronan Kervella 4c0e6cb585 Merge branch 'master' into 54b2dependabot/go_modules/github.com/jedib0t/go-pretty/v6-6.5.8 2024-04-23 10:49:03 -07:00
Ronan Kervella 88e35469b8 Merge pull request #1630 from BishopFox/8c63dependabot/go_modules/github.com/klauspost/compress-1.17.8
Bump github.com/klauspost/compress from 1.17.0 to 1.17.8
2024-04-23 10:48:49 -07:00
Ronan Kervella cd711c1e2f Merge branch 'master' into 54b2dependabot/go_modules/github.com/jedib0t/go-pretty/v6-6.5.8 2024-04-23 10:15:22 -07:00
rkervella 723eca2ddd Remove prelude operator support 2024-04-23 10:14:37 -07:00
Ronan Kervella 0b2e0fa9bc Merge branch 'master' into 8c63dependabot/go_modules/github.com/klauspost/compress-1.17.8 2024-04-23 09:49:42 -07:00
Joe 9135afd201 Merge pull request #1639 from BishopFox/4cd6dependabot/go_modules/golang.org/x/net-0.23.0
Bump golang.org/x/net from 0.21.0 to 0.23.0
2024-04-23 09:31:14 -07:00
Joe b3a9ba86e1 Merge pull request #1566 from BishopFox/ff34dependabot/github_actions/actions/cache-4
Bump actions/cache from 3 to 4
2024-04-23 09:23:12 -07:00
Ronan Kervella 2211b13c31 Merge branch 'master' into 4cd6dependabot/go_modules/golang.org/x/net-0.23.0 2024-04-23 08:33:04 -07:00
Ronan Kervella 187394439e Merge branch 'master' into 54b2dependabot/go_modules/github.com/jedib0t/go-pretty/v6-6.5.8 2024-04-23 08:32:47 -07:00
Ronan Kervella 3b767baca3 Merge branch 'master' into 8c63dependabot/go_modules/github.com/klauspost/compress-1.17.8 2024-04-23 08:32:11 -07:00
Ronan Kervella c1070f917f Merge pull request #1637 from C-Sto/bugfix-windowsuseragent
fix useragent variable in implant generation
2024-04-23 08:31:48 -07:00
Ronan Kervella 5487df2000 Merge branch 'master' into bugfix-windowsuseragent 2024-04-22 15:08:50 -07:00
Ronan Kervella 97497c9f78 Merge pull request #1562 from BishopFox/v1.6.0/fix-procdump
Fix procdump (bis)
2024-04-22 15:08:35 -07:00
Ronan Kervella ee36676ba2 Merge branch 'master' into 4cd6dependabot/go_modules/golang.org/x/net-0.23.0 2024-04-22 13:06:01 -07:00
rkervella 6809d81b66 Merge branch 'v1.6.0/fix-procdump' of bishopfox.github.com:BishopFox/sliver into v1.6.0/fix-procdump 2024-04-22 13:01:57 -07:00
rkervella 6b876b0a0e Fix procdump, use a sync.Map instead of a shared
byte slice.
2024-04-22 13:01:39 -07:00
Ronan Kervella 33ab6096f1 Merge branch 'master' into bugfix-windowsuseragent 2024-04-22 11:10:06 -07:00
Ronan Kervella 0a6636fb71 Merge branch 'master' into v1.6.0/fix-procdump 2024-04-22 11:09:48 -07:00
Ronan Kervella 6a30b8a99a Merge pull request #1634 from C-Sto/bugfix-execwindows
check session mode correctly in windows exec
2024-04-22 11:09:38 -07:00
Ronan Kervella a3c353baf7 Merge branch 'master' into bugfix-execwindows 2024-04-19 11:40:30 -07:00
Ronan Kervella 5e992e073e Merge pull request #1635 from C-Sto/bugfix-overwrite
add overwrite flag back into upload cmd
2024-04-19 10:47:42 -07:00
rkervella 12d2569c2f Merge branch 'master' into v1.6.0/fix-procdump 2024-04-19 10:16:27 -07:00
Ronan Kervella 1abda712c4 Merge branch 'master' into 4cd6dependabot/go_modules/golang.org/x/net-0.23.0 2024-04-19 10:10:43 -07:00
Ronan Kervella 6dc49f5074 Merge branch 'master' into bugfix-windowsuseragent 2024-04-19 10:09:27 -07:00
Ronan Kervella 2eff697a50 Merge branch 'master' into bugfix-execwindows 2024-04-19 10:07:06 -07:00
Ronan Kervella 143246a9fc Merge branch 'master' into 54b2dependabot/go_modules/github.com/jedib0t/go-pretty/v6-6.5.8 2024-04-19 10:06:52 -07:00
Ronan Kervella ab80379e5e Merge branch 'master' into bugfix-overwrite 2024-04-19 09:47:31 -07:00
Ronan Kervella d8e400f005 Merge pull request #1636 from C-Sto/bugfix-infosession
add session command back to implant context
2024-04-19 09:47:21 -07:00
dependabot[bot] a4cc570845 Bump golang.org/x/net from 0.21.0 to 0.23.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.21.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.21.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-04-19 13:16:44 +00:00
Ronan Kervella 0072335cc0 Merge branch 'master' into bugfix-infosession 2024-04-18 10:55:14 -07:00
Ronan Kervella 6bccd35318 Merge pull request #1633 from BishopFox/v1.6.0/private-armories
Support for Self-Hosted Armories and Armory Fixes
2024-04-18 10:54:59 -07:00
Ronan Kervella f37bed31c0 Merge branch 'master' into v1.6.0/private-armories 2024-04-18 10:26:33 -07:00
Ronan Kervella dac592d231 Merge branch 'master' into bugfix-infosession 2024-04-18 08:36:00 -07:00
Ronan Kervella f98ae8e7fe Merge pull request #1638 from C-Sto/feature-extensionsident
use filehash for extension ref instead of command name
2024-04-18 08:35:45 -07:00
Raf 026c1d6ef6 Merge branch 'v1.6.0/private-armories' of ssh://github.com/BishopFox/sliver into v1.6.0/private-armories 2024-04-18 09:44:30 -04:00
Raf 4b982f422f Adding armory choice to install and update commands 2024-04-18 09:44:13 -04:00
dependabot[bot] c2f5460c63 Bump github.com/fatih/color from 1.15.0 to 1.16.0
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.15.0...v1.16.0)

---
updated-dependencies:
- dependency-name: github.com/fatih/color
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-04-18 09:44:13 -04:00
Tim Makram Ghatas 214143e9d9 add export command for c2 profiles 2024-04-18 09:44:13 -04:00
Tim Makram Ghatas 2607a021d8 re-add deleted commands from bad merge 2024-04-18 09:44:13 -04:00
dependabot[bot] e474dc452f Bump actions/configure-pages from 4 to 5
Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 4 to 5.
- [Release notes](https://github.com/actions/configure-pages/releases)
- [Commits](https://github.com/actions/configure-pages/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/configure-pages
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-04-18 09:44:13 -04:00
Raf c28e8e1e0f Add nosave option to armory add, armory modify 2024-04-18 09:44:13 -04:00
Raf 7b2822795c Add nosave option to armory add, armory modify 2024-04-18 09:44:13 -04:00
Raf cc5f162848 Added armory reset command 2024-04-18 09:44:13 -04:00
Raf 83b6bf9147 armory update range processing fixes 2024-04-18 09:44:13 -04:00
Raf 79202297df Limit concurrent requests to armories
Addresses #1401

Placing a limit of 10 concurrent requests for fetching resources
(indexes, package signatures) from armories. Also checking for a nil
response when downloading from GitHub to prevent a panic.
2024-04-18 09:44:13 -04:00
Raf cd4e967cd9 Changes to the package update process
armory update now prints a table of updates and allows the user to choose the updates they want to perform.
Refined dependency resolution so that it considers packages that are
pending install
Re-did the fix for the client continuously asking to overwrite packages
when installing bundles
Added a force option to the install command
2024-04-18 09:44:13 -04:00
Raf ea901f5442 Fixing a potential nil pointer dereference 2024-04-18 09:44:13 -04:00
Raf a5cd0d0cae Ensured cache consistency on index changes
If a package is deleted from the index, the cache was not subsequently
updated.
2024-04-18 09:44:13 -04:00
Raf e9930d01fd Initial support for self-hosted armories
Changes that allow for multiple armories, including commands for
managing armories, dependency resolution, and deconfliction.

There is still more work to be done, including refactoring,
simplification, and getting rid of bugs.
2024-04-18 09:44:13 -04:00
rkervella f83131ef43 Fix hang when calling generate stager 2024-04-18 09:44:13 -04:00
dependabot[bot] 73d5c3192d Bump golang.org/x/crypto from 0.17.0 to 0.21.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.17.0 to 0.21.0.
- [Commits](https://github.com/golang/crypto/compare/v0.17.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-04-18 09:44:13 -04:00
dependabot[bot] 076db57bba Bump google.golang.org/protobuf from 1.31.0 to 1.33.0
Bumps google.golang.org/protobuf from 1.31.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-04-18 09:44:13 -04:00
dependabot[bot] db85a76c85 Bump github.com/jackc/pgx/v5 from 5.3.1 to 5.5.4
Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.3.1 to 5.5.4.
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgx/compare/v5.3.1...v5.5.4)

---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-04-18 09:44:13 -04:00
Andrew Klaus 662c1c1e18 Adding namespace support to Linux ifconfig 2024-04-18 09:44:13 -04:00
Andrew Klaus 5634b09921 Testing fix for Windows implant 2024-04-18 09:44:13 -04:00
Andrew Klaus f8c8cdfe31 Updating protobufs 2024-04-18 09:44:13 -04:00
Andrew Klaus cabe48e997 Adding linux mount command 2024-04-18 09:44:13 -04:00
Raf cabb1b09cc Adding the mount command and the implementation for Windows implants 2024-04-18 09:44:13 -04:00
moloch-- 3bb667f814 Remove prelude operator support, since product is discontinued 2024-04-18 09:44:13 -04:00
moloch-- 6cb1ffbe4e Go 1.22.1 2024-04-18 09:44:13 -04:00
moloch-- dba5ba5767 Fix link in docs 2024-04-18 09:44:13 -04:00
moloch-- 65a7730bf4 Fix link in docs 2024-04-18 09:44:13 -04:00
xl4sh e17c363381 Fix using duplicated envelope id bug 2024-04-18 09:44:13 -04:00
gatari 454ffd7bcd Update make-token.go
Signed-off-by: gatari <[email protected]>
2024-04-18 09:44:13 -04:00
kmathisbf be75b1557c Add elastic binaries to knownSecurityTools 2024-04-18 09:44:12 -04:00
Raf d12d2fb792 Adding armory choice to install and update commands 2024-04-18 09:43:03 -04:00
Ronan Kervella 4debb053bd Merge branch 'master' into v1.6.0/private-armories 2024-04-17 19:07:41 -07:00
C-Sto d45a62867f use filehash for extension ref instead of command name 2024-04-18 09:05:17 +08:00
C-Sto 32c7e02f09 fix useragent variable 2024-04-18 08:56:49 +08:00
C-Sto e0ba712631 add session command back to implant context 2024-04-18 08:52:54 +08:00
C-Sto fd17c4ed20 add overwrite flag back into upload cmd 2024-04-18 08:50:13 +08:00
C-Sto 76eb06e6b9 check session mode correctly in windows exec 2024-04-18 08:46:02 +08:00
dependabot[bot] 7a7f169e0a Bump github.com/jedib0t/go-pretty/v6 from 6.4.6 to 6.5.8
Bumps [github.com/jedib0t/go-pretty/v6](https://github.com/jedib0t/go-pretty) from 6.4.6 to 6.5.8.
- [Release notes](https://github.com/jedib0t/go-pretty/releases)
- [Commits](https://github.com/jedib0t/go-pretty/compare/v6.4.6...v6.5.8)

---
updated-dependencies:
- dependency-name: github.com/jedib0t/go-pretty/v6
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-04-17 16:16:28 +00:00
Ronan Kervella 61090be973 Merge branch 'master' into ff34dependabot/github_actions/actions/cache-4 2024-04-17 09:16:18 -07:00
dependabot[bot] a0360fac17 Bump github.com/klauspost/compress from 1.17.0 to 1.17.8
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.17.0 to 1.17.8.
- [Release notes](https://github.com/klauspost/compress/releases)
- [Changelog](https://github.com/klauspost/compress/blob/master/.goreleaser.yml)
- [Commits](https://github.com/klauspost/compress/compare/v1.17.0...v1.17.8)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-04-17 16:15:43 +00:00
Ronan Kervella 61210acff0 Merge pull request #1621 from BishopFox/9192dependabot/go_modules/github.com/fatih/color-1.16.0
Bump github.com/fatih/color from 1.15.0 to 1.16.0
2024-04-17 09:14:17 -07:00
Ronan Kervella eca785a99a Merge branch 'master' into v1.6.0/private-armories 2024-04-17 08:46:48 -07:00
Raf 0b9442d2b8 Add nosave option to armory add, armory modify 2024-04-17 11:42:05 -04:00
Raf b6a24b0ab2 Add nosave option to armory add, armory modify 2024-04-17 11:39:21 -04:00
Raf 9f43f73350 Added armory reset command 2024-04-17 11:29:23 -04:00
Ronan Kervella d6ccb0044c Merge branch 'master' into 9192dependabot/go_modules/github.com/fatih/color-1.16.0 2024-04-17 08:25:31 -07:00
Raf 5d13415770 armory update range processing fixes 2024-04-17 10:56:22 -04:00
Raf f4c72d5216 Limit concurrent requests to armories
Addresses #1401

Placing a limit of 10 concurrent requests for fetching resources
(indexes, package signatures) from armories. Also checking for a nil
response when downloading from GitHub to prevent a panic.
2024-04-04 08:36:21 -04:00
Joe bb28d796a4 Merge pull request #1623 from BishopFox/export_c2profiles
add export command for c2 profiles
2024-04-02 15:04:01 -07:00
Tim Makram Ghatas f0b078bcd1 add export command for c2 profiles 2024-04-02 22:28:47 +02:00
Raf e926f1b954 Changes to the package update process
armory update now prints a table of updates and allows the user to choose the updates they want to perform.
Refined dependency resolution so that it considers packages that are
pending install
Re-did the fix for the client continuously asking to overwrite packages
when installing bundles
Added a force option to the install command
2024-04-02 13:20:07 -04:00
Ronan Kervella 9f4988e12a Merge pull request #1622 from BishopFox/bugfix_merge_issue
re-add deleted commands from bad merge for c2profiles and implant staging
2024-04-02 10:11:07 -07:00
Tim Makram Ghatas 124c12bebd re-add deleted commands from bad merge 2024-04-02 18:06:18 +02:00
Raf 84acde7db0 Fixing a potential nil pointer dereference 2024-04-01 11:24:20 -04:00
Joe 142bf83ffd Merge pull request #1620 from BishopFox/77cedependabot/github_actions/actions/configure-pages-5
Bump actions/configure-pages from 4 to 5
2024-04-01 06:49:08 -07:00
dependabot[bot] 30587f6e8f Bump github.com/fatih/color from 1.15.0 to 1.16.0
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.15.0...v1.16.0)

---
updated-dependencies:
- dependency-name: github.com/fatih/color
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-04-01 04:58:31 +00:00
dependabot[bot] b290474e5d Bump actions/configure-pages from 4 to 5
Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 4 to 5.
- [Release notes](https://github.com/actions/configure-pages/releases)
- [Commits](https://github.com/actions/configure-pages/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/configure-pages
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-04-01 03:28:25 +00:00
Raf de02d2fa6e Ensured cache consistency on index changes
If a package is deleted from the index, the cache was not subsequently
updated.
2024-03-29 10:24:56 -04:00
Raf b286aa979f Initial support for self-hosted armories
Changes that allow for multiple armories, including commands for
managing armories, dependency resolution, and deconfliction.

There is still more work to be done, including refactoring,
simplification, and getting rid of bugs.
2024-03-28 13:35:00 -04:00
Joe c18fc567a3 Merge pull request #1617 from BishopFox/fix-msf-stager
Fix hang when calling generate stager
2024-03-27 07:36:32 -07:00
rkervella 5bd1f4727c Fix hang when calling generate stager 2024-03-26 15:55:35 -07:00
Joe 619d4994da Merge pull request #1612 from BishopFox/c64bdependabot/go_modules/golang.org/x/crypto-0.21.0
Bump golang.org/x/crypto from 0.17.0 to 0.21.0
2024-03-26 06:55:33 -07:00
dependabot[bot] 1666d6f5ad Bump golang.org/x/crypto from 0.17.0 to 0.21.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.17.0 to 0.21.0.
- [Commits](https://github.com/golang/crypto/compare/v0.17.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-03-25 03:44:43 +00:00
Joe 6443aaba3d Merge pull request #1597 from BishopFox/48d6dependabot/go_modules/google.golang.org/protobuf-1.33.0
Bump google.golang.org/protobuf from 1.31.0 to 1.33.0
2024-03-19 10:21:19 -07:00
dependabot[bot] e14619fffc Bump google.golang.org/protobuf from 1.31.0 to 1.33.0
Bumps google.golang.org/protobuf from 1.31.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-03-19 15:46:19 +00:00
Joe 07ec53e148 Merge pull request #1599 from BishopFox/88cbdependabot/go_modules/github.com/jackc/pgx/v5-5.5.4
Bump github.com/jackc/pgx/v5 from 5.3.1 to 5.5.4
2024-03-19 08:44:52 -07:00
dependabot[bot] 1c9d11f967 Bump github.com/jackc/pgx/v5 from 5.3.1 to 5.5.4
Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.3.1 to 5.5.4.
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgx/compare/v5.3.1...v5.5.4)

---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-03-14 22:01:41 +00:00
Ronan Kervella 2da1da7c40 Merge branch 'master' into v1.6.0/fix-procdump 2024-03-14 14:59:31 -07:00
Ronan Kervella 85b949a7df Merge pull request #1545 from precurse-bf/ifns
Adding Linux namespace support to ifconfig
2024-03-14 14:57:23 -07:00
Andrew Klaus 2c0d46278a Adding namespace support to Linux ifconfig 2024-03-14 12:01:25 -06:00
Ronan Kervella 74653968df Merge pull request #1596 from precurse-bf/mount_linux_rebase
Adding mount command for Windows and Linux
2024-03-14 09:44:16 -07:00
Andrew Klaus 49b55c7763 Testing fix for Windows implant 2024-03-14 10:07:24 -06:00
Ronan Kervella d02b38681c Merge branch 'master' into v1.6.0/fix-procdump 2024-03-13 15:23:54 -07:00
Andrew Klaus d625c8c2b7 Updating protobufs 2024-03-13 14:55:04 -06:00
Andrew Klaus 9f33e8103a Adding linux mount command 2024-03-13 14:55:04 -06:00
Raf abd375f501 Adding the mount command and the implementation for Windows implants 2024-03-13 14:24:19 -06:00
moloch-- 715c37addf Remove prelude operator support, since product is discontinued 2024-03-07 16:07:47 -08:00
Joe 754ce39076 Merge pull request #1592 from BishopFox/go/v1.22.1
Go 1.22.1
2024-03-07 16:47:15 -07:00
moloch-- 580f98419d Go 1.22.1 2024-03-07 15:10:30 -08:00
moloch-- c8a7948671 Fix link in docs 2024-02-29 10:14:02 -08:00
moloch-- 9da3112c04 Fix link in docs 2024-02-29 10:12:23 -08:00
Ronan Kervella 12ca498386 Merge pull request #1586 from xl4sh/fix/loopvar
Fix using duplicated envelope id bug
2024-02-29 08:33:38 -08:00
xl4sh 2f9c1857bb Fix using duplicated envelope id bug 2024-02-29 13:43:40 +09:00
Joe ac2ee6dfff Merge pull request #1585 from gatariee/master
Fix typo in `make-token` when no credentials are provided.
2024-02-27 07:54:34 -07:00
gatari bfde6a4dc8 Update make-token.go
Signed-off-by: gatari <[email protected]>
2024-02-27 21:06:50 +08:00
Ronan Kervella dc93d054a9 Merge pull request #1572 from BishopFox/v1.6.0/remove-legacy-DLL-extension-support
Removing support for legacy DLL extensions
2024-02-15 15:41:19 -08:00
Ronan Kervella 173366ba7d Merge branch 'master' into v1.6.0/remove-legacy-DLL-extension-support 2024-02-15 14:17:09 -08:00
Joe 4bfca79860 Merge pull request #1579 from BishopFox/ps_elastic
Add elastic binaries to knownSecurityTools
2024-02-06 17:06:50 -06:00
kmathisbf baa3659f20 Add elastic binaries to knownSecurityTools 2024-02-06 15:36:59 -05:00
Raf 59b2996862 Removing support for legacy DLL extensions 2024-01-30 08:42:34 -05:00
Ronan Kervella d0dc42ea2f Merge pull request #1568 from BishopFox/fix/download
Fix download RPC
2024-01-24 13:51:42 -08:00
Ronan Kervella 235c666b61 Merge branch 'master' into v1.6.0/fix-procdump 2024-01-24 10:35:01 -08:00
rkervella 12d6c13f4e Return error if file doesn't exist 2024-01-23 14:53:08 -08:00
dependabot[bot] a7befbe8a6 Bump actions/cache from 3 to 4
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-01-22 17:38:41 +00:00
Joe 0a31daf6ef Merge pull request #1515 from BishopFox/eea1dependabot/github_actions/github/codeql-action-3
Bump github/codeql-action from 2 to 3
2024-01-22 11:38:00 -06:00
Joe 34b97418b1 Merge pull request #1517 from BishopFox/deabdependabot/github_actions/actions/configure-pages-4
Bump actions/configure-pages from 3 to 4
2024-01-22 11:37:41 -06:00
rkervella 9baa1c0095 Merge branch 'v1.6.0/fix-procdump' of bishopfox.github.com:BishopFox/sliver into v1.6.0/fix-procdump 2024-01-18 14:07:35 -08:00
rkervella af27a2f0ec Update dump method. No more RtlCopyMemory and HeapAlloc. 2024-01-18 14:05:53 -08:00
Ronan Kervella 0c7cb4c566 Merge branch 'master' into v1.6.0/fix-procdump 2024-01-17 15:00:00 -08:00
rkervella bf3846ac30 Rework minidump callback. Ditch dynamic realloc and add a safety net buffer instead at initial allocation. 2024-01-17 14:56:47 -08:00
Ronan Kervella d9db5752c1 Merge pull request #1559 from BishopFox/windows-dumpkey
Adding the `registry read hive` command
2024-01-17 14:11:12 -08:00
rkervella 33b21778d0 Update vendor 2024-01-17 11:29:53 -08:00
Ronan Kervella 58916d47b9 Merge branch 'master' into windows-dumpkey 2024-01-17 09:57:48 -08:00
Ronan Kervella 49a095de44 Merge pull request #1560 from BishopFox/v1.6.0/fix-procdump
Fix procdump on Windows
2024-01-17 09:56:07 -08:00
Raf c9f5f0b122 registry read hive: removing support for running the command against a remote host due to limitations in the RegSaveKeyW API call 2024-01-17 12:31:03 -05:00
rkervella 942823bb1f Don't use global variable for buffer size 2024-01-17 09:23:58 -08:00
Raf 9cbca40e90 registry read hive: Making sure that the generated file name does not exist prior to the call to RegSaveKeyW 2024-01-17 12:18:01 -05:00
Raf fcbcef0472 Adding the registry read hive command for dumping the contents of a registry hive 2024-01-17 11:04:31 -05:00
Joe 3274631b04 Merge branch 'master' into eea1dependabot/github_actions/github/codeql-action-3 2024-01-16 14:53:18 -06:00
Ronan Kervella 310b844c64 Merge pull request #1557 from BishopFox/windows-services
Adding the `services` command
2024-01-15 11:50:08 -08:00
Raf f50a1ed243 services: Moving strings from implant to client, renaming StartExistingService to StartServiceByName, removing unnecessary test 2024-01-15 13:30:57 -05:00
Raf 8ff7d4ec04 Merge branch 'master' into windows-services 2024-01-15 11:32:40 -05:00
Raf 0bfa34357e Adding help for services command 2024-01-15 11:08:46 -05:00
Raf ad1ee0a52d Adding the services command for getting information about and controlling services on Windows 2024-01-15 10:48:59 -05:00
Joe d9705a3cbe Merge pull request #1551 from BishopFox/v1.6.0/daemon-tailscale-flag
Add support for tailscale to daemon mode
2024-01-11 12:28:08 -06:00
rkervella 3c91f8eb52 Setup default C2 profiles in daemon mode. 2024-01-11 09:11:10 -08:00
rkervella 9d36920115 Add tailscale option to config file and fix missing argument to daemon.Start() 2024-01-10 14:51:40 -08:00
rkervella 8731006619 Remove empty line 2024-01-10 14:47:31 -08:00
rkervella 19cac4a08a Add support for tailscale to daemon mode 2024-01-10 14:45:12 -08:00
Ronan Kervella a9679e56d3 Merge pull request #1550 from BishopFox/v1.6.0/external-builders-multiservers
Don't exit on connection error.
2024-01-10 12:41:59 -08:00
rkervella 8e833d3510 Don't exit on connection error. 2024-01-10 10:50:30 -08:00
Ronan Kervella f227fedd46 Merge pull request #1549 from BishopFox/v1.6.0/external-builders-multiservers
Support multi-builders (1:n)
2024-01-09 16:43:50 -08:00
Ronan Kervella 804cf1b3fa Merge branch 'master' into v1.6.0/external-builders-multiservers 2024-01-09 16:04:41 -08:00
Ronan Kervella 7e23f93ba7 Merge pull request #1475 from BishopFox/8a21dependabot/go_modules/github.com/chromedp/chromedp-0.9.3
Bump github.com/chromedp/chromedp from 0.9.1 to 0.9.3
2024-01-09 16:04:28 -08:00
Ronan Kervella 1a79fb0176 Merge branch 'master' into v1.6.0/external-builders-multiservers 2024-01-09 15:05:18 -08:00
Ronan Kervella 7d9ced0d58 Merge branch 'master' into 8a21dependabot/go_modules/github.com/chromedp/chromedp-0.9.3 2024-01-09 14:17:26 -08:00
rkervella a0ea8eca27 Add support for multiple builders with reload from SIGHUP. 2024-01-09 14:11:44 -08:00
Ronan Kervella 61193c51c5 Merge pull request #1548 from BishopFox/client-command-fixes
Small Client Command Fixes
2024-01-09 10:19:55 -08:00
Raf 849f6fb683 Rewiring the grep, head, and tail commands; fixing timeout for procdump command 2024-01-09 12:24:59 -05:00
Ronan Kervella 24bb07e981 Merge branch 'master' into eea1dependabot/github_actions/github/codeql-action-3 2024-01-08 16:11:48 -08:00
Joe ad3b55fc0d Merge pull request #1544 from audibleblink/fix/migrate-cli
address regression; previously fixed in dd2af38
2024-01-08 12:58:49 -06:00
Ronan Kervella e5bc13e9ed Merge branch 'master' into 8a21dependabot/go_modules/github.com/chromedp/chromedp-0.9.3 2024-01-05 13:50:42 -08:00
Ronan Kervella 2fbd8e059a Merge branch 'master' into fix/migrate-cli 2024-01-05 13:08:47 -08:00
Ronan Kervella b20c5374b7 Merge pull request #1543 from BishopFox/windows-service-migrate
Fix migration issues with Windows service builds
2024-01-05 13:08:32 -08:00
rkervella 05ea6ce233 Initial support for multi-server builders 2024-01-05 13:01:00 -08:00
Alex Flores 72a37aa07a address regression; previously fixed in dd2af38 2024-01-05 14:30:58 -05:00
Ronan Kervella ae6028b7f6 Merge branch 'master' into eea1dependabot/github_actions/github/codeql-action-3 2024-01-05 11:09:46 -08:00
Ronan Kervella 13b2b5bc96 Merge branch 'master' into windows-service-migrate 2024-01-05 11:04:32 -08:00
Ronan Kervella 49bd90bc96 Merge pull request #1538 from BishopFox/more-session-data
Display More Process Information (`sessions` and `beacons` commands)
2024-01-05 11:04:06 -08:00
Raf 2d463f7b39 Merge branch 'master' into more-session-data 2024-01-05 12:43:43 -05:00
Raf 24b0301000 Fixing reference to SliverConsoleClient 2024-01-05 12:43:23 -05:00
Raf 70c65ca13b Merge branch 'master' into more-session-data 2024-01-05 12:41:25 -05:00
Raf 80b4a29ce5 Merge branch 'master' into windows-service-migrate 2024-01-05 11:10:42 -05:00
Joe 239c32e9c0 Merge pull request #1518 from BishopFox/c0b0dependabot/github_actions/actions/checkout-4
Bump actions/checkout from 3 to 4
2024-01-05 10:00:32 -06:00
Joe 78b0a46654 Merge pull request #1534 from BishopFox/c027dependabot/github_actions/actions/upload-artifact-4
Bump actions/upload-artifact from 3 to 4
2024-01-05 09:54:23 -06:00
Joe 6597361075 Merge pull request #1533 from BishopFox/f9e9dependabot/github_actions/actions/download-artifact-4
Bump actions/download-artifact from 3 to 4
2024-01-05 09:54:08 -06:00
Raf ad544ef4fa Fix migration issues with Windows service builds 2024-01-05 10:30:27 -05:00
Ronan Kervella ceb8b2f513 Merge pull request #1540 from BishopFox/v1.6.0/operator-creds-stdout
Add option to output credentials to stdout
2024-01-04 19:54:31 -08:00
Ronan Kervella b4bb80caab Merge branch 'master' into v1.6.0/operator-creds-stdout 2024-01-04 16:19:56 -08:00
Ronan Kervella c6cfb2dee9 Merge pull request #1541 from audibleblink/msf/exe-service
enables generation of exe-service stagers
2024-01-04 16:19:44 -08:00
Alex Flores 2792dd026e enables generation of exe-service stagers 2024-01-04 16:48:58 -05:00
Raf 43567441cc In the unfiltered view of sessions and beacons, do not show the integrity column if there are no Windows beacons or sessions 2024-01-04 13:56:16 -05:00
rkervella 3d2751bb2b Add option to output credentials to stdout 2024-01-04 10:55:10 -08:00
Ronan Kervella bdd8390913 Merge pull request #1537 from BishopFox/v1.6.0/cli-changes
Fix CLI changes
2024-01-04 10:46:30 -08:00
rkervella 77fea4f81c Update readline lib 2024-01-03 13:14:19 -08:00
Raf b9403085c6 Adding process information (PID, name, integrity) to long form session and beacon displays 2024-01-03 11:57:28 -05:00
rkervella 2ad8aa4829 Fix last merge issues 2024-01-02 16:13:26 -08:00
rkervella eecaeabf45 Merge branch 'beacon-commands' of https://github.com/maxlandon/sliver into maxlandon-beacon-commands 2024-01-02 16:11:42 -08:00
Ronan Kervella 67f92d6b4d Merge pull request #1536 from BishopFox/migrate-beacon
Add `migrate` support to beacons
2024-01-02 14:10:30 -08:00
Raf 8fd2cd98c7 Merging master into migrate-beacon 2024-01-02 15:33:04 -05:00
Raf 3d79a60464 Finishing support for migrating when using a beacon 2024-01-02 15:30:54 -05:00
Ronan Kervella 5c8f0f46d1 Merge pull request #1535 from BishopFox/migrate-with-name
Addressing Migrate "record not found"
2024-01-02 08:26:02 -08:00
Raf a58889ce14 Merge branch 'master' into migrate-beacon 2024-01-02 07:58:24 -05:00
Raf 37d7395f91 Populating the name of the implant in the migrate request from the client 2024-01-02 07:37:23 -05:00
dependabot[bot] 5039be3db8 Bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-01-01 03:06:53 +00:00
dependabot[bot] b64dd14f2f Bump actions/download-artifact from 3 to 4
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-01-01 03:06:51 +00:00
Joe dd2af38196 Merge pull request #1531 from audibleblink/fix/migrate-cli
no positional arg needed
2023-12-30 12:13:58 -06:00
Joe 77c3d851a2 Merge pull request #1526 from BishopFox/7983dependabot/github_actions/actions/upload-pages-artifact-3
Bump actions/upload-pages-artifact from 1 to 3
2023-12-29 20:12:35 -06:00
Joe 99b15a0d71 Merge pull request #1527 from BishopFox/090adependabot/github_actions/actions/deploy-pages-4
Bump actions/deploy-pages from 2 to 4
2023-12-29 20:12:22 -06:00
Joe 04e869ce48 Merge pull request #1530 from BishopFox/sgn-stage-listener
Encode Shellcode with SGN when generating via stage-listener
2023-12-29 20:04:21 -06:00
Alex Flores dc467bcfee adds help menu to account for new usage 2023-12-29 16:44:18 -05:00
Alex Flores 21aa7d0ce9 no positional arg needed 2023-12-29 16:10:51 -05:00
Raf 32a60456e5 Encoding shellcode with SGN for shellcode generated by stage-listener, if enabled in the profile 2023-12-29 10:09:24 -05:00
Raf 01719c15c7 Initial changes to support migrating beacons 2023-12-27 04:44:11 -05:00
dependabot[bot] 8a29924a12 Bump actions/deploy-pages from 2 to 4
Bumps [actions/deploy-pages](https://github.com/actions/deploy-pages) from 2 to 4.
- [Release notes](https://github.com/actions/deploy-pages/releases)
- [Commits](https://github.com/actions/deploy-pages/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/deploy-pages
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-12-25 03:56:38 +00:00
dependabot[bot] 59eb25a5ad Bump actions/upload-pages-artifact from 1 to 3
Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 1 to 3.
- [Release notes](https://github.com/actions/upload-pages-artifact/releases)
- [Commits](https://github.com/actions/upload-pages-artifact/compare/v1...v3)

---
updated-dependencies:
- dependency-name: actions/upload-pages-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-12-25 03:56:32 +00:00
Joe 538912c89d Merge branch 'master' into deabdependabot/github_actions/actions/configure-pages-4 2023-12-24 09:40:09 -06:00
Joe b4cf8482c1 Merge pull request #1525 from BishopFox/fix-c2-db-duplication
Fix C2 URL Duplication in Database
2023-12-22 13:55:22 -06:00
Raf de7d466acb Fixing an issue where C2 URLs are duplicated every time a profile is used to generate an implant. 2023-12-22 12:23:19 -05:00
Ronan Kervella a84f13e8a0 Merge pull request #1424 from C-Sto/extensionargs
Extensionargs
2023-12-20 16:05:03 -08:00
C_Sto dfaadfb5c0 Merge branch 'master' into extensionargs
Signed-off-by: C_Sto <[email protected]>
2023-12-20 09:19:21 +08:00
Ronan Kervella 478dabf5e1 Merge pull request #1397 from C-Sto/multiextensions
multimanifest extension support
2023-12-19 09:51:01 -08:00
Ronan Kervella 5767abe616 Merge branch 'master' into multiextensions 2023-12-19 08:29:57 -08:00
Joe 2fabbee6bf Merge pull request #1523 from BishopFox/8b62dependabot/go_modules/golang.org/x/crypto-0.17.0
Bump golang.org/x/crypto from 0.15.0 to 0.17.0
2023-12-19 10:08:20 -06:00
C-Sto 1e6d91fb6a menu better 2023-12-19 13:12:36 +08:00
moloch-- 31022c12db Add offline docs script 2023-12-18 20:47:17 -06:00
Ronan Kervella 456ca26817 Merge branch 'master' into 8a21dependabot/go_modules/github.com/chromedp/chromedp-0.9.3 2023-12-18 16:03:40 -08:00
Ronan Kervella 0bf4dd4313 Merge branch 'master' into eea1dependabot/github_actions/github/codeql-action-3 2023-12-18 16:02:28 -08:00
Ronan Kervella f18e383e33 Merge branch 'master' into deabdependabot/github_actions/actions/configure-pages-4 2023-12-18 16:02:23 -08:00
Ronan Kervella 5f34e9672b Merge branch 'master' into c0b0dependabot/github_actions/actions/checkout-4 2023-12-18 16:02:16 -08:00
dependabot[bot] e82975d1bd Bump golang.org/x/crypto from 0.15.0 to 0.17.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.15.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.15.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-12-18 23:59:26 +00:00
Ronan Kervella 1205defc3e Merge branch 'master' into extensionargs 2023-12-18 09:25:56 -08:00
Ronan Kervella 33613d25da Merge branch 'master' into multiextensions 2023-12-18 08:52:47 -08:00
moloch-- 5c9b4a6af7 fix typos 2023-12-18 08:08:11 -06:00
dependabot[bot] 9f2ab9ba1b Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-12-18 03:05:22 +00:00
dependabot[bot] d984d3a5f9 Bump actions/configure-pages from 3 to 4
Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 3 to 4.
- [Release notes](https://github.com/actions/configure-pages/releases)
- [Commits](https://github.com/actions/configure-pages/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/configure-pages
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-12-18 03:05:18 +00:00
dependabot[bot] 35b7b034ce Bump github/codeql-action from 2 to 3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-12-18 03:05:10 +00:00
moloch-- cfdbe6d467 Fix more links 2023-12-17 17:53:48 -06:00
moloch-- 8ad5d44114 Adjust page title 2023-12-17 16:34:55 -06:00
moloch-- ada14762cd Self host images 2023-12-17 16:26:17 -06:00
moloch-- 5f0b778c18 Add page title 2023-12-17 12:20:47 -06:00
moloch-- 78038a8dcc Fix typo 2023-12-17 12:16:55 -06:00
moloch-- 9f0f9b1206 Update generate beacon example 2023-12-17 11:48:30 -06:00
moloch-- a02f1ac529 Update generate session example 2023-12-17 11:32:46 -06:00
moloch-- dd51a66b63 Add service status 2023-12-17 10:35:58 -06:00
moloch-- d98810a65e Update install cast 2023-12-17 10:04:50 -06:00
moloch-- 803adef634 Fix code block 2023-12-17 09:43:50 -06:00
moloch-- 03c3d45500 Fix more links 2023-12-16 23:36:59 -06:00
moloch-- ec31b5dfa6 Fix more links 2023-12-16 23:33:35 -06:00
moloch-- f1ce927e1d Simplify name/md state mgmt 2023-12-16 23:24:11 -06:00
moloch-- a4ee4dc5e9 Fix more links 2023-12-16 23:01:04 -06:00
moloch-- d4e0c562ee Fix links, enable scroll restoration 2023-12-16 22:55:38 -06:00
moloch-- 7047ec1c52 Add asciinema markdown renderer 2023-12-16 22:51:09 -06:00
moloch-- cdfc2cd241 Tweak footer 2023-12-16 21:11:18 -06:00
moloch-- c4597cca76 fix links to c2 2023-12-16 20:50:53 -06:00
moloch-- 727693f3f2 Update intro paragraph 2023-12-16 19:38:15 -06:00
moloch-- 2d51293792 Tweak timers 2023-12-16 19:29:14 -06:00
moloch-- aa1850b8e6 Update readme 2023-12-16 19:27:34 -06:00
moloch-- a84b01ed40 Tweak timers 2023-12-16 19:10:35 -06:00
moloch-- 84808f626e Implement cards 2023-12-16 18:52:50 -06:00
moloch-- a10770ae2c Override ap-control-bar class 2023-12-16 18:33:47 -06:00
moloch-- 5d8d3a5d78 Fix bottom marge in search results 2023-12-16 17:32:21 -06:00
moloch-- a0a59ee540 Add footer 2023-12-16 17:00:08 -06:00
moloch-- 58be6c5a10 Add gh button 2023-12-16 16:44:18 -06:00
moloch-- 9cd27ed805 Various small tweaks 2023-12-16 16:40:09 -06:00
moloch-- 147e06d058 Remove old install script file 2023-12-16 16:27:04 -06:00
moloch-- 26aad81968 Fix various rel links 2023-12-16 16:24:56 -06:00
moloch-- 0f26ad1396 Fix relative navigation 2023-12-16 16:20:40 -06:00
moloch-- aac3c142e5 Implement search 2023-12-16 15:41:06 -06:00
moloch-- 4e012113cf Adjust border in dark mode 2023-12-16 13:38:39 -06:00
moloch-- 6916dbe684 Fixed docs sidebar 2023-12-16 13:23:23 -06:00
moloch-- 97e5142b7a Open 3rd party links in new tab 2023-12-16 10:25:54 -06:00
moloch-- 06fc398033 Implement onClear 2023-12-15 18:24:03 -06:00
moloch-- c2f4856255 Implement fuzzy filter 2023-12-15 18:22:52 -06:00
moloch-- ad7e1dcafa Fix theme on dark landing page 2023-12-15 18:01:21 -06:00
moloch-- 8c5d3dd637 Fix theme on dark landing page 2023-12-15 17:50:32 -06:00
Joe 2e7498c94c Merge pull request #1512 from BishopFox/docs/next
Docs/next
2023-12-15 17:44:46 -06:00
moloch-- dee26bcb3d Add paths to unit tests 2023-12-15 17:44:18 -06:00
moloch-- 67c6710ff9 Add asciinema intro 2023-12-15 17:40:05 -06:00
Joe e4a98e9a34 Merge pull request #1511 from BishopFox/docs/next
Docs/next
2023-12-15 16:21:36 -06:00
moloch-- 15781566ab Add more pages 2023-12-15 16:18:23 -06:00
moloch-- 2bcaf9a78f Store doc state in frag 2023-12-15 15:59:26 -06:00
Joe d8fe33d20a Merge pull request #1510 from BishopFox/docs/next
Fix image rendering
2023-12-15 15:48:38 -06:00
moloch-- 3a846e41a7 Fix image rendering 2023-12-15 15:44:56 -06:00
Joe d3ad2dc84f Merge pull request #1508 from BishopFox/fix-hosts-rm
Fix for hosts command and host IDs for loot
2023-12-15 15:40:04 -06:00
Joe 8aa4dd4a28 Merge pull request #1507 from BishopFox/fix-ioc-rm
Fixes for removing IOCs
2023-12-15 15:39:31 -06:00
Joe b360eae3fb Merge pull request #1509 from BishopFox/docs/next
Docs/next
2023-12-15 15:39:10 -06:00
moloch-- 8260c90288 Add more pages 2023-12-15 15:36:01 -06:00
Raf b080e06039 Fixing issue with removal of hosts and an issue where the host ID for loot did not populate in the database 2023-12-15 13:49:17 -05:00
Raf d394a5936d Associating IOC Protobuf objects with database objects to fix IOC deletion, changing some error messages 2023-12-15 11:52:22 -05:00
moloch-- 7ab9ddb68f Implement monaco code viewer 2023-12-15 09:15:27 -06:00
Joe 7d496d9036 Merge pull request #1506 from BishopFox/docs/next
Fix dark mode docs
2023-12-14 18:30:28 -06:00
moloch-- 99c3bde7df Fix dark mode docs 2023-12-14 18:29:52 -06:00
Joe bc5c1e0d8a Merge pull request #1505 from BishopFox/docs/next
Docs/next
2023-12-14 18:24:09 -06:00
moloch-- 84c4832ff4 Basic renderer working 2023-12-14 18:18:01 -06:00
moloch-- 1a280c3677 Fix root document 2023-12-14 17:57:31 -06:00
moloch-- c16737bfe9 Implement docs.json scheme 2023-12-14 16:40:29 -06:00
dependabot[bot] b5262b0c3a Bump github.com/chromedp/chromedp from 0.9.1 to 0.9.3
Bumps [github.com/chromedp/chromedp](https://github.com/chromedp/chromedp) from 0.9.1 to 0.9.3.
- [Release notes](https://github.com/chromedp/chromedp/releases)
- [Commits](https://github.com/chromedp/chromedp/compare/v0.9.1...v0.9.3)

---
updated-dependencies:
- dependency-name: github.com/chromedp/chromedp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-12-14 20:03:18 +00:00
Joe b84796f723 Merge pull request #1478 from BishopFox/2ee9dependabot/go_modules/gorm.io/driver/sqlite-1.5.4
Bump gorm.io/driver/sqlite from 1.5.2 to 1.5.4
2023-12-14 14:01:33 -06:00
Joe 5c206cdd01 Merge pull request #1504 from BishopFox/fix-iocs
IOC Fixes
2023-12-14 12:43:07 -06:00
Raf f2be8a41e7 Fixing associations between database models and IOC data objects so that IOCs are properly recorded; changed recorded IOC hash to the hash of the non-gzipped data 2023-12-14 11:46:36 -05:00
moloch-- 2e6904d838 Update docs readme 2023-12-13 18:43:09 -06:00
Joe e197ba9438 Merge pull request #1503 from BishopFox/docs/next
Docs/next
2023-12-13 18:25:40 -06:00
moloch-- f92067ef7d Place holders 2023-12-13 18:25:15 -06:00
moloch-- 33e678684f Add asciinema and monaco 2023-12-13 18:23:57 -06:00
moloch-- 0c2e8e1164 Add page dirs 2023-12-13 18:12:06 -06:00
moloch-- f7e3fd99e4 Initial commit 2023-12-13 17:57:31 -06:00
moloch-- 5539016c9b Fix out path 2023-12-13 17:23:54 -06:00
moloch-- 96fd678b3e Try to fix npm and node being stupid 2023-12-13 17:22:32 -06:00
moloch-- d2ccfb288d Node being dumb as usual 2023-12-13 17:20:28 -06:00
moloch-- cd834fcab4 Fix docs paths 2023-12-13 17:15:42 -06:00
moloch-- 8e9899e6c4 Change working directory 2023-12-13 17:14:24 -06:00
moloch-- 84d82aedcf Change working directory 2023-12-13 17:13:00 -06:00
moloch-- a3d1015449 Fix paths to subdir 2023-12-13 17:09:25 -06:00
Joe 60da181cc6 Merge pull request #1502 from BishopFox/docs/next
Add nextjs docs app
2023-12-13 17:06:15 -06:00
moloch-- a1abcaa6c8 Add nextjs docs app 2023-12-13 17:04:22 -06:00
Ronan Kervella 3974b53301 Merge pull request #1495 from vitorfhc/master
Adds the "permissions" flag to operator cmd in cli
2023-12-13 08:52:38 -08:00
Ronan Kervella dabc301108 Merge branch 'master' into master 2023-12-13 08:24:07 -08:00
Joe e32d0dd283 Merge pull request #1498 from BishopFox/4997dependabot/github_actions/actions/setup-go-5
Bump actions/setup-go from 4 to 5
2023-12-13 09:27:54 -06:00
dependabot[bot] 823d10c43c Bump actions/setup-go from 4 to 5
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-12-11 03:26:17 +00:00
Vitor Falcao fc7e0a8d19 Adds the "permissions" flag to operator cmd in cli 2023-12-06 15:39:33 -03:00
Ronan Kervella 48562a4221 Merge branch 'master' into extensionargs 2023-12-06 09:07:26 -08:00
Joe c1242a82a6 Merge pull request #1489 from Z3ratu1/fix/correct-section-length-in-evasion_windows.go
correct section length in evasion_windows.go
2023-12-04 12:27:39 -08:00
z3ratu1 d2bd8ddd42 correct section length in evasion_windows.go(fix for issue #1189) 2023-12-04 12:13:11 +08:00
dependabot[bot] e9cc6804bf Bump gorm.io/driver/sqlite from 1.5.2 to 1.5.4
Bumps [gorm.io/driver/sqlite](https://github.com/go-gorm/sqlite) from 1.5.2 to 1.5.4.
- [Commits](https://github.com/go-gorm/sqlite/compare/v1.5.2...v1.5.4)

---
updated-dependencies:
- dependency-name: gorm.io/driver/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-11-27 16:52:42 +00:00
Joe 061166755d Merge pull request #1477 from BishopFox/347bdependabot/go_modules/github.com/spf13/cobra-1.8.0
Bump github.com/spf13/cobra from 1.7.0 to 1.8.0
2023-11-27 08:49:58 -08:00
dependabot[bot] 489678e635 Bump github.com/spf13/cobra from 1.7.0 to 1.8.0
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.7.0...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-11-27 16:17:54 +00:00
Joe 93f86ac79b Merge pull request #1476 from BishopFox/61f3dependabot/go_modules/github.com/reeflective/readline-1.0.11
Bump github.com/reeflective/readline from 1.0.10 to 1.0.11
2023-11-27 08:15:10 -08:00
dependabot[bot] 6ea60eeffc Bump github.com/reeflective/readline from 1.0.10 to 1.0.11
Bumps [github.com/reeflective/readline](https://github.com/reeflective/readline) from 1.0.10 to 1.0.11.
- [Release notes](https://github.com/reeflective/readline/releases)
- [Changelog](https://github.com/reeflective/readline/blob/master/history.go)
- [Commits](https://github.com/reeflective/readline/compare/v1.0.10...v1.0.11)

---
updated-dependencies:
- dependency-name: github.com/reeflective/readline
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-11-27 03:47:58 +00:00
Joe 2bc427f551 Merge pull request #1467 from BishopFox/5fa4dependabot/go_modules/github.com/yiya1989/sshkrb5-0.0.1
Bump github.com/yiya1989/sshkrb5 from 0.0.0-20201110125252-a1455b75a35e to 0.0.1
2023-11-21 12:28:42 -08:00
dependabot[bot] 59f54706a0 Bump github.com/yiya1989/sshkrb5
Bumps [github.com/yiya1989/sshkrb5](https://github.com/yiya1989/sshkrb5) from 0.0.0-20201110125252-a1455b75a35e to 0.0.1.
- [Release notes](https://github.com/yiya1989/sshkrb5/releases)
- [Commits](https://github.com/yiya1989/sshkrb5/commits/v0.0.1)

---
updated-dependencies:
- dependency-name: github.com/yiya1989/sshkrb5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-11-21 17:43:58 +00:00
Joe cb61b81459 Merge pull request #1469 from BishopFox/fecbdependabot/go_modules/github.com/google/uuid-1.4.0
Bump github.com/google/uuid from 1.3.1 to 1.4.0
2023-11-21 09:42:17 -08:00
Joe 880eb6091b Merge pull request #1468 from BishopFox/34ffdependabot/go_modules/github.com/miekg/dns-1.1.57
Bump github.com/miekg/dns from 1.1.56 to 1.1.57
2023-11-21 09:41:45 -08:00
dependabot[bot] 36ed8ad5b9 Bump github.com/miekg/dns from 1.1.56 to 1.1.57
Bumps [github.com/miekg/dns](https://github.com/miekg/dns) from 1.1.56 to 1.1.57.
- [Changelog](https://github.com/miekg/dns/blob/master/Makefile.release)
- [Commits](https://github.com/miekg/dns/compare/v1.1.56...v1.1.57)

---
updated-dependencies:
- dependency-name: github.com/miekg/dns
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-11-20 22:25:37 +00:00
dependabot[bot] 1b6af55b14 Bump github.com/google/uuid from 1.3.1 to 1.4.0
Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.3.1 to 1.4.0.
- [Release notes](https://github.com/google/uuid/releases)
- [Changelog](https://github.com/google/uuid/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/uuid/compare/v1.3.1...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/google/uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-11-20 22:25:11 +00:00
Joe 95a2eead7d Merge pull request #1470 from BishopFox/eda5dependabot/go_modules/github.com/mattn/go-sqlite3-1.14.18
Bump github.com/mattn/go-sqlite3 from 1.14.17 to 1.14.18
2023-11-20 14:24:08 -08:00
Joe c02b87030e Merge pull request #1471 from BishopFox/c9f2dependabot/go_modules/github.com/reeflective/readline-1.0.10
Bump github.com/reeflective/readline from 1.0.8 to 1.0.10
2023-11-20 14:23:55 -08:00
dependabot[bot] 9f252327ca Bump github.com/reeflective/readline from 1.0.8 to 1.0.10
Bumps [github.com/reeflective/readline](https://github.com/reeflective/readline) from 1.0.8 to 1.0.10.
- [Release notes](https://github.com/reeflective/readline/releases)
- [Changelog](https://github.com/reeflective/readline/blob/master/history.go)
- [Commits](https://github.com/reeflective/readline/compare/v1.0.8...v1.0.10)

---
updated-dependencies:
- dependency-name: github.com/reeflective/readline
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-11-20 03:57:56 +00:00
dependabot[bot] c3889e160c Bump github.com/mattn/go-sqlite3 from 1.14.17 to 1.14.18
Bumps [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) from 1.14.17 to 1.14.18.
- [Release notes](https://github.com/mattn/go-sqlite3/releases)
- [Commits](https://github.com/mattn/go-sqlite3/compare/v1.14.17...v1.14.18)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-sqlite3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-11-20 03:57:49 +00:00
moloch-- 853fb02e9f Fix duplicate sectool names 2023-11-19 11:01:05 -07:00
moloch-- 4f9943ec41 Fix duplicate sectool names 2023-11-19 10:59:42 -07:00
moloch-- 3e72fff43b Minor cleanups 2023-11-19 10:27:21 -07:00
moloch-- 13178f5849 Tweak token err msg 2023-11-18 13:36:31 -07:00
moloch-- 88c67e88d9 Merge branch 'operator/permissions' 2023-11-18 13:34:24 -07:00
moloch-- 14e78df896 Add more nil checks 2023-11-18 13:34:09 -07:00
moloch-- b3429f5f88 Fix err nil deref 2023-11-18 13:31:47 -07:00
Joe 0402d622e1 Merge pull request #1466 from BishopFox/operator/permissions
Operator/permissions
2023-11-18 12:11:59 -08:00
moloch-- 04d8d2aac7 Add missing builder permissions 2023-11-18 12:39:34 -07:00
moloch-- b71759f3b2 Add basic methods 2023-11-18 12:33:06 -07:00
moloch-- 13c68a7f50 Implement method checks 2023-11-18 12:27:39 -07:00
moloch-- 1f894f50ff Add permissions to operator config 2023-11-18 12:14:33 -07:00
moloch-- 33ea66de58 Add production 'slim' Docker stage 2023-11-18 10:19:14 -07:00
moloch-- 9a432f583d Add missing libs to docker test 2023-11-18 10:09:32 -07:00
moloch-- cbcd948c83 Add comments to Dockerfile 2023-11-18 09:24:21 -07:00
Joe 2ada8bf8ed Merge pull request #1465 from BishopFox/vendor/ssh
Update ssh and garble
2023-11-18 08:16:16 -08:00
moloch-- 02a4657d14 Additional tweaks to dockerfile 2023-11-18 08:53:46 -07:00
Joe b7cef9a07c Merge branch 'master' into vendor/ssh 2023-11-18 07:06:53 -08:00
moloch-- 49606ba753 Update ssh and garble 2023-11-18 07:49:03 -07:00
Joe 116431a049 Merge pull request #1421 from BishopFox/upload-dir
Adding the ability to upload directories
2023-11-17 10:03:09 -08:00
Joe ae5ac2af0f Merge branch 'master' into upload-dir 2023-11-17 09:34:45 -08:00
Joe b03c2ca6cd Merge pull request #1464 from BishopFox/vendor/gorilla
Update deps
2023-11-16 17:55:34 -08:00
Joe 6a4276e1e2 Merge pull request #1463 from BishopFox/http/default-config
Update default http c2 config
2023-11-16 17:55:17 -08:00
moloch-- c7358f8e63 Remove uneeded rand seeding 2023-11-16 18:32:54 -07:00
moloch-- de2fb65ee0 Improve cert randomization 2023-11-16 18:28:48 -07:00
moloch-- c52ca054a0 Update default http c2 config 2023-11-16 18:22:50 -07:00
moloch-- ffdbaba982 Update default http c2 config 2023-11-16 18:17:04 -07:00
moloch-- d23d814368 Update deps 2023-11-16 17:20:33 -07:00
Joe a57a67b6e0 Merge pull request #1461 from BishopFox/vendor/sqlite
Update sqlite deps
2023-11-16 15:59:35 -08:00
Joe 79b2b9da1f Merge branch 'master' into vendor/sqlite 2023-11-16 15:36:31 -08:00
moloch-- e0a3114692 Update sqlite deps 2023-11-16 16:35:34 -07:00
Joe 4bbe8f0976 Merge pull request #1460 from BishopFox/vendor/wg
Update Wireguard Deps
2023-11-16 15:31:02 -08:00
Joe 699b9bbe9b Merge pull request #1378 from BishopFox/fix/kill
Fix kill for sessions
2023-11-16 15:14:31 -08:00
moloch-- a6b583f538 Re-add forwarding to custom netstack 2023-11-16 15:57:49 -07:00
moloch-- 2ac22d137a Re-add custom netstack 2023-11-16 15:43:28 -07:00
moloch-- 579252f531 Downgrade x/crypo/ssh to v0.13.0 2023-11-16 15:24:01 -07:00
moloch-- 6558d53cc0 Update implant crypto/ssh 2023-11-16 14:40:44 -07:00
moloch-- d364f30ce6 Update crypto/ssh 2023-11-16 14:20:42 -07:00
moloch-- 499df6f923 Use upstream netstack 2023-11-16 14:09:39 -07:00
moloch-- 5a3053fe7a Use go branch of gvisor 2023-11-16 13:44:30 -07:00
moloch-- 9d08e4ca9f Update implant wireguard, tailscale, and gvisor 2023-11-16 13:31:46 -07:00
moloch-- ed9d8274f8 Update wireguard, tailscale, and gvisor 2023-11-16 13:20:38 -07:00
moloch-- 5efd05fcdf Switch to slim image for prod 2023-11-16 11:41:49 -07:00
moloch-- 9e95f3dbdc Specify container platform 2023-11-16 11:24:01 -07:00
Joe 3bbd4a230e Merge pull request #1458 from bman46/docker-optimization
Optimize Dockerfile
2023-11-16 09:25:35 -08:00
Joe ee2a72ff5f Merge branch 'master' into fix/kill 2023-11-16 07:30:29 -08:00
Joe 86507dc5c5 Merge pull request #1459 from BishopFox/fix_external_build
adapt external builds to support http c2 configuration and new build …
2023-11-16 07:29:36 -08:00
Tim Makram Ghatas d2b43ebb9f adapt external builds to support http c2 configuration and new build system 2023-11-15 23:46:28 +01:00
Joe 29dde09bdc Merge branch 'master' into docker-optimization 2023-11-14 11:51:36 -08:00
Joe 3a0ce8b890 Merge pull request #1402 from BishopFox/cc07dependabot/github_actions/actions/checkout-4
Bump actions/checkout from 3 to 4
2023-11-14 11:51:21 -08:00
Joe 623579affb Merge branch 'master' into cc07dependabot/github_actions/actions/checkout-4 2023-11-14 11:50:18 -08:00
Joe 632eacf3fd Merge pull request #1457 from BishopFox/allow_selective_staging
Allow selective staging
2023-11-14 11:49:55 -08:00
Brendan McShane ce6402a5d8 Fix comment 2023-11-14 10:57:33 -05:00
Brendan McShane 6da2209509 Update docker file 2023-11-14 10:57:33 -05:00
Joe 6918743f03 Merge branch 'master' into allow_selective_staging 2023-11-14 07:55:35 -08:00
Joe 5d333af798 Merge pull request #1456 from BishopFox/fix_profile_update
allow profile updates
2023-11-14 07:55:22 -08:00
Tim Makram Ghatas 68cddc1de2 Merge branch 'master' into allow_selective_staging 2023-11-13 23:54:47 +01:00
Tim Makram Ghatas c681fa68f3 Merge branch 'master' into fix_profile_update 2023-11-13 23:54:19 +01:00
Tim Makram Ghatas 8a04d8d882 removed unused http staging code and http stage flag. Added a new subcommand to implants, stage that allows to select which builds to exposed externally. ImplantBuilds now have a stage field marking whether they are available externally or not. 2023-11-13 23:53:05 +01:00
Joe b973e286cb Merge pull request #1455 from BishopFox/go/v1.21.4
Go/v1.21.4
2023-11-13 13:59:40 -08:00
Tim Makram Ghatas 49f9cf0963 Merge branch 'master' into fix_profile_update 2023-11-13 22:37:33 +01:00
Tim Makram Ghatas 5ffdcf8a7a allow profile updates 2023-11-13 22:36:07 +01:00
Joe 01656894ee Merge branch 'master' into go/v1.21.4 2023-11-13 11:16:10 -08:00
Joe d994f76920 Merge pull request #1454 from BishopFox/v1.6.0/http-c2
V1.6.0/http c2
2023-11-13 11:15:37 -08:00
Tim Makram Ghatas 6e40fcdf91 fix binary generation tests 2023-11-13 19:31:59 +01:00
Tim Makram Ghatas b6df1e2981 update go.mod and update WGImplantPrivKey reference to build object 2023-11-13 18:23:06 +01:00
moloch-- 56b84e44f3 Update makefile to require go 1.21.x 2023-11-10 18:36:40 -07:00
moloch-- 96896a7442 Go 1.21.4 2023-11-10 18:33:10 -07:00
moloch-- ac9b293942 Fix website pkg tests and MapContent, refactor naming 2023-11-10 16:53:11 -07:00
moloch-- ebf68f6b61 Fix println, dropped err 2023-11-10 16:27:21 -07:00
Tim Makram Ghatas e25e228f5c remove server side imports from utils package 2023-11-10 23:47:53 +01:00
Tim Makram Ghatas b84092b24b renamed resourceIDs 2023-11-10 23:34:12 +01:00
moloch-- eddfa20684 Move minisign to util/ 2023-11-10 15:31:35 -07:00
moloch-- 21468a6310 Duplicate minisign dep to client/ 2023-11-10 15:22:04 -07:00
Ronan Kervella 8c1194283b Merge branch 'master' into upload-dir 2023-11-10 14:05:05 -08:00
Tim Makram Ghatas 48d7e7217c add option to save stage to disk 2023-11-10 22:39:26 +01:00
Tim Makram Ghatas a19fddfdba merge master 2023-11-10 22:36:04 +01:00
Ronan Kervella 28397eb7a9 Merge branch 'master' into extensionargs 2023-11-10 13:02:13 -08:00
Ronan Kervella f944d24dc3 Merge pull request #1453 from D00Movenok/fix/implant_macos_proxy_log
Fix: removed implant macos and generic proxy logs when debug is disabled
2023-11-10 13:01:56 -08:00
D00Movenok 917586f2cc fix: removed implant macos and generic proxy logs when debug is disabled 2023-11-10 23:19:31 +03:00
Tim Makram Ghatas 4e56c69cfe implants now also display whether compression/encryption was used in display 2023-11-09 18:13:30 +01:00
Tim Makram Ghatas e6487fb01d implants command now displays resource id's 2023-11-09 17:16:00 +01:00
Tim Makram Ghatas d88011e140 remove http/s stage listeners 2023-11-09 16:44:15 +01:00
Tim Makram Ghatas 2c5c3ac997 Move stage generation server side and add a new subcommand for profiles to generate them 2023-11-09 01:41:14 +01:00
Tim Makram Ghatas 9178f6ea5b move keys to implant build (WG, MTLS and ECC) 2023-11-08 17:29:22 +01:00
Raf 8ebd7da9a8 Merge branch 'master' into upload-dir 2023-11-08 08:15:02 -05:00
Tim Makram Ghatas a691484f47 fix config reuse bug and duplicate c2 object creation 2023-11-07 01:08:37 +01:00
Tim Makram Ghatas 3442599ee8 add missing field in implantconfig protobuf 2023-11-06 14:26:16 +01:00
Tim Makram Ghatas d3f40963e3 fixed missing implant config id bug 2023-11-05 00:17:44 +01:00
Tim Makram Ghatas c83a0447b3 allow disabling http payload staging 2023-11-04 23:41:01 +01:00
Joe daaf6e27a2 Merge pull request #1447 from alrs/info-cmd-err
client/command/info: fix dropped errors
2023-11-03 08:59:21 -07:00
Joe 9d1fa0d016 Merge pull request #1445 from BishopFox/fix-1444
Fixing issue with User Agent in Implant Generation
2023-11-03 08:53:29 -07:00
Lars Lehtonen a13d63ee47 client/command/info: fix dropped errors
Signed-off-by: Lars Lehtonen <[email protected]>
2023-11-03 06:04:22 -07:00
Raf 4da9233563 Merge branch 'master' into fix-1444 2023-11-03 06:51:28 -04:00
Joe 16db6033a5 Merge pull request #1446 from luca994/fix-minpath-httpconf
Fixed min_path and max_path settings on http profile customization
2023-11-02 15:48:06 -07:00
Raf c1d1bf7873 Blocking backticks from user agent strings in the config so that we can support other characters that would normally need to be escaped. 2023-11-02 13:29:39 -04:00
Luca 3217ab53fe Fixed min_path and max_path settings on http profile customization 2023-11-02 16:55:41 +01:00
Raf d46e43dbd6 Changing the user agent declaration to use a different template that allows for other characters that would have to be escaped 2023-11-02 10:48:20 -04:00
Raf 070bac1bf3 Fixing issue #1444: making User Agent a string literal in generation code 2023-11-01 12:52:42 -04:00
Raf a511af6fd2 Merge branch 'master' into upload-dir 2023-11-01 10:52:23 -04:00
Raf 97a22bb8eb Merging master into this branch and making some tweaks to upload. 2023-11-01 10:38:34 -04:00
Tim Makram Ghatas 9a63b64a39 remove implant builds when implant profiles are removed 2023-10-31 18:24:54 +01:00
Joe 9894d79dbf Merge pull request #1443 from BishopFox/1684dependabot/go_modules/google.golang.org/grpc-1.59.0
Bump google.golang.org/grpc from 1.56.1 to 1.59.0
2023-10-31 09:58:21 -07:00
Tim Makram Ghatas 4b0190b08c check implant exists before freeing up resources 2023-10-31 17:36:38 +01:00
dependabot[bot] 80dea74d97 Bump google.golang.org/grpc from 1.56.1 to 1.59.0
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.56.1 to 1.59.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.56.1...v1.59.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-10-31 15:29:09 +00:00
Joe db5d12d4b6 Merge pull request #1425 from BishopFox/ac46dependabot/go_modules/tailscale.com-1.50.1
Bump tailscale.com from 1.44.0 to 1.50.1
2023-10-31 08:26:27 -07:00
Joe 1c4503c1cc Merge branch 'master' into ac46dependabot/go_modules/tailscale.com-1.50.1
Signed-off-by: Joe <[email protected]>
2023-10-31 07:47:00 -07:00
Joe 13fb854b4e Merge pull request #1407 from BishopFox/heads-and-tails
Head and Tail commands
2023-10-31 07:46:30 -07:00
Raf d0574ffe48 Merge branch 'heads-and-tails' of ssh://github.com/BishopFox/sliver into heads-and-tails 2023-10-31 09:42:24 -04:00
Raf ba6b53d569 Merge branch 'master' into heads-and-tails 2023-10-31 09:40:55 -04:00
Tim Makram Ghatas 749c3b9247 fixed profile removal crash and automatically delete profile implantconfig 2023-10-31 12:46:12 +01:00
Tim Makram Ghatas 79ca1c9f72 update protobuf definitions for generate stage rpc call 2023-10-31 12:21:01 +01:00
Tim Makram Ghatas 7a6f2c3b53 resource id's no longer need to be prime 2023-10-31 11:59:17 +01:00
Joe e4ade4e8c9 Merge pull request #1440 from alrs/filesystem-cmd-err
client/command/filesystem: fix dropped error
2023-10-26 16:10:17 -07:00
Joe f4beecdc8a Merge branch 'master' into filesystem-cmd-err
Signed-off-by: Joe <[email protected]>
2023-10-26 08:38:32 -07:00
Joe 78627a6eff Merge pull request #1437 from testwill/ioutil
chore: remove refs to deprecated io/ioutil
2023-10-25 18:35:16 -07:00
Joe 77f2b7fd48 Merge branch 'master' into ioutil
Signed-off-by: Joe <[email protected]>
2023-10-25 16:37:55 -07:00
Lars Lehtonen 6f043f8406 client/command/filesystem: fix dropped error
Signed-off-by: Lars Lehtonen <[email protected]>
2023-10-24 15:14:47 -07:00
Tim Makram Ghatas 9870c254f6 remove save stager rpc call 2023-10-24 23:48:32 +02:00
Tim Makram Ghatas 99281bad0f removed name from implantconfig, implant names are only tied to builds 2023-10-24 23:41:37 +02:00
Tim Makram Ghatas 02d1eb5ba4 refactored generate rpc 2023-10-24 20:44:43 +02:00
Tim Makram Ghatas fce86738cc fix incorrect object reference error 2023-10-24 20:40:14 +02:00
Tim Makram Ghatas b723194931 fix implant config generation for stagers 2023-10-23 00:57:10 +02:00
Tim Makram Ghatas 7dc631077a renamed db functions for consistency 2023-10-22 21:30:16 +02:00
Tim Makram Ghatas e204247009 move implantbuild models to protobuf struct 2023-10-22 21:02:00 +02:00
Tim Makram Ghatas 504e5c7b32 check port is not in use before spawning listener 2023-10-22 17:47:39 +02:00
Tim Makram Ghatas fdec3cb317 Started moving all use of models.* structs to the models and helpers file. The goal of this commit is to eventually only use protobuf accross the entire project, in order to avoid mixing different structs for the same datatype accross the codebase. This also will allow switching backend if the project eventually moves away from an sql backend. 2023-10-22 15:37:21 +02:00
Ronan Kervella 342ed489f3 Merge branch 'master' into multiextensions 2023-10-20 10:30:30 -07:00
Ronan Kervella b7d0dcc5dd Merge pull request #1422 from BishopFox/grep
Adding the grep command
2023-10-20 10:23:46 -07:00
guoguangwu 0b7596373a fix: typo
Signed-off-by: guoguangwu <[email protected]>
2023-10-20 09:04:54 +08:00
Ronan Kervella 6b88a01fad Merge branch 'master' into upload-dir 2023-10-19 15:31:56 -07:00
Ronan Kervella d58c7b3bca Merge branch 'master' into heads-and-tails 2023-10-19 15:15:03 -07:00
Ronan Kervella c23a542233 Merge branch 'master' into grep 2023-10-19 15:12:56 -07:00
guoguangwu 5b415c5aa1 chore: remove refs to deprecated io/ioutil
Signed-off-by: guoguangwu <[email protected]>
2023-10-19 20:06:45 +08:00
Tim Makram Ghatas 6c77151b80 started moving c2profile to only use protobuf, fixed bug in http mainhandler and c2profile command now also displays poll extension 2023-10-17 00:52:13 +02:00
dependabot[bot] 5e7507ba4d Bump tailscale.com from 1.44.0 to 1.50.1
Bumps [tailscale.com](https://github.com/tailscale/tailscale) from 1.44.0 to 1.50.1.
- [Release notes](https://github.com/tailscale/tailscale/releases)
- [Commits](https://github.com/tailscale/tailscale/compare/v1.44.0...v1.50.1)

---
updated-dependencies:
- dependency-name: tailscale.com
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-10-16 16:04:58 +00:00
Joe 06d5a934be Merge pull request #1431 from BishopFox/35abdependabot/go_modules/golang.org/x/net-0.17.0
Bump golang.org/x/net from 0.11.0 to 0.17.0
2023-10-16 09:03:18 -07:00
Ronan Kervella 5e5e0df4ec Merge branch 'master' into multiextensions 2023-10-16 09:03:17 -07:00
Joe e804605d05 Merge pull request #1432 from BishopFox/go/v1.21.3
Go 1.21.3
2023-10-16 08:55:20 -07:00
Joe 35eac6f582 Merge branch 'master' into grep 2023-10-16 07:02:11 -07:00
Tim Makram Ghatas ff382e4029 Refactor websites to only use protobuf objects 2023-10-15 22:13:16 +02:00
Joe 5a5e8d2a04 Merge pull request #1420 from ssepi0l-pv/patch-1
Update install
2023-10-15 06:39:07 -07:00
Tim Makram Ghatas 05a69474e5 modify backend to server arbitrary stages for a given implant configuration 2023-10-15 08:22:49 +02:00
moloch-- 4516e4994d Garble v1.21.3 2023-10-13 16:24:34 +02:00
ssepi0l-pv 843e287f0c Merge branch 'master' into patch-1 2023-10-13 09:36:50 -03:00
Tim Makram Ghatas 47f19d477d switch to referencing builds by resource ID instead of profiles in staging requests and prepare rpc call to save stager builds 2023-10-13 12:01:07 +02:00
moloch-- aee2f78718 Go 1.21.3 2023-10-12 15:21:04 +02:00
dependabot[bot] 2edb14baa1 Bump golang.org/x/net from 0.11.0 to 0.17.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.11.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.11.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-10-11 22:50:09 +00:00
Ronan Kervella a2208280a0 Merge pull request #1430 from alrs/console-err
client/console: fix dropped error
2023-10-11 12:06:27 -07:00
Lars Lehtonen 0834b725fd client/console: fix dropped error 2023-10-11 09:44:18 -07:00
Tim Makram Ghatas a0fa261e32 display profile nonce 2023-10-08 21:03:08 +02:00
Tim Makram Ghatas c578c426dc fix stager listener url generationerror 2023-10-08 21:02:47 +02:00
Tim Makram Ghatas da9b72c72c modify stagerhandler to serve valid profile (without stage-listener mods) when the correct stager id is used as a nonce 2023-10-08 20:13:16 +02:00
C-Sto c02c40cb65 improve extensions UX 2023-10-08 10:48:29 +08:00
C-Sto be222e3ffa use bof arg packer for extensions 2023-10-08 07:16:34 +08:00
Tim Makram Ghatas cb8170c27b change naming and type of encoder id's 2023-10-06 16:42:38 +02:00
Tim Makram Ghatas 03cfab5276 Merge branch 'master' into v1.6.0/http-c2 2023-10-06 16:16:38 +02:00
Tim Makram Ghatas 114ad3e6a1 remove resource id on profile deletion 2023-10-06 16:10:41 +02:00
Tim Makram Ghatas 3d6a8dda52 switch to uin64[] instead of int[] 2023-10-06 15:47:41 +02:00
Tim Makram Ghatas ea1fbf1d74 save implant id to profile during profile creation 2023-10-06 12:06:25 +02:00
Tim Makram Ghatas 49b8cd299a embed encoder id's during code rendering 2023-10-06 11:48:13 +02:00
Tim Makram Ghatas b8dcf756f7 generate encoder id's on server setup for backend 2023-10-06 11:04:08 +02:00
Tim Makram Ghatas 0b9d7cc603 added resource id queries and save 2023-10-04 23:02:05 +02:00
Tim Makram Ghatas 3ba3cf1177 create resourceID table 2023-10-04 22:56:28 +02:00
Raf 7747df7b96 Addressing potential zip slip issue, fixing bug when uploading directories without a filter 2023-10-04 11:11:49 -04:00
Raf 9c87c59ec6 grep: Print error messages from files that could not be read 2023-10-04 10:37:56 -04:00
Raf dd249088c3 Adding the client implementation for grep 2023-10-04 10:28:54 -04:00
Raf 914354222d Adding the grep command 2023-10-04 10:28:39 -04:00
Raf efe747b8aa Adding the ability to upload directories 2023-10-04 10:13:04 -04:00
ssepi0l-pv 369406928c Update install
Hello!
I wanted to commit these changes because I'd love to see official support for Arch Linux. I modified this script and installed Sliver on my system using it, so I know it works. Nevertheless, please do check it and try it yourselves! :)

Signed-off-by: ssepi0l-pv <[email protected]>
2023-10-04 09:40:47 -03:00
Tim Makram Ghatas f6ac166314 display c2 profile in profile details 2023-10-03 14:22:06 +02:00
Tim Makram Ghatas 3da9ffb7d3 added c2 profile flag to profile creation 2023-10-03 14:19:38 +02:00
C-Sto 4421ec1698 make client work with updated manifest schema 2023-09-30 14:07:29 +08:00
C-Sto 7815b67a8a revise manifest schema 2023-09-30 14:07:02 +08:00
Tim Makram Ghatas 01c813148b added watchtower configuration import/deletion/view 2023-09-29 13:32:30 +02:00
Tim Makram Ghatas 7fce95e707 allow overwriting c2 profiles on the fly 2023-09-28 18:19:11 +02:00
Ronan Kervella 84aed0720f Merge branch 'master' into multiextensions 2023-09-27 10:53:29 -07:00
Joe 71ba959e12 Merge branch 'master' into heads-and-tails 2023-09-27 10:50:00 -07:00
Joe 5d40d41105 Merge pull request #1416 from BishopFox/e20adependabot/go_modules/github.com/klauspost/compress-1.17.0
Bump github.com/klauspost/compress from 1.16.6 to 1.17.0
2023-09-27 10:49:15 -07:00
Tim Makram Ghatas 237663be19 move job restart on profile import client side 2023-09-26 00:13:08 +02:00
Ronan Kervella b212e0fb99 Merge branch 'master' into multiextensions 2023-09-25 11:14:16 -07:00
Tim Makram Ghatas 96a6efae07 restart http/s listeners on c2 profile import 2023-09-25 12:35:02 +02:00
dependabot[bot] 3561461547 Bump github.com/klauspost/compress from 1.16.6 to 1.17.0
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.16.6 to 1.17.0.
- [Release notes](https://github.com/klauspost/compress/releases)
- [Changelog](https://github.com/klauspost/compress/blob/master/.goreleaser.yml)
- [Commits](https://github.com/klauspost/compress/compare/v1.16.6...v1.17.0)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-09-25 03:49:33 +00:00
Joe 1d9d5cf85a Merge branch 'master' into cc07dependabot/github_actions/actions/checkout-4 2023-09-20 20:34:14 -07:00
Tim Makram Ghatas e70a022981 add check for duplicate stager extension and duplicate c2 profile name 2023-09-18 22:07:44 +02:00
Ronan Kervella b0c3549b08 Merge branch 'master' into fix/kill 2023-09-18 12:51:41 -07:00
Tim Makram Ghatas d924d80ddb added dropdown to choose c2 profile 2023-09-18 21:08:59 +02:00
Joe b3acf2db1f Merge branch 'master' into heads-and-tails 2023-09-17 07:59:40 -07:00
Joe a670538a77 Merge pull request #1409 from BishopFox/download-filter-fix
Fix filters in the download command
2023-09-17 07:59:28 -07:00
Raf d6ea4794b7 Removed a check from the implant download code that broke filters 2023-09-15 09:10:42 -04:00
Tim Makram Ghatas 7b67ec872e save profile to database on import 2023-09-14 23:51:59 +02:00
Raf a2bbaa095e Fixing typo in tail command help 2023-09-14 12:05:20 -04:00
Tim Makram Ghatas e5a01ae244 moved c2profile struct to client assets 2023-09-14 17:31:55 +02:00
Tim Makram Ghatas 4bcefdddb5 fix circular dependency 2023-09-14 17:24:54 +02:00
Raf 8e64ab288d Adding the head and tail commands, fixing a small issue with download 2023-09-14 10:32:54 -04:00
Tim Makram Ghatas 1bba3532af fix profile parsing errors 2023-09-13 20:09:37 +02:00
Tim Makram Ghatas 002e38e0ac Merge branch 'master' into v1.6.0/http-c2 2023-09-13 19:18:23 +02:00
Tim Makram Ghatas 99817a5f35 implemented c2 profile import and display 2023-09-13 19:11:24 +02:00
Tim Makram Ghatas 4921fa4fcf display implant c2 profile in implants command 2023-09-13 14:35:57 +02:00
dependabot[bot] b044a4584b Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-09-11 03:13:23 +00:00
Tim Makram Ghatas eccc31f945 fix regression, http listener now uses correct port, and http headers are set when an associated profile can be found 2023-09-07 23:53:33 +02:00
Tim Makram Ghatas f2b42211d2 remove error handling statement 2023-09-06 14:54:10 +02:00
Tim Makram Ghatas b1ba761fff update handler to select session cookie based on profile 2023-09-04 23:36:18 +02:00
Tim Makram Ghatas 580d5128ba added main request handler for http profiles 2023-09-04 23:22:56 +02:00
Tim Makram Ghatas 67c519e8d6 add autocomplete for c2profile parameter during generation 2023-09-04 21:51:33 +02:00
Tim Makram Ghatas 4f9851215e merged master into branch 2023-09-04 20:41:33 +02:00
Joe f32d9a91ee Merge pull request #1399 from SpadesA99/SpadesA99-patch-1
Fix the process handle leak when using ps command on Windows
2023-09-01 09:28:50 -05:00
SpadesA99 f9c5daec39 Fix the process handle leak when using ps command on Windows
Signed-off-by: SpadesA99 <[email protected]>
2023-09-01 10:18:45 +08:00
Ronan Kervella b3ab5ea62e Merge branch 'master' into multiextensions 2023-08-31 10:15:36 -07:00
Ronan Kervella f623b0cdce Merge pull request #1398 from realalexandergeorgiev/realalexandergeorgiev-patch-2
Update ps.go
2023-08-31 08:44:35 -07:00
Alexander Georgiev 9b5d4c3bab Update ps.go
Added more MDE processes

Signed-off-by: Alexander Georgiev <[email protected]>
2023-08-31 15:13:53 +02:00
C-Sto 9d4486f906 multimanifest extension support 2023-08-31 10:57:27 +08:00
Tim Makram Ghatas 29c2c9df76 merge master into branch 2023-08-30 19:19:50 +02:00
Tim Makram Ghatas 58b4596598 merged 1.6 master into branch 2023-08-30 14:34:47 +02:00
Joe a79b397d17 Merge branch 'master' into beacon-commands 2023-08-09 19:05:56 -05:00
Joe a9f885a919 Merge pull request #1382 from BishopFox/go/v1.21.0
Go v1.21.0
2023-08-09 19:02:52 -05:00
moloch-- 5a532f77dc Go v1.21.0 2023-08-09 15:58:36 -07:00
Joe 375f6fd235 Merge pull request #1381 from BishopFox/cybereason
Added Cybereason ActiveProbe to known processes
2023-08-09 15:45:24 -05:00
c2biz 0a32ca109d Added Cybereason ActiveProbe to known processes 2023-08-09 16:01:03 -04:00
Joe d048427ebf Merge pull request #1284 from rwincey/notxt_dns
Notxt dns
2023-08-08 18:37:58 -05:00
Joe d22579c204 Merge pull request #1374 from BishopFox/mtls/lencheck
Add basic len check to mtls conn
2023-08-08 18:37:29 -05:00
Ronan Kervella 46a33851fd Merge branch 'master' into beacon-commands 2023-08-08 11:14:44 -07:00
Ronan Kervella fb5bd84811 Merge branch 'master' into fix/kill 2023-08-08 11:14:23 -07:00
Joe 1e79af3d89 Merge pull request #1375 from BishopFox/87c0dependabot/go_modules/github.com/tetratelabs/wazero-1.3.1
Bump github.com/tetratelabs/wazero from 1.2.1 to 1.3.1
2023-08-08 12:09:15 -05:00
Joe f018f86522 Merge branch 'master' into 87c0dependabot/go_modules/github.com/tetratelabs/wazero-1.3.1 2023-08-08 12:08:58 -05:00
Joe 584cacb7da Merge pull request #1377 from TheDuchy/master
Add the ability to generate .exe MSF stagers from Sliver
2023-08-08 12:08:13 -05:00
Ronan Kervella 714ab96270 Merge branch 'master' into mtls/lencheck 2023-08-08 09:59:30 -07:00
Ronan Kervella 1da52a3fec Merge branch 'master' into beacon-commands 2023-08-08 09:33:37 -07:00
rkervella ae8444fc75 fix kill for sessions 2023-08-08 09:28:52 -07:00
duchy c7a2bbc46b Added ability to generate .exe stagers from MSF 2023-08-08 13:26:27 +02:00
dependabot[bot] 4458911e5c Bump github.com/tetratelabs/wazero from 1.2.1 to 1.3.1
Bumps [github.com/tetratelabs/wazero](https://github.com/tetratelabs/wazero) from 1.2.1 to 1.3.1.
- [Release notes](https://github.com/tetratelabs/wazero/releases)
- [Commits](https://github.com/tetratelabs/wazero/compare/v1.2.1...v1.3.1)

---
updated-dependencies:
- dependency-name: github.com/tetratelabs/wazero
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-08-07 03:50:35 +00:00
Joe 477df0eac9 Merge pull request #1335 from BishopFox/b6e0dependabot/go_modules/golang.org/x/crypto-0.11.0
Bump golang.org/x/crypto from 0.10.0 to 0.11.0
2023-08-04 15:50:22 -05:00
Joe 22286fdcdd Merge branch 'master' into b6e0dependabot/go_modules/golang.org/x/crypto-0.11.0
Signed-off-by: Joe <[email protected]>
2023-08-04 15:50:13 -05:00
Joe 150b62a0aa Merge pull request #1373 from BishopFox/fix/windows-assets-filepath
Use path.Join for embedded fs instead of filepath.Join
2023-08-04 15:47:44 -05:00
rkervella 270e9f2c5f Use path.Join for embedded fs instead of filepath.Join 2023-08-04 12:59:55 -07:00
Joe ce81ce5de0 Merge pull request #1372 from BishopFox/go/v1.20.7
Go 1.20.7
2023-08-04 09:13:05 -05:00
moloch-- 388b371573 Add basic len check to mtls conn 2023-08-03 17:32:57 -07:00
moloch-- a4425c169e Update go 2023-08-03 17:03:07 -07:00
Joe fd0e54c02c Merge branch 'master' into notxt_dns 2023-08-03 18:57:50 -05:00
Joe 59212f06fd Merge pull request #1339 from BishopFox/e3bddependabot/go_modules/golang.org/x/sys-0.10.0
Bump golang.org/x/sys from 0.9.0 to 0.10.0
2023-08-03 18:57:09 -05:00
Joe 0140bc2b8f Merge branch 'master' into e3bddependabot/go_modules/golang.org/x/sys-0.10.0 2023-08-03 18:56:54 -05:00
Ronan Kervella 4faaa4c075 Merge pull request #1368 from SpadesA99/master
Fix CP command file occupation
2023-08-01 18:51:13 -07:00
SpadesA99 ef1e12e6d4 Fix CP command file occupation
Signed-off-by: SpadesA99 <[email protected]>
2023-08-01 18:04:31 +08:00
Ronan Kervella 7741b0373f Merge branch 'master' into notxt_dns 2023-07-28 11:09:44 -07:00
Joe 4f2767ab59 Merge pull request #1356 from rarFood/master
fix 'gpg: invalid armor header'
2023-07-23 17:18:53 -05:00
maxlandon 12065fdb99 Rename SliverConsoleClient to SliverClient 2023-07-23 19:48:38 +02:00
maxlandon d5c1daaa48 Simplify binding commands with groups 2023-07-23 19:36:57 +02:00
maxlandon be65f1ce58 Filter portfwd/socks commands out of beacons 2023-07-23 19:23:13 +02:00
maxlandon 163c11b60c Fmt 2023-07-23 19:04:44 +02:00
maxlandon 47a280cc16 Fix beacon compile flags + debug level for client asciicast 2023-07-23 19:04:20 +02:00
rarFood 68f78e791f fix 'gpg: invalid armor header' 2023-07-21 11:21:05 -04:00
Ronan Kervella d28bac4259 Merge branch 'master' into e3bddependabot/go_modules/golang.org/x/sys-0.10.0 2023-07-19 08:35:23 -07:00
Ronan Kervella 00197deefb Merge branch 'master' into b6e0dependabot/go_modules/golang.org/x/crypto-0.11.0 2023-07-19 08:33:47 -07:00
Ronan Kervella 0bfbe9ecd4 Merge pull request #1350 from n3rada/install_script
Enhance the `install` script
2023-07-19 08:27:30 -07:00
maxlandon ba34df3b4b Merge remote-tracking branch 'BishopFox/master' into beacon-commands 2023-07-19 02:37:44 +02:00
Joe 88ac55a2f7 Merge branch 'master' into install_script 2023-07-16 08:19:40 -05:00
Ronan Kervella a1c19bc745 Merge pull request #1352 from xinhuang/pr/no-http-fallback-master
Add option to disable connect to tcp/80 when tcp/443 not reachable
2023-07-13 11:24:20 -07:00
Xin Huang 5a39e253bb Add no-fallback=true parameter for https beacons so they won't connect to TCP 80 if TCP 443 isn't reachable 2023-07-14 01:08:47 +09:00
n3rada 3b8912df4f Enhance the install script 2023-07-13 00:04:29 +02:00
Ronan Kervella 452ce12e9f Merge pull request #1346 from Paradoxis/feature/added-copy-command
Added a copy file command
2023-07-12 10:34:03 -07:00
Ronan Kervella aed28b0ff1 Merge branch 'master' into feature/added-copy-command 2023-07-12 09:21:18 -07:00
Ronan Kervella a2c3263619 Merge pull request #1345 from BishopFox/fix/pstree-1.6
Fix pstree (v1.6)
2023-07-12 08:49:33 -07:00
Paradoxis 300c2f7851 Titlecased copy message 2023-07-12 00:06:31 +02:00
Paradoxis b1d41f1032 Added a check to ensure two arguments are passed to CpCmd 2023-07-12 00:01:39 +02:00
Paradoxis 9054d11749 Moved constants to the end 2023-07-12 00:01:30 +02:00
Paradoxis c1f0b32c93 Added a copy file command 2023-07-11 23:55:00 +02:00
Ronan Kervella a3ecf3d593 Merge branch 'master' into fix/pstree-1.6 2023-07-11 14:23:49 -07:00
rkervella 1a43e70fd1 Fix pstree 2023-07-11 12:25:23 -07:00
Ronan Kervella 1fc7d881b2 Merge pull request #1341 from BishopFox/upload-fixes
Upload command: Changes to remote path specification
2023-07-11 08:43:26 -07:00
Raf 27254a2d89 upload: Fixing panic when remote path not specified, allowing for specification of a directory for remote path 2023-07-10 16:49:03 -04:00
dependabot[bot] 19573c9f20 Bump golang.org/x/sys from 0.9.0 to 0.10.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/golang/sys/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-07-10 03:36:14 +00:00
dependabot[bot] 0f11532e37 Bump golang.org/x/crypto from 0.10.0 to 0.11.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.10.0 to 0.11.0.
- [Commits](https://github.com/golang/crypto/compare/v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-07-10 03:35:37 +00:00
Joe c75cf89def Merge branch 'master' into notxt_dns 2023-07-08 11:27:04 -05:00
Joe 2c6cf1e96b Merge pull request #1332 from stephenbradshaw/stager-rc4-support
Add RC4 support to shellcode stager
2023-07-08 11:26:13 -05:00
Stephen Bradshaw bd4d5eca77 Add RC4 support to shellcode stager 2023-07-08 14:53:37 +10:00
Joe 514da3a682 Merge pull request #1324 from BishopFox/a8c6dependabot/go_modules/gorm.io/gorm-1.25.2
Bump gorm.io/gorm from 1.25.2-0.20230530020048-26663ab9bf55 to 1.25.2
2023-07-03 00:38:33 -05:00
Joe 5e691bdf25 Merge branch 'master' into a8c6dependabot/go_modules/gorm.io/gorm-1.25.2 2023-07-03 00:38:26 -05:00
Joe 0eb997388a Merge pull request #1325 from BishopFox/6595dependabot/go_modules/google.golang.org/protobuf-1.31.0
Bump google.golang.org/protobuf from 1.30.0 to 1.31.0
2023-07-03 00:38:10 -05:00
dependabot[bot] 33e6273c62 Bump google.golang.org/protobuf from 1.30.0 to 1.31.0
Bumps google.golang.org/protobuf from 1.30.0 to 1.31.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-07-03 03:26:44 +00:00
dependabot[bot] 704d65059f Bump gorm.io/gorm from 1.25.2-0.20230530020048-26663ab9bf55 to 1.25.2
Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.25.2-0.20230530020048-26663ab9bf55 to 1.25.2.
- [Release notes](https://github.com/go-gorm/gorm/releases)
- [Commits](https://github.com/go-gorm/gorm/commits/v1.25.2)

---
updated-dependencies:
- dependency-name: gorm.io/gorm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-07-03 03:26:39 +00:00
Joe dee7434bd8 Merge pull request #1323 from BishopFox/go/v1.20.5
Go v1.20.5
2023-07-01 17:33:57 -05:00
moloch-- 8b6b0d7a14 Go v1.20.5 2023-07-01 14:31:55 -07:00
Joe ccf53647b8 Merge pull request #1322 from BishopFox/multiplayer/tailscale
Multiplayer/Tailscale
2023-07-01 11:35:33 -05:00
moloch-- 9e0f9d2fbb Update implant gvisor 2023-07-01 08:46:40 -07:00
Joe dc228a5d2d Merge branch 'master' into multiplayer/tailscale 2023-07-01 10:20:02 -05:00
moloch-- 6bc6f15fd1 Bug fixes to tsnet 2023-07-01 08:19:09 -07:00
moloch-- cb6c8ce4e7 Integrate tsnet option into job mgmt 2023-07-01 07:59:33 -07:00
moloch-- ddf2344e61 Add multiplayer tailscale option, update gvisor 2023-07-01 07:49:24 -07:00
Joe bfacc71048 Merge branch 'master' into notxt_dns 2023-06-29 09:18:11 -05:00
Joe ced8bdda0c Merge pull request #1319 from BishopFox/fix/make-token
Fix make token test
2023-06-29 09:17:50 -05:00
rkervella 78222cb1bc Fix make token test 2023-06-28 15:26:59 -07:00
Joe f99b3cae9c Merge branch 'master' into notxt_dns 2023-06-26 14:26:42 -05:00
Joe 01b370ba44 Merge pull request #1314 from BishopFox/b141dependabot/go_modules/github.com/klauspost/compress-1.16.6
Bump github.com/klauspost/compress from 1.16.5 to 1.16.6
2023-06-26 14:26:15 -05:00
Joe 5b90358328 Merge pull request #1316 from BishopFox/e64fdependabot/go_modules/github.com/AlecAivazis/survey/v2-2.3.7
Bump github.com/AlecAivazis/survey/v2 from 2.3.6 to 2.3.7
2023-06-26 14:26:02 -05:00
Joe f13b11ff52 Merge branch 'master' into b141dependabot/go_modules/github.com/klauspost/compress-1.16.6 2023-06-26 13:57:25 -05:00
Joe af19c97372 Merge pull request #1311 from ActualTrash/taskmany
Add command to task many implants at once
2023-06-26 13:55:49 -05:00
Joe 4f86172543 Merge branch 'master' into taskmany 2023-06-26 13:55:38 -05:00
dependabot[bot] a5c9f53b8a Bump github.com/AlecAivazis/survey/v2 from 2.3.6 to 2.3.7
Bumps [github.com/AlecAivazis/survey/v2](https://github.com/AlecAivazis/survey) from 2.3.6 to 2.3.7.
- [Release notes](https://github.com/AlecAivazis/survey/releases)
- [Commits](https://github.com/AlecAivazis/survey/compare/v2.3.6...v2.3.7)

---
updated-dependencies:
- dependency-name: github.com/AlecAivazis/survey/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-06-26 18:12:14 +00:00
dependabot[bot] 8673552694 Bump github.com/klauspost/compress from 1.16.5 to 1.16.6
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.16.5 to 1.16.6.
- [Release notes](https://github.com/klauspost/compress/releases)
- [Changelog](https://github.com/klauspost/compress/blob/master/.goreleaser.yml)
- [Commits](https://github.com/klauspost/compress/compare/v1.16.5...v1.16.6)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-06-26 18:10:56 +00:00
Joe 3a5f4b13a1 Merge pull request #1313 from BishopFox/0530dependabot/go_modules/google.golang.org/grpc-1.56.1
Bump google.golang.org/grpc from 1.56.0 to 1.56.1
2023-06-26 13:05:21 -05:00
Joe f12ba957d4 Merge branch 'master' into taskmany 2023-06-26 12:39:57 -05:00
dependabot[bot] fa4a9cc845 Bump google.golang.org/grpc from 1.56.0 to 1.56.1
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.56.0 to 1.56.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.56.0...v1.56.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-06-26 17:23:45 +00:00
Joe ac66b0726c Merge pull request #1312 from BishopFox/949bdependabot/go_modules/golang.org/x/net-0.11.0
Bump golang.org/x/net from 0.10.0 to 0.11.0
2023-06-26 12:22:00 -05:00
dependabot[bot] c4a35d6850 Bump golang.org/x/net from 0.10.0 to 0.11.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.10.0 to 0.11.0.
- [Commits](https://github.com/golang/net/compare/v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-06-26 04:00:01 +00:00
chase 395e9717b1 Reorganize taskmany code to work with v1.6 cli 2023-06-25 20:06:33 -04:00
chase f89e435e59 Add additional commands to taskmany 2023-06-25 04:06:46 -04:00
chase 1220611e28 Reorganize and gofmt code 2023-06-24 16:35:43 -04:00
chase e452809056 Add filtering capabilities to taskmany 2023-06-24 15:56:34 -04:00
maxlandon 51473ec137 Add many missing completers 2023-06-22 20:26:04 +02:00
maxlandon 2da61c1e54 Finish splits. Compiles 2023-06-22 19:29:04 +02:00
maxlandon e23f040962 Split sliver commands in their files 2023-06-22 17:55:32 +02:00
moloch-- b2989e0ea3 Prevent keyex replays 2023-06-20 22:35:27 -07:00
Joe 6bd1108152 Merge branch 'master' into notxt_dns 2023-06-20 16:29:33 -05:00
Joe 37e35dc1bd Merge pull request #1304 from BishopFox/48c8dependabot/go_modules/golang.org/x/crypto-0.10.0
Bump golang.org/x/crypto from 0.9.0 to 0.10.0
2023-06-20 16:29:19 -05:00
Joe 77a9113025 Merge branch 'master' into 48c8dependabot/go_modules/golang.org/x/crypto-0.10.0 2023-06-20 16:29:02 -05:00
moloch-- 47705435f9 Reorg actions 2023-06-20 12:01:45 -07:00
moloch-- 233542e059 Re-add ref guards 2023-06-20 12:00:15 -07:00
Joe 42795b077e Merge branch 'master' into 48c8dependabot/go_modules/golang.org/x/crypto-0.10.0 2023-06-20 13:57:57 -05:00
moloch-- e687d12241 Only check release ref on release 2023-06-20 11:57:42 -07:00
moloch-- f414bfb01e Fix peer key encoding 2023-06-20 11:56:47 -07:00
Joe 6db7861a70 Merge branch 'master' into notxt_dns 2023-06-20 13:56:16 -05:00
Joe 711c56c0b0 Merge branch 'master' into 48c8dependabot/go_modules/golang.org/x/crypto-0.10.0 2023-06-20 13:42:26 -05:00
Joe 2d1ea6192c Merge pull request from GHSA-8jxm-xp43-qh3q
Fix Sliver KEM
2023-06-20 13:30:11 -05:00
moloch-- 24aa3508b3 Regenerate pb 2023-06-20 11:27:49 -07:00
Joe 02de46647d Merge branch 'master' into advisory-fix-1
Signed-off-by: Joe <[email protected]>
2023-06-20 13:26:54 -05:00
dependabot[bot] 829e83008b Bump golang.org/x/crypto from 0.9.0 to 0.10.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/golang/crypto/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-06-20 14:55:50 +00:00
Joe e11f4323a2 Merge pull request #1305 from BishopFox/6f30dependabot/go_modules/github.com/tetratelabs/wazero-1.2.1
Bump github.com/tetratelabs/wazero from 1.2.0 to 1.2.1
2023-06-20 09:54:05 -05:00
Joe 6f7e4401bd Merge pull request #1306 from BishopFox/1efddependabot/go_modules/google.golang.org/grpc-1.56.0
Bump google.golang.org/grpc from 1.55.0 to 1.56.0
2023-06-20 09:53:39 -05:00
Joe 6d32be6d98 Merge pull request #1308 from BishopFox/6e51dependabot/go_modules/golang.org/x/sys-0.9.0
Bump golang.org/x/sys from 0.8.0 to 0.9.0
2023-06-20 09:53:10 -05:00
maxlandon f370e96058 Finish splitting server commands in their files 2023-06-20 13:28:03 +02:00
moloch-- dd98134729 Refactor 2023-06-19 18:23:43 -07:00
moloch-- 4da5deae47 Update vendor/ 2023-06-19 17:54:03 -07:00
moloch-- 1d50db6982 Unit tests pass 2023-06-19 12:28:04 -07:00
moloch-- c718085695 Implemented basic keyex unit tests 2023-06-19 11:19:34 -07:00
dependabot[bot] 466abd1bea Bump golang.org/x/sys from 0.8.0 to 0.9.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.8.0 to 0.9.0.
- [Commits](https://github.com/golang/sys/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-06-19 04:05:25 +00:00
dependabot[bot] 408a13cf43 Bump google.golang.org/grpc from 1.55.0 to 1.56.0
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.55.0 to 1.56.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.55.0...v1.56.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-06-19 04:04:30 +00:00
dependabot[bot] 548a4c54c4 Bump github.com/tetratelabs/wazero from 1.2.0 to 1.2.1
Bumps [github.com/tetratelabs/wazero](https://github.com/tetratelabs/wazero) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/tetratelabs/wazero/releases)
- [Commits](https://github.com/tetratelabs/wazero/compare/v1.2.0...v1.2.1)

---
updated-dependencies:
- dependency-name: github.com/tetratelabs/wazero
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-06-19 04:04:12 +00:00
moloch-- 959c3f1909 Peer verification keyex 2023-06-18 17:58:41 -07:00
moloch-- 8f561abfc8 Implemented implant-side encrypt/decrypt 2023-06-18 16:40:28 -07:00
moloch-- 9ab27d1746 initial refactor, broken tests 2023-06-18 16:17:05 -07:00
chase a32d077e16 Add cd and remove duplicate rm from taskmany 2023-06-17 21:11:50 -04:00
Joe 6647abe3d5 Merge pull request #1303 from BishopFox/audit/log
Add additional details to audit log
2023-06-16 18:06:01 -05:00
moloch-- 73f155f6c0 Add additional details to audit log 2023-06-16 13:55:19 -07:00
Joe 57e2111299 Merge pull request #1295 from BishopFox/http-c2-fallback
Fallback to Direct Connection when HTTP Proxy Connection Fails
2023-06-16 15:24:41 -05:00
Joe ea4d517a90 Merge pull request #1302 from BishopFox/fix/implant-exit-1.6
Fix implant exit code.
2023-06-16 13:59:05 -05:00
rkervella b7c8cba630 Fix implant exit code. 2023-06-16 09:14:04 -07:00
Joe f882f52d44 Merge pull request #1301 from BishopFox/windows-hidden-exec
Hidden windows for Executed Processes on Windows
2023-06-16 11:02:03 -05:00
Raf 4b67745c56 Adding the option to spawn processes in Windows with a hidden window 2023-06-16 10:05:38 -04:00
Joe 853537d1f4 Merge pull request #1299 from BishopFox/profile-info
"profiles info" subcommand and saving poll timeout in profile
2023-06-15 09:38:40 -05:00
Raf f6a2021213 Adding profiles info command for detailed info on a profile, saving poll timeout in profile 2023-06-15 09:57:06 -04:00
Joe 4841e46c34 Merge pull request #1298 from BishopFox/save-sgn-pref-in-profile
Storing Shikata Ga Nai (SGN) preference with implant profile
2023-06-14 14:25:16 -05:00
Raf 888d4479a3 Storing Shikata Ga Nai (SGN) preference with implant profile 2023-06-14 12:18:23 -04:00
Joe fd7585e628 Merge pull request #1293 from BishopFox/88cedependabot/go_modules/github.com/ncruces/go-sqlite3-0.7.2
Bump github.com/ncruces/go-sqlite3 from 0.7.0 to 0.7.2
2023-06-13 11:13:31 -05:00
Joe 43969f7c11 Merge pull request #1292 from BishopFox/b526dependabot/go_modules/gorm.io/driver/sqlite-1.5.2
Bump gorm.io/driver/sqlite from 1.5.1 to 1.5.2
2023-06-13 09:48:36 -05:00
Joe d79fe0c4d1 Merge pull request #1291 from BishopFox/370ddependabot/go_modules/modernc.org/sqlite-1.23.1
Bump modernc.org/sqlite from 1.22.1 to 1.23.1
2023-06-13 09:48:16 -05:00
Raf f606639db5 Adding an advanced HTTP C2 option to fallback to direct connection when proxy fails 2023-06-12 08:36:00 -04:00
dependabot[bot] 934e45ce38 Bump github.com/ncruces/go-sqlite3 from 0.7.0 to 0.7.2
Bumps [github.com/ncruces/go-sqlite3](https://github.com/ncruces/go-sqlite3) from 0.7.0 to 0.7.2.
- [Release notes](https://github.com/ncruces/go-sqlite3/releases)
- [Commits](https://github.com/ncruces/go-sqlite3/compare/v0.7.0...v0.7.2)

---
updated-dependencies:
- dependency-name: github.com/ncruces/go-sqlite3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-06-12 04:03:46 +00:00
dependabot[bot] ab8da44be4 Bump gorm.io/driver/sqlite from 1.5.1 to 1.5.2
Bumps [gorm.io/driver/sqlite](https://github.com/go-gorm/sqlite) from 1.5.1 to 1.5.2.
- [Commits](https://github.com/go-gorm/sqlite/compare/v1.5.1...v1.5.2)

---
updated-dependencies:
- dependency-name: gorm.io/driver/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-06-12 04:02:47 +00:00
dependabot[bot] eb3db89e9f Bump modernc.org/sqlite from 1.22.1 to 1.23.1
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.22.1 to 1.23.1.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.22.1...v1.23.1)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-06-12 04:01:58 +00:00
Tim Makram Ghatas aa2652e4e7 add default http c2 profile parameter for beacons 2023-06-11 19:28:55 -04:00
Tim Makram Ghatas c7531bdacf fixed http c2 randomizer and path segments length bug 2023-06-11 19:24:24 -04:00
Tim Makram Ghatas b7d8c535f0 retrieve monitor config from sqlite db on start command 2023-06-11 18:53:22 -04:00
Tim Makram Ghatas a1194c0c41 allow inserting, deleting and retrieving watchtower configurations from database 2023-06-11 18:44:12 -04:00
moloch-- ea0f4e41b7 Remove uneeded vars 2023-06-11 15:31:12 -07:00
Tim Makram Ghatas aac5b227ca added rpc functions for watchtower configuration 2023-06-09 15:33:58 -04:00
Tim Makram Ghatas 20221a8a50 updated watchtower pb object, and added commands for listing adding and removing watchtower configuration 2023-06-09 15:28:50 -04:00
Tim Makram Ghatas fca1202cee added watchtower objects to sql db 2023-06-08 12:24:33 -04:00
Tim Makram Ghatas 6e49197b2c add protobuf definition for watchtower config 2023-06-07 18:01:50 -04:00
maxlandon ec88f9bd02 Start splitting commands declarations 2023-06-07 23:00:29 +02:00
maxlandon bce0c8de06 Add a flags package, in which we store some command utility functions to
bind flags, completions, apply command filters, etc.
2023-06-07 22:24:19 +02:00
maxlandon 44ceccff12 Fix some newlines printed or not 2023-06-07 21:44:01 +02:00
Joe 6dadd929e8 Merge pull request #1283 from BishopFox/wasm/beacon
Add wasm output in beacon mode
2023-06-07 10:46:02 -05:00
moloch-- 05aad0aa8b Add wasm output in beacon mode 2023-06-07 07:17:21 -07:00
b0yd bbe5f4c7cf Removed unnecessary change 2023-06-07 10:15:09 -04:00
b0yd 66c521d719 Merge updates 2023-06-07 09:58:47 -04:00
Tim Makram Ghatas 25f7c6e63e switch to constants variable 2023-06-07 08:08:59 -04:00
Tim Makram Ghatas 678c70d108 add default port check for mtls 2023-06-07 07:53:16 -04:00
Tim Makram Ghatas ee95829770 refactor job creation and move hardcoded values to constants 2023-06-06 23:37:53 -04:00
Tim Makram Ghatas a73bdf91e2 automatically update job id's on server restart 2023-06-06 23:00:37 -04:00
Tim Makram Ghatas 2cac1eb38b set default value for c2 profile and move to constant strings 2023-06-06 21:01:13 -04:00
b0yd 9148720eb2 Added logic to send clear message after a job is completed 2023-06-06 11:09:52 -04:00
Tim Makram Ghatas dcb0128c3c added multiplayer mode job listener to db 2023-06-06 02:40:44 +02:00
Tim Makram Ghatas 195354792e remove unused code 2023-06-06 02:24:35 +02:00
Tim Makram Ghatas 1419e7173c store and retrieve persistent listeners from database 2023-06-06 02:21:16 +02:00
Tim Makram Ghatas 1241d87b9b remove listener from db when killed 2023-06-06 01:13:32 +02:00
Tim Makram Ghatas 3dc7002fdd fixed jobid display error and added sql tables for dns domains and mtls 2023-06-06 00:45:07 +02:00
b0yd 80947425ec Don't bail on replay attack 2023-06-05 17:23:26 -04:00
b0yd 185ded66c2 Error msg 2023-06-05 17:04:35 -04:00
b0yd 884f2d0bd7 Typo 2023-06-05 16:57:51 -04:00
b0yd 4d0f6585d8 More dbg msgs 2023-06-05 16:48:24 -04:00
b0yd 998bd5ab80 Fixed empty message bug 2023-06-05 16:19:15 -04:00
b0yd 76a8de643f Fixed empty message bug 2023-06-05 16:12:23 -04:00
Tim Makram Ghatas a463aa1218 added listener jobs to database, fixed jobid output issue and implemented save query for listener jobs 2023-06-05 20:05:02 +02:00
Joe ae21b45147 Merge pull request #1281 from BishopFox/msf-stager-advanced-options
MSF Stager Advanced Options
2023-06-05 13:00:55 -05:00
Tim Makram Ghatas 5281465c7f typo 2023-06-05 19:42:36 +02:00
Tim Makram Ghatas dd433136bc move away from server object to protobuf 2023-06-05 19:17:31 +02:00
Tim Makram Ghatas 906b8eeec7 rebuild protobuf 2023-06-05 19:16:14 +02:00
Tim Makram Ghatas 126dcf7d86 remove persistent flag from client job commands and update variable name 2023-06-05 19:15:44 +02:00
Tim Makram Ghatas 43eb9e3ded update protobuf definition for c2 listeners 2023-06-05 19:14:23 +02:00
Raf a07b775d90 Staging MSF stager advanced options against master with the new CLI 2023-06-05 13:11:45 -04:00
Joe ce4a2178f6 Merge pull request #1277 from BishopFox/d75adependabot/go_modules/github.com/ncruces/go-sqlite3-0.7.0
Bump github.com/ncruces/go-sqlite3 from 0.5.3 to 0.7.0
2023-06-05 08:32:52 -05:00
Joe acc8b2b013 Merge pull request #1279 from BishopFox/771bdependabot/go_modules/github.com/glebarez/sqlite-1.8.0
Bump github.com/glebarez/sqlite from 1.7.0 to 1.8.0
2023-06-05 08:32:34 -05:00
Joe 2c527f9486 Merge pull request #1276 from BishopFox/c73edependabot/go_modules/github.com/klauspost/compress-1.16.5
Bump github.com/klauspost/compress from 1.15.12 to 1.16.5
2023-06-05 08:32:02 -05:00
Joe 69e58fee1f Merge pull request #1278 from BishopFox/9279dependabot/go_modules/github.com/sirupsen/logrus-1.9.3
Bump github.com/sirupsen/logrus from 1.9.2 to 1.9.3
2023-06-05 08:31:16 -05:00
dependabot[bot] ee22840f94 Bump github.com/klauspost/compress from 1.15.12 to 1.16.5
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.15.12 to 1.16.5.
- [Release notes](https://github.com/klauspost/compress/releases)
- [Changelog](https://github.com/klauspost/compress/blob/master/.goreleaser.yml)
- [Commits](https://github.com/klauspost/compress/compare/v1.15.12...v1.16.5)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-06-05 05:17:17 +00:00
Joe 59b4c12adc Merge pull request #1275 from BishopFox/5c4cdependabot/go_modules/github.com/mattn/go-sqlite3-1.14.17
Bump github.com/mattn/go-sqlite3 from 1.14.16 to 1.14.17
2023-06-05 00:10:22 -05:00
dependabot[bot] edebf734eb Bump github.com/glebarez/sqlite from 1.7.0 to 1.8.0
Bumps [github.com/glebarez/sqlite](https://github.com/glebarez/sqlite) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/glebarez/sqlite/releases)
- [Commits](https://github.com/glebarez/sqlite/compare/v1.7.0...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/glebarez/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-06-05 04:03:29 +00:00
dependabot[bot] 3497b7ebe5 Bump github.com/sirupsen/logrus from 1.9.2 to 1.9.3
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.9.2 to 1.9.3.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.9.2...v1.9.3)

---
updated-dependencies:
- dependency-name: github.com/sirupsen/logrus
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-06-05 04:03:00 +00:00
dependabot[bot] fc1f0f04c8 Bump github.com/ncruces/go-sqlite3 from 0.5.3 to 0.7.0
Bumps [github.com/ncruces/go-sqlite3](https://github.com/ncruces/go-sqlite3) from 0.5.3 to 0.7.0.
- [Release notes](https://github.com/ncruces/go-sqlite3/releases)
- [Commits](https://github.com/ncruces/go-sqlite3/compare/v0.5.3...v0.7.0)

---
updated-dependencies:
- dependency-name: github.com/ncruces/go-sqlite3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-06-05 04:02:52 +00:00
dependabot[bot] f42a8d1918 Bump github.com/mattn/go-sqlite3 from 1.14.16 to 1.14.17
Bumps [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) from 1.14.16 to 1.14.17.
- [Release notes](https://github.com/mattn/go-sqlite3/releases)
- [Commits](https://github.com/mattn/go-sqlite3/compare/v1.14.16...v1.14.17)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-sqlite3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-06-05 04:02:29 +00:00
Joe 9892306307 Merge pull request #1273 from kernelpanic-bf/master
Fixing new line issue for shell commands with windows sliver client
2023-06-04 22:17:49 -05:00
Joe b5f8fa4131 Merge pull request #1274 from maxlandon/record
Add console session asciicast recorder
2023-06-04 22:17:20 -05:00
maxlandon 5f8470a696 Update dependencies. Asciicast works fine. 2023-06-05 03:08:53 +02:00
maxlandon 12bcf32686 Update console/readline 2023-06-05 02:34:01 +02:00
maxlandon 31a7063bc0 Update asciicast dependencies 2023-06-04 23:56:46 +02:00
maxlandon fba629ea07 Merge last commit with new asciicast recorder 2023-06-04 23:51:46 +02:00
kernelpanic-bf 200a62a97f Fixing new line issue for shell commands with windows sliver client 2023-06-04 23:30:15 +02:00
maxlandon 49fbe7d451 Merge branch 'master' into record 2023-06-04 23:18:24 +02:00
maxlandon c49fc509db Add back carriage returns, for asciicast compatibility 2023-06-04 23:11:11 +02:00
Joe 659629675b Merge pull request #1272 from BishopFox/v1.6.0/logrotate
Rotate and compress server-side console logs
2023-06-04 15:44:04 -05:00
maxlandon 678bc2f5ae Merge branch 'master' into record 2023-06-04 22:31:24 +02:00
Joe cad6398d2b Merge pull request #1271 from BishopFox/v1.6.0/rpclogger
V1.6.0/rpclogger
2023-06-04 15:01:17 -05:00
moloch-- 151b86e337 Rotate and compress server-side console logs 2023-06-04 13:00:52 -07:00
maxlandon 18f3b31c77 Asciicast recorder try 2023-06-04 20:36:05 +02:00
Tim Makram Ghatas c8a661dccc fix for binary test cases 2023-06-04 20:32:16 +02:00
Joe ff0a6db000 Merge pull request #1269 from maxlandon/record
Experimental console logging with golang.org/x/exp/slog
2023-06-04 13:16:35 -05:00
moloch-- eb9cc277fa Improved error logging 2023-06-04 11:03:19 -07:00
moloch-- 9b3acb2e6a Random suffix is file already exists 2023-06-04 10:59:10 -07:00
moloch-- 2eaa3961cd Rename rpc file 2023-06-04 10:53:08 -07:00
moloch-- 5e6a97469c Update path and fs permissions 2023-06-04 10:51:50 -07:00
moloch-- 8bd3c6c9b8 Implement multi-streamed client logs 2023-06-04 10:49:18 -07:00
maxlandon 73b1501645 Merge branch 'record' of ssh://github.com/maxlandon/sliver into record 2023-06-04 19:35:21 +02:00
maxlandon 7f550ca538 Use multiwriter for log output 2023-06-04 19:34:55 +02:00
moloch-- 184b073ad2 Fix make targets 2023-06-04 10:15:23 -07:00
moloch-- 2307e8761e Merge branch 'master' into record 2023-06-04 10:12:27 -07:00
Joe c5315d2ec0 Merge pull request #1266 from BishopFox/v1.6.0/validate-advanced-c2
Adding validation for advanced C2 options
2023-06-04 12:02:08 -05:00
maxlandon f7dfbed6b4 Experimental console logging with golang/x/exp/slog:
What is logged:
- Each command line entered and actually executed is logged at debug
  level, and with the key "type":"command" set.
- Each message/string given to one of the `con.App.Print*()` functions
  is both printed to os.Stdout and written to the console log file with
  corresponding log level.
  Events are logged the same with key "type":"event" set.
2023-06-04 19:01:59 +02:00
moloch-- 23d85f983a Update autorelease action for all os/arch 2023-06-04 09:37:12 -07:00
moloch-- 8ababef4c0 Merge branch 'master' into v1.6.0/validate-advanced-c2 2023-06-04 09:12:49 -07:00
moloch-- cc8581d9e1 Add mingw for unit tests 2023-06-04 09:11:53 -07:00
Joe e4e9f1cfe9 Merge pull request #1264 from maxlandon/server-admin
Add back server admin commands
2023-06-04 11:09:40 -05:00
moloch-- 65f23a13d5 Update autorelease action 2023-06-04 09:07:22 -07:00
moloch-- 5463cf7dbd Remove unused steps in workflows 2023-06-04 09:05:01 -07:00
moloch-- bbbdbda50c Merge branch 'v1.6.0/master' 2023-06-04 09:01:26 -07:00
moloch-- 94a9f422b3 Update build check workflow 2023-06-04 09:00:21 -07:00
moloch-- 40c3e06578 Cleanup 2023-06-04 08:53:54 -07:00
moloch-- 31533e1917 Updated garble 2023-06-04 08:33:55 -07:00
Joe 641b736e39 Merge pull request #1267 from BishopFox/v1.6.0/https-encrypted-cert-error
Client Side Error for Invalid / Unsupported TLS Certs for HTTPS listener
2023-06-04 10:24:43 -05:00
Raf a3e965b5a7 Adding a message on the client side if the provided HTTPS cert / key cannot be loaded 2023-06-04 05:44:26 -04:00
Raf 414730bc32 Adding validation for advanced C2 options 2023-06-04 04:58:40 -04:00
maxlandon 3adc92bfd9 Add back server admin commands 2023-06-04 05:09:22 +02:00
moloch-- cd9740996a Add freebsd client to Makefile 2023-06-03 16:13:14 -07:00
moloch-- b5fc7949c9 Update implant wazero 2023-06-03 15:35:52 -07:00
moloch-- 6a5e4786a0 Update wazero and vendor/ 2023-06-03 15:28:59 -07:00
moloch-- b377ea8257 Update wazero and vendor/ 2023-06-03 15:28:52 -07:00
moloch-- 71b4f23cde Ext code cleanup 2023-06-03 14:50:24 -07:00
moloch-- 7199331b99 Cursed code cleanup 2023-06-03 14:47:10 -07:00
Joe 2f77917425 Merge pull request #1261 from maxlandon/CLI
New CLI system
2023-06-03 11:01:03 -05:00
maxlandon 6355cc5d67 Merge branch 'CLI' of ssh://github.com/maxlandon/sliver into CLI 2023-06-03 17:13:02 +02:00
maxlandon 09d0e9664b Correctly reapply command filters when directly switching from a sliver
to another.
2023-06-03 17:11:47 +02:00
moloch-- e7e76d430d Implement exitCmd 2023-06-03 08:07:00 -07:00
moloch-- d91a2febcf Implement exitCmd 2023-06-03 08:06:58 -07:00
maxlandon 678a945647 Update console/readline dependencies with a fix 2023-06-03 16:51:27 +02:00
moloch-- 7a653f8d74 Fix unit test 2023-06-03 06:47:17 -07:00
maxlandon 049ec78422 Commit new client console. 2023-06-03 03:59:24 +02:00
b0yd 66b7b98ed3 Hopefully fixed race condition 2023-06-02 16:49:19 -04:00
b0yd d341b1cb3a Hopefully fixed race condition 2023-06-02 16:13:01 -04:00
b0yd f5d2cd2e94 Initialized new map 2023-06-02 15:59:45 -04:00
b0yd 2b2feb306b Hopefully fixed race condition 2023-06-02 15:46:34 -04:00
b0yd d390ac95c7 Attempting to fix race condition in poll 2023-06-02 15:03:18 -04:00
b0yd 52ff6b4c52 Do not respond if there are no messages available 2023-06-02 14:31:23 -04:00
b0yd 4c8486349b Do not respond if there are no messages available 2023-06-02 14:29:08 -04:00
b0yd 58bcac52eb Refuse requests for duplicate requests 2023-06-02 14:11:24 -04:00
b0yd 8469c9a1ce Debug on message send queue 2023-06-02 13:15:27 -04:00
b0yd ca7b62fb7e Removed some error handled that was designed that way 2023-06-02 10:53:22 -04:00
b0yd 1902f131e7 Added error handling, debug msgs, and indexes to AAAA records to be reassembled 2023-06-02 09:40:55 -04:00
Joe f1c18e0fc7 Merge pull request #1258 from BishopFox/c2/serversign
C2/serversign
2023-06-01 17:45:08 -05:00
moloch-- a34d878e69 Light code cleanup 2023-06-01 14:55:24 -07:00
moloch-- 3a8d649321 Add server sigs to messages 2023-06-01 14:35:31 -07:00
b0yd 80e04c71ff Merge branch 'notxt_dns' of https://github.com/rwincey/sliver into notxt_dns 2023-06-01 14:58:04 -04:00
b0yd b8697f6271 Switched from cname to just aaaa IPs 2023-06-01 14:56:01 -04:00
moloch-- 2c23ccf338 Update readme 2023-06-01 11:40:34 -07:00
moloch-- 7b912042e8 update readme 2023-06-01 11:30:24 -07:00
moloch-- b85cd4f5d3 Merge master 2023-06-01 11:25:11 -07:00
Ronan Kervella cd2e7791af Merge pull request #1257 from BishopFox/msf_stager_custom_luri
Customization of the LURI for MSF Stager Payloads
2023-06-01 09:45:13 -07:00
Joe d2588ca835 Merge pull request #1255 from BishopFox/fix/autorelease
Update autorelease action
2023-06-01 11:25:45 -05:00
Raf ef5b204ecb Adding customization of the LURI through the HTTP C2 server options for HTTP(S) MSF stager payloads 2023-06-01 12:00:57 -04:00
moloch-- 1be433e927 Update autorelease action 2023-06-01 06:37:40 -07:00
Joe 9f73a7ad03 Merge pull request #1251 from BishopFox/more_jobs_info
More information from the jobs command about stage listeners
2023-05-31 17:11:12 -05:00
moloch-- e455e46ffe Add server rpc for console logs 2023-05-30 16:21:41 -07:00
moloch-- 59b4ebc4c7 Add server rpc for console logs 2023-05-30 16:21:25 -07:00
rwincey 91b2836968 Merge branch 'BishopFox:master' into notxt_dns 2023-05-30 13:46:55 -04:00
Tim Makram Ghatas 3e67c6e2b8 replaced hardcoded http profile value with commandline arg, fixed pb issue with certificate digest and switched from profile id to profile name in implantconfig pb 2023-05-30 17:11:32 +02:00
Joe 8e7f907353 Merge pull request #1246 from BishopFox/d77edependabot/go_modules/gorm.io/driver/mysql-1.5.1
Bump gorm.io/driver/mysql from 1.5.0 to 1.5.1
2023-05-30 09:14:20 -05:00
rwincey 244639a79c Merge branch 'BishopFox:master' into notxt_dns 2023-05-30 10:12:52 -04:00
Tim Makram Ghatas c03975d6c4 added profile randomization during implant generation 2023-05-30 13:59:57 +02:00
Tim Makram Ghatas 429c520c78 add ECCPublicKeyDigest to protobuf and database 2023-05-30 11:46:18 +02:00
Tim Makram Ghatas a6ba86379a Merge branch 'v1.6.0/master' into v1.6.0/http-c2 2023-05-30 10:39:22 +02:00
Tim Makram Ghatas 4b7b8c4b3e autoload default profile during implant generation 2023-05-30 10:08:09 +02:00
Tim Makram Ghatas 75c3d0c0fb load http configurations from database on listener creation 2023-05-30 06:41:08 +02:00
Tim Makram Ghatas 8f7da07a35 protobuf build update 2023-05-30 06:21:34 +02:00
Tim Makram Ghatas 95a4604a8b fix path segments generation issues 2023-05-30 06:20:53 +02:00
moloch-- 3eca9e3dd3 Added console logs to settings cmd 2023-05-29 21:18:15 -04:00
dependabot[bot] 642838cbc4 Bump gorm.io/driver/mysql from 1.5.0 to 1.5.1
Bumps [gorm.io/driver/mysql](https://github.com/go-gorm/mysql) from 1.5.0 to 1.5.1.
- [Commits](https://github.com/go-gorm/mysql/compare/v1.5.0...v1.5.1)

---
updated-dependencies:
- dependency-name: gorm.io/driver/mysql
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-05-30 00:53:31 +00:00
Joe e030b7cdd0 Merge pull request #1247 from BishopFox/2c59dependabot/go_modules/gorm.io/driver/postgres-1.5.2
Bump gorm.io/driver/postgres from 1.5.0 to 1.5.2
2023-05-29 19:52:08 -05:00
moloch-- da7a0a33b9 Remove ioutil 2023-05-29 20:22:34 -04:00
dependabot[bot] b9da25e80d Bump gorm.io/driver/postgres from 1.5.0 to 1.5.2
Bumps [gorm.io/driver/postgres](https://github.com/go-gorm/postgres) from 1.5.0 to 1.5.2.
- [Commits](https://github.com/go-gorm/postgres/compare/v1.5.0...v1.5.2)

---
updated-dependencies:
- dependency-name: gorm.io/driver/postgres
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-05-30 00:17:07 +00:00
Joe 4a7351a2da Merge pull request #1245 from BishopFox/8960dependabot/go_modules/github.com/sirupsen/logrus-1.9.2
Bump github.com/sirupsen/logrus from 1.9.0 to 1.9.2
2023-05-29 19:15:49 -05:00
Joe 261645cc88 Merge pull request #1249 from BishopFox/fbe2dependabot/go_modules/gorm.io/driver/sqlite-1.5.1
Bump gorm.io/driver/sqlite from 1.5.0 to 1.5.1
2023-05-29 19:14:54 -05:00
moloch-- 639c092ff6 Min go version 1.20 2023-05-29 20:09:44 -04:00
moloch-- b8075a1d83 Implement client console logging 2023-05-29 20:09:10 -04:00
b0yd 992ee14e82 Fixed cname recursive lookup 2023-05-29 16:00:50 -04:00
b0yd 2066d200c4 More size massaging 2023-05-29 13:10:20 -04:00
b0yd 683a779159 More size massaging 2023-05-29 12:49:35 -04:00
b0yd d14003bf14 More size massaging 2023-05-29 11:15:29 -04:00
b0yd e4b6da3471 More size massaging 2023-05-29 11:06:58 -04:00
b0yd 4c0f36dba2 More size massaging 2023-05-29 10:50:56 -04:00
Tim Makram Ghatas 3b295b3bae fixed renamed protobuf issues and default configuration save 2023-05-28 23:20:59 +02:00
b0yd 302711e817 Trimmed DNS size to fit within 512 2023-05-26 17:39:35 -04:00
b0yd a8b69b352d Added AAAA record to response along with CNAME 2023-05-26 11:32:43 -04:00
b0yd f180dd9aff Added support for nonTXT based DNS comms 2023-05-26 09:13:45 -04:00
Tim Makram Ghatas 09f2521bc3 added check for included c2 channels during config generation 2023-05-26 02:15:25 +02:00
Tim Makram Ghatas d674b8d40f fix sliver rendering code variable name changes 2023-05-26 01:45:04 +02:00
Tim Makram Ghatas d98b24fbc6 add boolean checks for named pipe and tcp pivot 2023-05-26 01:37:44 +02:00
Tim Makram Ghatas 0f38081c0c check for presence of default http c2 profile on startup, and if not present generate and insert into database 2023-05-25 22:58:48 +02:00
Tim Makram Ghatas bedc225344 added default http profile generator 2023-05-25 20:25:42 +02:00
Tim Makram Ghatas 82c68bda54 ImplantConfigSave uses model object instead of protobuf 2023-05-25 16:46:09 +02:00
Tim Makram Ghatas 89b0263634 switch use of models.ImplantConfig to clientpb.ImplantConfig 2023-05-25 00:10:07 +02:00
Raf 9db0b29e1a Compiling protobuf with a newer version of protoc 2023-05-23 14:16:07 -04:00
Raf f027b161eb Addressing #713 - Adding more info to jobs command output 2023-05-23 13:41:12 -04:00
dependabot[bot] 729b03d515 Bump gorm.io/driver/sqlite from 1.5.0 to 1.5.1
Bumps [gorm.io/driver/sqlite](https://github.com/go-gorm/sqlite) from 1.5.0 to 1.5.1.
- [Commits](https://github.com/go-gorm/sqlite/compare/v1.5.0...v1.5.1)

---
updated-dependencies:
- dependency-name: gorm.io/driver/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-05-22 04:03:16 +00:00
dependabot[bot] 92c087cd2f Bump github.com/sirupsen/logrus from 1.9.0 to 1.9.2
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.9.0 to 1.9.2.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.9.0...v1.9.2)

---
updated-dependencies:
- dependency-name: github.com/sirupsen/logrus
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-05-22 04:01:55 +00:00
moloch-- 865f295c65 wip refactor of generate code 2023-05-19 08:25:28 -07:00
Joe 87c14df0e2 Merge pull request #1243 from xl4sh/fix/tasks-fetch
Fix msg type errors in tasks fetch command
2023-05-19 10:19:41 -05:00
xl4sh 9488a5f9d8 Fix msg type errors in tasks fetch command 2023-05-19 13:03:29 +09:00
Ronan Kervella 43ca23bab1 Merge pull request #1238 from rwincey/mem_files
Added memory file feature
2023-05-18 10:11:08 -07:00
Joe 062f176a36 Merge pull request #1242 from BishopFox/fix/1241
Check for nil session when using `session -k`
2023-05-18 09:12:16 -05:00
rkervella 1aefbcb9ee Check nil session 2023-05-17 19:06:39 -07:00
Joe dc5220c87e Merge pull request #1234 from BishopFox/33bedependabot/go_modules/gorm.io/gorm-1.25.1
Bump gorm.io/gorm from 1.25.0 to 1.25.1
2023-05-17 20:59:32 -05:00
Joe 6ef4ea3e74 Merge pull request #1239 from BishopFox/fix/1236
Verbose error when msfvenom fails in `generate starger`
2023-05-17 20:58:36 -05:00
moloch-- bad1897e78 Implemented ToProtobuf() conversions 2023-05-17 18:24:05 -07:00
moloch-- ae101d3243 Implemented ToProtobuf() conversions 2023-05-17 18:23:25 -07:00
moloch-- a947d9efeb Implemented basic http c2 pb 2023-05-17 18:13:14 -07:00
moloch-- afa2b5c715 Implemented basic http c2 pb 2023-05-17 18:11:55 -07:00
moloch-- 086eb7fe42 Added more cookie names 2023-05-17 17:27:29 -07:00
moloch-- 55c8cddf88 Expanded default http c2 config 2023-05-17 17:04:44 -07:00
moloch-- 7661d0c1b9 Implement gorm hooks, cleanup 2023-05-17 16:43:40 -07:00
moloch-- f1f736d7c1 Outline http c2 in db 2023-05-17 16:32:04 -07:00
moloch-- 8ad0dfb4c8 Outline http c2 in db 2023-05-17 16:31:56 -07:00
rkervella 2378804681 Ensure msfvenom is in PATH and more verbose error in client 2023-05-17 10:39:57 -07:00
b0yd 9ff31e9724 Added memory file feature 2023-05-17 12:37:30 -04:00
moloch-- 007b5673f9 Merge branch 'master' into v1.6.0/master 2023-05-16 08:29:54 -07:00
moloch-- a396867aa5 Add size limits to nacl funcs 2023-05-16 08:19:17 -07:00
Joe af46878f85 Merge pull request #1232 from BishopFox/5421dependabot/go_modules/golang.org/x/crypto-0.9.0
Bump golang.org/x/crypto from 0.8.0 to 0.9.0
2023-05-15 15:06:06 -05:00
Joe 47f10d0301 Merge pull request #1235 from BishopFox/dns-specification
Adding support for specifying DNS resolvers through advanced options
2023-05-15 15:04:40 -05:00
Raf 52daa1ac66 Adding support for specifying DNS resolvers through advanced options 2023-05-15 14:50:44 -04:00
dependabot[bot] 6e175377a6 Bump gorm.io/gorm from 1.25.0 to 1.25.1
Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.25.0 to 1.25.1.
- [Release notes](https://github.com/go-gorm/gorm/releases)
- [Commits](https://github.com/go-gorm/gorm/compare/v1.25.0...v1.25.1)

---
updated-dependencies:
- dependency-name: gorm.io/gorm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-05-15 04:01:43 +00:00
dependabot[bot] 38a740aff2 Bump golang.org/x/crypto from 0.8.0 to 0.9.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.8.0 to 0.9.0.
- [Commits](https://github.com/golang/crypto/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-05-15 04:01:21 +00:00
moloch-- 8ffe11afbc Merge branch 'master' into v1.6.0/master 2023-05-14 20:30:41 -07:00
moloch-- 4690430cec update installer to symlink sliver/sliver-client 2023-05-14 19:55:21 -07:00
moloch-- ead8c57ca6 simplify loot dir structure 2023-05-14 19:53:10 -07:00
moloch-- 7a048572a7 Added unit tests to client/creds 2023-05-14 08:29:09 -07:00
moloch-- 03e2dd3ba3 Consistent settings 2023-05-12 23:16:17 -07:00
moloch-- a14c15d177 Fix go tests tag 2023-05-12 23:00:55 -07:00
moloch-- d4fd8dc675 Merge master 2023-05-12 22:24:09 -07:00
Joe 81acc47bdc Merge pull request #1229 from BishopFox/go/v1.20.4
Go v1.20.4
2023-05-12 11:33:58 -05:00
moloch-- d547708961 Go v1.20.4 2023-05-12 08:11:19 -07:00
moloch-- b16644e6c6 Updates to crack cmd 2023-05-12 06:59:41 -07:00
Joe 415c7ebd03 Merge pull request #1226 from BishopFox/cf59dependabot/go_modules/google.golang.org/grpc-1.55.0
Bump google.golang.org/grpc from 1.54.0 to 1.55.0
2023-05-08 10:19:36 -05:00
Joe 0510ef7242 Merge pull request #1227 from BishopFox/ac80dependabot/go_modules/golang.org/x/term-0.8.0
Bump golang.org/x/term from 0.7.0 to 0.8.0
2023-05-08 10:16:05 -05:00
dependabot[bot] 27c6e8e8e4 Bump golang.org/x/term from 0.7.0 to 0.8.0
Bumps [golang.org/x/term](https://github.com/golang/term) from 0.7.0 to 0.8.0.
- [Commits](https://github.com/golang/term/compare/v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-05-08 04:00:50 +00:00
dependabot[bot] 64c40bad05 Bump google.golang.org/grpc from 1.54.0 to 1.55.0
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.54.0 to 1.55.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.54.0...v1.55.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-05-08 04:00:32 +00:00
chase 1fd410ee71 Add basic functionality to taskmany command 2023-05-06 04:29:58 -04:00
Chris Smith 8368fe6b34 Merge pull request #1223 from BishopFox/migrate-procname
Refactor `migrate`
2023-05-05 17:12:19 -07:00
rkervella a468ec8239 Allow migrate to use process names 2023-05-05 16:07:37 -07:00
Joe 40aa052696 Merge pull request #1222 from smeukinou/fix-multiple-display-screenshot
FIX windows screenshot when multiple monitors are used
2023-05-05 09:50:30 -05:00
Joe c3e8a1a938 Merge pull request #1221 from smeukinou/fix_locale_limit
FIX implant generation with locale limit
2023-05-05 09:50:19 -05:00
Joe bacd3d6f13 Merge pull request #1220 from smeukinou/master
Add ESET Internet Security to kwnown security processes
2023-05-05 09:50:08 -05:00
smeukinou b5e611d73b FIX windows screenshot when multiple monitors are used, and they are not exactly side-by-side 2023-05-05 13:36:53 +02:00
smeukinou 2f9c84c793 FIX implant generation with locale limit not compiling when not in debug mode 2023-05-05 11:44:13 +02:00
smeukinou d921c3c56d Add ESET Internet Security to kwnown security processes 2023-05-05 10:58:50 +02:00
Joe 8408296c0b Merge pull request #1218 from BishopFox/f6e9dependabot/go_modules/modernc.org/sqlite-1.22.1
Bump modernc.org/sqlite from 1.22.0 to 1.22.1
2023-05-01 09:45:47 -05:00
Joe b7206530f4 Merge pull request #1217 from BishopFox/20f6dependabot/go_modules/github.com/miekg/dns-1.1.54
Bump github.com/miekg/dns from 1.1.53 to 1.1.54
2023-05-01 09:44:51 -05:00
dependabot[bot] 5b22e6dfc8 Bump modernc.org/sqlite from 1.22.0 to 1.22.1
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.22.0 to 1.22.1.
- [Release notes](https://gitlab.com/cznic/sqlite/tags)
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.22.0...v1.22.1)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-05-01 04:05:06 +00:00
dependabot[bot] ad53f903c7 Bump github.com/miekg/dns from 1.1.53 to 1.1.54
Bumps [github.com/miekg/dns](https://github.com/miekg/dns) from 1.1.53 to 1.1.54.
- [Release notes](https://github.com/miekg/dns/releases)
- [Changelog](https://github.com/miekg/dns/blob/master/Makefile.release)
- [Commits](https://github.com/miekg/dns/compare/v1.1.53...v1.1.54)

---
updated-dependencies:
- dependency-name: github.com/miekg/dns
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-05-01 04:04:33 +00:00
moloch-- eba14591f5 Merge master 2023-04-28 10:15:35 -07:00
Joe 649960a3e9 Merge pull request #1215 from BishopFox/protobuf-xor
Implant protobuf update
2023-04-27 18:52:32 -05:00
rkervella 7c33022408 Apply XOR to dnspb and commonpb too 2023-04-27 15:18:24 -07:00
rkervella 7522a0b7de Apply XOR to protobuf raw data 2023-04-27 15:01:13 -07:00
Joe 651587c324 Merge pull request #1214 from cmprmsd/rapid7
Add Rapid 7 EDR - Insight Agent
2023-04-27 11:17:08 -05:00
cmprmsd fce0221bc7 Add Rapid 7 2023-04-27 09:07:48 +02:00
Joe 8a9437c99a Merge pull request #1213 from rwincey/console_fix
Fixed nil pointer in console
2023-04-25 18:21:55 -05:00
b0yd 3599af150f Fixed nil pointer 2023-04-24 14:42:14 -04:00
Joe d92aaa98e4 Merge pull request #1212 from BishopFox/ef39dependabot/go_modules/modernc.org/sqlite-1.22.0
Bump modernc.org/sqlite from 1.21.1 to 1.22.0
2023-04-24 12:08:46 -05:00
dependabot[bot] 9e12db9ad2 Bump modernc.org/sqlite from 1.21.1 to 1.22.0
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.21.1 to 1.22.0.
- [Release notes](https://gitlab.com/cznic/sqlite/tags)
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.21.1...v1.22.0)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-04-24 04:01:09 +00:00
Joe c367c8c948 Merge pull request #1207 from BishopFox/fix_info_beacon
always display updated info
2023-04-19 13:30:01 -05:00
Tim Makram Ghatas 77ab598d59 pull latest beacon or session configuration on info command even if a beacon or session is currently selected to avoid displaying outdated values after a reconfiguration 2023-04-19 18:21:02 +02:00
Joe c0a42c6b14 Merge pull request #1202 from BishopFox/75cedependabot/go_modules/gorm.io/driver/mysql-1.5.0
Bump gorm.io/driver/mysql from 1.4.7 to 1.5.0
2023-04-17 12:15:55 -05:00
dependabot[bot] 7479e86765 Bump gorm.io/driver/mysql from 1.4.7 to 1.5.0
Bumps [gorm.io/driver/mysql](https://github.com/go-gorm/mysql) from 1.4.7 to 1.5.0.
- [Release notes](https://github.com/go-gorm/mysql/releases)
- [Commits](https://github.com/go-gorm/mysql/compare/v1.4.7...v1.5.0)

---
updated-dependencies:
- dependency-name: gorm.io/driver/mysql
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-04-17 16:39:36 +00:00
Joe fd645e6c04 Merge pull request #1201 from BishopFox/ae25dependabot/go_modules/gorm.io/driver/sqlite-1.5.0
Bump gorm.io/driver/sqlite from 1.4.4 to 1.5.0
2023-04-17 11:37:57 -05:00
dependabot[bot] ef1c0341de Bump gorm.io/driver/sqlite from 1.4.4 to 1.5.0
Bumps [gorm.io/driver/sqlite](https://github.com/go-gorm/sqlite) from 1.4.4 to 1.5.0.
- [Release notes](https://github.com/go-gorm/sqlite/releases)
- [Commits](https://github.com/go-gorm/sqlite/compare/v1.4.4...v1.5.0)

---
updated-dependencies:
- dependency-name: gorm.io/driver/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-04-17 14:47:54 +00:00
Joe 1e6218f8fc Merge pull request #1200 from BishopFox/ff8fdependabot/go_modules/gorm.io/gorm-1.25.0
Bump gorm.io/gorm from 1.24.7-0.20230306060331-85eaf9eeda11 to 1.25.0
2023-04-17 09:46:15 -05:00
Joe c2abf668b6 Merge pull request #1199 from BishopFox/8a56dependabot/go_modules/golang.org/x/crypto-0.8.0
Bump golang.org/x/crypto from 0.7.0 to 0.8.0
2023-04-17 09:44:20 -05:00
dependabot[bot] 8c06b83821 Bump gorm.io/gorm from 1.24.7-0.20230306060331-85eaf9eeda11 to 1.25.0
Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.24.7-0.20230306060331-85eaf9eeda11 to 1.25.0.
- [Release notes](https://github.com/go-gorm/gorm/releases)
- [Commits](https://github.com/go-gorm/gorm/commits/v1.25.0)

---
updated-dependencies:
- dependency-name: gorm.io/gorm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-04-17 04:01:21 +00:00
dependabot[bot] 57ddb1a1bc Bump golang.org/x/crypto from 0.7.0 to 0.8.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.7.0 to 0.8.0.
- [Release notes](https://github.com/golang/crypto/releases)
- [Commits](https://github.com/golang/crypto/compare/v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-04-17 04:01:05 +00:00
moloch-- 90453067e7 Switch to build constraints for server-side wasm 2023-04-16 10:22:25 -07:00
moloch-- c18ee6b183 Switch to build constraints for implant wasm 2023-04-16 09:52:12 -07:00
moloch-- e50fa338cf Merge master 2023-04-13 10:43:40 -07:00
Joe 0a43dc688f Merge pull request #1187 from BishopFox/5ec6dependabot/go_modules/github.com/spf13/cobra-1.7.0
Bump github.com/spf13/cobra from 1.6.1 to 1.7.0
2023-04-13 12:16:23 -05:00
Joe 10d5f80f6b Merge pull request #1195 from BishopFox/9ad1dependabot/bundler/docs/nokogiri-1.14.3
Bump nokogiri from 1.14.1 to 1.14.3 in /docs
2023-04-13 12:16:05 -05:00
Joe 37efe1684b Merge pull request #1194 from BishopFox/983cdependabot/bundler/docs/commonmarker-0.23.9
Bump commonmarker from 0.23.8 to 0.23.9 in /docs
2023-04-13 12:15:44 -05:00
dependabot[bot] c2adb8187e Bump nokogiri from 1.14.1 to 1.14.3 in /docs
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.14.1 to 1.14.3.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.14.1...v1.14.3)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-04-12 06:24:49 +00:00
dependabot[bot] 7033be8408 Bump commonmarker from 0.23.8 to 0.23.9 in /docs
Bumps [commonmarker](https://github.com/gjtorikian/commonmarker) from 0.23.8 to 0.23.9.
- [Release notes](https://github.com/gjtorikian/commonmarker/releases)
- [Changelog](https://github.com/gjtorikian/commonmarker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gjtorikian/commonmarker/compare/v0.23.8...v0.23.9)

---
updated-dependencies:
- dependency-name: commonmarker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-04-12 05:34:01 +00:00
Joe 497a4cc698 Merge pull request #1188 from BishopFox/41a3dependabot/go_modules/golang.org/x/net-0.9.0
Bump golang.org/x/net from 0.8.0 to 0.9.0
2023-04-11 08:42:36 -05:00
Joe f792781d5d Merge pull request #1191 from BishopFox/beacon-always-show-hostname
Always show hostname when displaying the list of beacons
2023-04-11 08:42:16 -05:00
Joe 886c9884d0 Merge pull request #1193 from BishopFox/wg-zombies
Complete tearing down Wireguard listener before marking the job as complete
2023-04-11 08:41:53 -05:00
Raf f09efe9512 Fixing #1192. Waiting to close the job channel until all teardown tasks are done 2023-04-11 08:02:47 -04:00
Ronan Kervella ee6decb64b Merge pull request #1190 from BishopFox/issue1181
Different C2 for interactive session from a beacon
2023-04-10 08:57:16 -07:00
Raf 929e67e295 Always show hostname when displaying the list of beacons 2023-04-10 10:19:12 -04:00
dependabot[bot] 03183aefd3 Bump golang.org/x/net from 0.8.0 to 0.9.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-04-10 14:08:23 +00:00
Joe b7ba23c409 Merge pull request #1186 from BishopFox/031ddependabot/go_modules/golang.org/x/text-0.9.0
Bump golang.org/x/text from 0.8.0 to 0.9.0
2023-04-10 08:58:51 -05:00
dependabot[bot] 6c77808359 Bump golang.org/x/text from 0.8.0 to 0.9.0
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-04-10 04:31:31 +00:00
Joe 626d1ee5c9 Merge pull request #1184 from BishopFox/7c8ddependabot/go_modules/golang.org/x/sys-0.7.0
Bump golang.org/x/sys from 0.6.0 to 0.7.0
2023-04-09 23:29:53 -05:00
dependabot[bot] 689645d4f8 Bump github.com/spf13/cobra from 1.6.1 to 1.7.0
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.6.1 to 1.7.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.6.1...v1.7.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-04-10 04:02:53 +00:00
dependabot[bot] 7fa1b5c824 Bump golang.org/x/sys from 0.6.0 to 0.7.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/compare/v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-04-10 04:02:00 +00:00
moloch-- aa100a2750 Re-implement task/dump linux handlers 2023-04-09 11:22:11 -07:00
moloch-- 78abcfce0c Fix linux handlers 2023-04-09 11:05:33 -07:00
moloch-- 65d5961077 Use upstream pure go gorm driver 2023-04-09 10:30:23 -07:00
moloch-- 0ac08c6ba3 Implemented gorm/wasm-sqlite3 driver, but some types are unsupported 2023-04-09 10:23:56 -07:00
moloch-- 5320e32e5b Merge branch 'wasm/sqlite3' into v1.6.0/master 2023-04-09 09:54:44 -07:00
moloch-- d09c60089f Remove info logs, update unit tests 2023-04-09 08:59:07 -07:00
moloch-- 0e4145e118 merge wasm/sqlite3 2023-04-09 08:23:29 -07:00
moloch-- 605ca87bd1 merge wasm/sqlite3 2023-04-09 08:23:23 -07:00
moloch-- a97d7caf55 implemented wasm sqlite3, remove cgo from server builds 2023-04-09 08:14:04 -07:00
Joe 0aabd71d9d Merge pull request #1178 from BishopFox/1893dependabot/go_modules/modernc.org/sqlite-1.21.1
Bump modernc.org/sqlite from 1.21.0 to 1.21.1
2023-04-07 21:54:02 -05:00
Joe 5f4960bfb1 Merge pull request #1182 from BishopFox/kill_beacon_by_short_id
Adding support for killing a beacon using the short form of its ID
2023-04-07 13:11:03 -05:00
Raf 400c629dec Adding support for killing a beacon using the short form of its ID 2023-04-07 13:02:24 -04:00
Raf 85f51a8752 Initial support for changing C2 when spawning an interactive session from a beacon. Does not support changing transports. 2023-04-07 11:20:54 -04:00
Joe ec7e76fc2f Merge pull request #1180 from MrAle98/fix/external-builder-config
fix implant configuration for external builders
2023-04-05 12:44:22 -05:00
MrAle98 04e8104ad9 minor fix 2023-04-05 09:04:51 +02:00
MrAle98 d2aaee9882 fix implant configuration for external builders 2023-04-04 16:31:06 +02:00
Joe 54afc61d94 Merge pull request #1177 from BishopFox/8e5fdependabot/go_modules/github.com/miekg/dns-1.1.53
Bump github.com/miekg/dns from 1.1.52 to 1.1.53
2023-04-03 09:40:15 -05:00
dependabot[bot] 246519da59 Bump modernc.org/sqlite from 1.21.0 to 1.21.1
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.21.0 to 1.21.1.
- [Release notes](https://gitlab.com/cznic/sqlite/tags)
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.21.0...v1.21.1)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-04-03 04:14:29 +00:00
dependabot[bot] bd575684d7 Bump github.com/miekg/dns from 1.1.52 to 1.1.53
Bumps [github.com/miekg/dns](https://github.com/miekg/dns) from 1.1.52 to 1.1.53.
- [Release notes](https://github.com/miekg/dns/releases)
- [Changelog](https://github.com/miekg/dns/blob/master/Makefile.release)
- [Commits](https://github.com/miekg/dns/compare/v1.1.52...v1.1.53)

---
updated-dependencies:
- dependency-name: github.com/miekg/dns
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-04-03 04:14:29 +00:00
Ronan Kervella da4ee8ad51 Merge pull request #1175 from rwincey/file_log
Added file path for debug so it doesn't always goto stdout
2023-03-30 13:55:42 -07:00
b0yd e6645c91a3 Added file path for debug so it doesn't always goto stdout 2023-03-30 14:38:07 -04:00
moloch-- faf1ad6c1d Add margin for url in armory display 2023-03-29 15:37:28 -07:00
moloch-- e80825d0c4 merge master 2023-03-29 15:21:10 -07:00
Ronan Kervella 7d95856858 Merge pull request #1170 from rwincey/file-funcs
Added Chmod, Chown, Chtimes, and uid:gid to Ls
2023-03-29 13:08:36 -07:00
rwincey 2bfcaf14f3 Update handlers_linux.go 2023-03-29 14:46:31 -04:00
Ronan Kervella 6e0cbbcee3 Merge pull request #1172 from BishopFox/fix/profile-rebuild
Prevent rebuilding implants when they already exist
2023-03-29 11:45:21 -07:00
rkervella feacb9e74b Use implant filename instead of name 2023-03-29 10:41:49 -07:00
b0yd 963b3c36da Fixed import...again 2023-03-29 12:43:08 -04:00
b0yd d344e357af Fixed issues caused by adding goto 2023-03-29 10:52:30 -04:00
b0yd a45c99651d Made pretty, with goto 2023-03-28 19:35:56 -04:00
b0yd 0e5d055f37 Import ommisions 2023-03-28 18:31:42 -04:00
Ronan Kervella 88f5d55e92 Merge pull request #1169 from BishopFox/fix/1113
Warn user about improper flag usage.
2023-03-28 14:53:31 -07:00
b0yd 03d93b95ba Guess I'm supposed to check these in too :P 2023-03-28 17:04:48 -04:00
b0yd 8fd94879a4 Added chmod,chown,timestomp, and added uid:gid to ls 2023-03-28 16:43:14 -04:00
rkervella 19b4b0b0c8 Warn user about improper flag usage. 2023-03-28 13:09:35 -07:00
Joe 0e7a29db1b Merge pull request #1168 from BishopFox/5540dependabot/go_modules/google.golang.org/grpc-1.54.0
Bump google.golang.org/grpc from 1.53.0 to 1.54.0
2023-03-27 20:55:03 -07:00
dependabot[bot] 05a31d9d42 Bump google.golang.org/grpc from 1.53.0 to 1.54.0
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.53.0 to 1.54.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.53.0...v1.54.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-03-27 04:03:21 +00:00
Joe 796a0dbde1 Merge pull request #1162 from jpts/fix-private-armory-github-auth
Add armory support for private Github APIs
2023-03-26 13:22:40 -07:00
moloch-- accdf0c9e2 update comments 2023-03-26 15:17:37 -05:00
Joe 6aeab60d62 Merge pull request #1166 from 4lxs/master
C2 http uri lowercased
2023-03-26 07:57:18 -07:00
svl 99c76c2da0 C2 http uri lowercased. Fixes #1126 2023-03-26 07:00:56 -04:00
Ronan Kervella 749f71d226 Merge pull request #1164 from DominicBreuker/synchronize-beacon-extension-tasks
Further stabilization of extensions in beacon mode
2023-03-23 14:42:56 -07:00
Dominic Breuker 3d7227ea2f execute regular tasks and extenions concurrently 2023-03-23 21:44:05 +01:00
Dominic Breuker 329730120d cleanup and variable rename 2023-03-23 21:32:29 +01:00
Dominic Breuker c6a29ea76a ensure waitgroup in beaconmain can never become negative 2023-03-23 21:26:25 +01:00
jpts c40f59bc39 feat: add armory support for private Github apis 2023-03-22 19:06:51 +00:00
Dominic Breuker b0e0df1cb5 ensure beacon registers extensions before it calls them 2023-03-21 23:18:21 +01:00
Joe 2ece520fdc Merge pull request #1159 from DominicBreuker/fix-extension-call-race-condition
avoid race condition in the extension callback on windows beacons
2023-03-20 17:23:37 -07:00
moloch-- f8e2fde805 Remove log from debug builds 2023-03-20 18:17:27 -05:00
moloch-- 108c4cbf23 Add lic 2023-03-20 18:16:23 -05:00
moloch-- 804158f1ed Move memfs to its own file 2023-03-20 18:15:57 -05:00
moloch-- 7ab8fe8f77 Update wazero and vendor/ 2023-03-20 18:01:39 -05:00
moloch-- c35aeb13d4 merge master 2023-03-20 18:00:00 -05:00
Joe 01017460e8 Merge pull request #1157 from BishopFox/10a8dependabot/go_modules/github.com/cheggaaa/pb/v3-3.1.2
Bump github.com/cheggaaa/pb/v3 from 3.1.0 to 3.1.2
2023-03-20 15:32:09 -07:00
Dominic Breuker f1613bbad9 avoid race condition in the extension callback on windows beacons 2023-03-20 21:36:16 +01:00
Joe 657d21e2ea Merge pull request #1152 from BishopFox/b4bddependabot/go_modules/google.golang.org/protobuf-1.30.0
Bump google.golang.org/protobuf from 1.28.1 to 1.30.0
2023-03-20 11:52:53 -07:00
Joe 9f64ef1486 Merge pull request #1158 from BishopFox/fix/chromdp-cookies
Update `DumpCookies` method
2023-03-20 11:52:19 -07:00
rkervella 918d729dc5 Update DumpCookies method 2023-03-20 10:09:15 -07:00
dependabot[bot] c506020570 Bump github.com/cheggaaa/pb/v3 from 3.1.0 to 3.1.2
Bumps [github.com/cheggaaa/pb/v3](https://github.com/cheggaaa/pb) from 3.1.0 to 3.1.2.
- [Release notes](https://github.com/cheggaaa/pb/releases)
- [Commits](https://github.com/cheggaaa/pb/compare/v3.1.0...v3.1.2)

---
updated-dependencies:
- dependency-name: github.com/cheggaaa/pb/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-03-20 16:49:37 +00:00
dependabot[bot] 9d7d1b76fc Bump google.golang.org/protobuf from 1.28.1 to 1.30.0
Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.28.1 to 1.30.0.
- [Release notes](https://github.com/protocolbuffers/protobuf-go/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf-go/blob/master/release.bash)
- [Commits](https://github.com/protocolbuffers/protobuf-go/compare/v1.28.1...v1.30.0)

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-03-20 16:49:05 +00:00
Joe 3f5c434c26 Merge pull request #1153 from BishopFox/3d69dependabot/go_modules/github.com/chromedp/chromedp-0.9.1
Bump github.com/chromedp/chromedp from 0.8.8 to 0.9.1
2023-03-20 09:48:10 -07:00
Joe aa8e01e365 Merge pull request #1154 from BishopFox/9bd6dependabot/go_modules/gorm.io/driver/postgres-1.5.0
Bump gorm.io/driver/postgres from 1.4.8 to 1.5.0
2023-03-20 09:47:27 -07:00
Joe 8b84197d1a Merge pull request #1156 from BishopFox/07a1dependabot/github_actions/actions/setup-go-4
Bump actions/setup-go from 3 to 4
2023-03-20 09:46:33 -07:00
Joe cdd2a33aec Merge pull request #1155 from BishopFox/1374dependabot/go_modules/github.com/grpc-ecosystem/go-grpc-middleware-1.4.0
Bump github.com/grpc-ecosystem/go-grpc-middleware from 1.3.0 to 1.4.0
2023-03-20 09:46:15 -07:00
dependabot[bot] c6e65e6b69 Bump actions/setup-go from 3 to 4
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 4.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-03-20 04:02:39 +00:00
dependabot[bot] 8291364aad Bump github.com/grpc-ecosystem/go-grpc-middleware from 1.3.0 to 1.4.0
Bumps [github.com/grpc-ecosystem/go-grpc-middleware](https://github.com/grpc-ecosystem/go-grpc-middleware) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/grpc-ecosystem/go-grpc-middleware/releases)
- [Commits](https://github.com/grpc-ecosystem/go-grpc-middleware/compare/v1.3.0...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/grpc-ecosystem/go-grpc-middleware
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-03-20 04:02:34 +00:00
dependabot[bot] dff24ae31b Bump gorm.io/driver/postgres from 1.4.8 to 1.5.0
Bumps [gorm.io/driver/postgres](https://github.com/go-gorm/postgres) from 1.4.8 to 1.5.0.
- [Release notes](https://github.com/go-gorm/postgres/releases)
- [Commits](https://github.com/go-gorm/postgres/compare/v1.4.8...v1.5.0)

---
updated-dependencies:
- dependency-name: gorm.io/driver/postgres
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-03-20 04:02:30 +00:00
dependabot[bot] a3ea33bcdb Bump github.com/chromedp/chromedp from 0.8.8 to 0.9.1
Bumps [github.com/chromedp/chromedp](https://github.com/chromedp/chromedp) from 0.8.8 to 0.9.1.
- [Release notes](https://github.com/chromedp/chromedp/releases)
- [Commits](https://github.com/chromedp/chromedp/compare/v0.8.8...v0.9.1)

---
updated-dependencies:
- dependency-name: github.com/chromedp/chromedp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-03-20 04:01:46 +00:00
Joe dcb1fc3cf3 Merge pull request #1145 from BishopFox/a584dependabot/go_modules/github.com/fatih/color-1.15.0
Bump github.com/fatih/color from 1.14.1 to 1.15.0
2023-03-13 11:13:17 -07:00
moloch-- 131ad3c420 Merge master 2023-03-13 09:28:56 -05:00
Joe 3f721f2591 Merge pull request #1143 from BishopFox/a64fdependabot/go_modules/github.com/xlab/treeprint-1.2.0
Bump github.com/xlab/treeprint from 1.1.0 to 1.2.0
2023-03-13 07:15:23 -07:00
Joe 99914e4092 Merge pull request #1144 from BishopFox/fc29dependabot/go_modules/gorm.io/gorm-1.24.6
Bump gorm.io/gorm from 1.24.5 to 1.24.6
2023-03-13 06:41:53 -07:00
dependabot[bot] 4068fafdb9 Bump github.com/xlab/treeprint from 1.1.0 to 1.2.0
Bumps [github.com/xlab/treeprint](https://github.com/xlab/treeprint) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/xlab/treeprint/releases)
- [Commits](https://github.com/xlab/treeprint/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: github.com/xlab/treeprint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-03-13 13:24:08 +00:00
Joe ccc6066b79 Merge pull request #1142 from BishopFox/0a04dependabot/go_modules/github.com/miekg/dns-1.1.52
Bump github.com/miekg/dns from 1.1.51 to 1.1.52
2023-03-13 06:19:56 -07:00
Joe c53e617fec Merge pull request #1141 from BishopFox/d824dependabot/go_modules/golang.org/x/crypto-0.7.0
Bump golang.org/x/crypto from 0.6.0 to 0.7.0
2023-03-13 06:19:28 -07:00
dependabot[bot] 200a1a9942 Bump github.com/fatih/color from 1.14.1 to 1.15.0
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.14.1 to 1.15.0.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.14.1...v1.15.0)

---
updated-dependencies:
- dependency-name: github.com/fatih/color
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-03-13 04:02:02 +00:00
dependabot[bot] 564aeec91f Bump gorm.io/gorm from 1.24.5 to 1.24.6
Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.24.5 to 1.24.6.
- [Release notes](https://github.com/go-gorm/gorm/releases)
- [Commits](https://github.com/go-gorm/gorm/compare/v1.24.5...v1.24.6)

---
updated-dependencies:
- dependency-name: gorm.io/gorm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-03-13 04:02:01 +00:00
dependabot[bot] 115f47a7b4 Bump github.com/miekg/dns from 1.1.51 to 1.1.52
Bumps [github.com/miekg/dns](https://github.com/miekg/dns) from 1.1.51 to 1.1.52.
- [Release notes](https://github.com/miekg/dns/releases)
- [Changelog](https://github.com/miekg/dns/blob/master/Makefile.release)
- [Commits](https://github.com/miekg/dns/compare/v1.1.51...v1.1.52)

---
updated-dependencies:
- dependency-name: github.com/miekg/dns
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-03-13 04:01:43 +00:00
dependabot[bot] bde3cd6e87 Bump golang.org/x/crypto from 0.6.0 to 0.7.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/golang/crypto/releases)
- [Commits](https://github.com/golang/crypto/compare/v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-03-13 04:01:10 +00:00
moloch-- 6667780164 Length check on windows host uuid 2023-03-12 16:39:27 -05:00
moloch-- 9cfd51d44f Merge branch 'master' into v1.6.0/master 2023-03-09 18:13:18 -06:00
moloch-- e6d9740410 Go v1.20.2 2023-03-09 18:12:57 -06:00
Joe 6240be3a4b Merge pull request #1137 from BishopFox/go/v1.20.2
Go v1.20.2
2023-03-09 11:30:09 -07:00
moloch-- 3a8017e7dd Go v1.20.2 2023-03-08 16:03:11 -07:00
moloch-- 364a0919f5 Merge master 2023-03-08 15:53:12 -07:00
Joe 1f76a3f4f3 Merge pull request #1136 from DominicBreuker/master
Unblock execute command if no output is requested
2023-03-07 22:09:13 -06:00
Dominic Breuker 5ab52bca05 unblock execute command if no output is requested 2023-03-07 22:09:24 +01:00
Joe dfcbdf7e07 Merge pull request #1132 from BishopFox/d866dependabot/go_modules/github.com/chromedp/chromedp-0.8.8
Bump github.com/chromedp/chromedp from 0.8.7 to 0.8.8
2023-03-06 12:07:04 -06:00
Joe 2dc1b69c92 Merge pull request #1134 from BishopFox/c58ddependabot/go_modules/github.com/jedib0t/go-pretty/v6-6.4.6
Bump github.com/jedib0t/go-pretty/v6 from 6.4.4 to 6.4.6
2023-03-06 12:06:37 -06:00
Joe 69058fe492 Merge pull request #1131 from BishopFox/1eaedependabot/go_modules/golang.org/x/net-0.8.0
Bump golang.org/x/net from 0.7.0 to 0.8.0
2023-03-06 10:58:37 -06:00
dependabot[bot] 9f811f8da0 Bump golang.org/x/net from 0.7.0 to 0.8.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.7.0 to 0.8.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/compare/v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-03-06 16:17:41 +00:00
dependabot[bot] 9585b430a5 Bump github.com/chromedp/chromedp from 0.8.7 to 0.8.8
Bumps [github.com/chromedp/chromedp](https://github.com/chromedp/chromedp) from 0.8.7 to 0.8.8.
- [Release notes](https://github.com/chromedp/chromedp/releases)
- [Commits](https://github.com/chromedp/chromedp/compare/v0.8.7...v0.8.8)

---
updated-dependencies:
- dependency-name: github.com/chromedp/chromedp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-03-06 16:17:35 +00:00
Joe efaffb1999 Merge pull request #1135 from BishopFox/37cddependabot/go_modules/golang.org/x/term-0.6.0
Bump golang.org/x/term from 0.5.0 to 0.6.0
2023-03-06 10:02:59 -06:00
dependabot[bot] 2f1f81cc0f Bump golang.org/x/term from 0.5.0 to 0.6.0
Bumps [golang.org/x/term](https://github.com/golang/term) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/golang/term/releases)
- [Commits](https://github.com/golang/term/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-03-06 04:07:11 +00:00
dependabot[bot] 94d8b9fc8a Bump github.com/jedib0t/go-pretty/v6 from 6.4.4 to 6.4.6
Bumps [github.com/jedib0t/go-pretty/v6](https://github.com/jedib0t/go-pretty) from 6.4.4 to 6.4.6.
- [Release notes](https://github.com/jedib0t/go-pretty/releases)
- [Commits](https://github.com/jedib0t/go-pretty/compare/v6.4.4...v6.4.6)

---
updated-dependencies:
- dependency-name: github.com/jedib0t/go-pretty/v6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-03-06 04:06:41 +00:00
moloch-- 4764e249c3 Merge branch 'master' into v1.6.0/master 2023-03-05 13:33:53 -07:00
Joe 1756fdfb62 Merge pull request #1130 from r00t0v3rr1d3/master
fix defunct processes on nix
2023-03-05 11:41:33 -06:00
Chris Shields 12e6f9a73d fix defunct processes on nix 2023-03-05 11:02:30 -05:00
Ronan Kervella b0a917ce41 Merge pull request #1128 from BishopFox/fix/ssh-kerberos
Fix `ssh` command
2023-03-03 13:10:24 -08:00
rkervella e3a2ff81ab Only try to read keytab if it was supplied as an argument 2023-03-03 11:53:56 -08:00
Ronan Kervella 71f94928bf Merge pull request #1122 from BishopFox/stage
Update go-clr, merge master
2023-02-28 20:10:02 -08:00
rkervella 93a0c15906 Update go-clr, merge master 2023-02-28 16:48:14 -08:00
moloch-- fb8b97f79c Merge wasm exts 2023-02-28 16:10:09 -07:00
moloch-- a7a50d1205 Go mod tidy/vendor 2023-02-28 15:53:01 -07:00
moloch-- afd711f28a Go mod tidy/vendor 2023-02-28 15:52:25 -07:00
moloch-- 613b11eb0d Style fixes 2023-02-28 15:50:04 -07:00
Joe 83c153d189 Merge pull request #1115 from BishopFox/a23fdependabot/go_modules/github.com/things-go/go-socks5-0.0.3
Bump github.com/things-go/go-socks5 from 0.0.3-0.20210722055343-24af464efe43 to 0.0.3
2023-02-27 16:40:37 -06:00
dependabot[bot] 524d58454c Bump github.com/things-go/go-socks5
Bumps [github.com/things-go/go-socks5](https://github.com/things-go/go-socks5) from 0.0.3-0.20210722055343-24af464efe43 to 0.0.3.
- [Release notes](https://github.com/things-go/go-socks5/releases)
- [Commits](https://github.com/things-go/go-socks5/commits/v0.0.3)

---
updated-dependencies:
- dependency-name: github.com/things-go/go-socks5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-02-27 19:35:04 +00:00
Joe 0530018ea4 Merge pull request #1117 from BishopFox/83bddependabot/go_modules/google.golang.org/grpc-1.53.0
Bump google.golang.org/grpc from 1.42.0-dev.0.20211020220737-f00baa6c3c84 to 1.53.0
2023-02-27 13:33:25 -06:00
dependabot[bot] 617a39227c Bump google.golang.org/grpc
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.42.0-dev.0.20211020220737-f00baa6c3c84 to 1.53.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/commits/v1.53.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-02-27 15:32:21 +00:00
Joe 81f701ca21 Merge pull request #1119 from BishopFox/feafdependabot/go_modules/modernc.org/sqlite-1.21.0
Bump modernc.org/sqlite from 1.20.4 to 1.21.0
2023-02-27 09:22:15 -06:00
Joe 163b1cbcad Merge pull request #1116 from BishopFox/cc09dependabot/go_modules/github.com/miekg/dns-1.1.51
Bump github.com/miekg/dns from 1.1.50 to 1.1.51
2023-02-27 09:18:42 -06:00
dependabot[bot] 38206c0cb7 Bump modernc.org/sqlite from 1.20.4 to 1.21.0
---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-02-27 04:21:31 +00:00
dependabot[bot] 5d3247d658 Bump github.com/miekg/dns from 1.1.50 to 1.1.51
Bumps [github.com/miekg/dns](https://github.com/miekg/dns) from 1.1.50 to 1.1.51.
- [Release notes](https://github.com/miekg/dns/releases)
- [Changelog](https://github.com/miekg/dns/blob/master/Makefile.release)
- [Commits](https://github.com/miekg/dns/compare/v1.1.50...v1.1.51)

---
updated-dependencies:
- dependency-name: github.com/miekg/dns
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-02-27 04:15:12 +00:00
moloch-- 6b91f106ab basic memfs working 2023-02-25 16:09:52 -08:00
moloch-- c0646d57a2 Align path mgmt to FS 2023-02-25 15:42:18 -08:00
moloch-- ae38e410cf Fix node .Name() to return full virtual path 2023-02-25 15:16:08 -08:00
moloch-- 0bac39bdcf Fixes to handling of memfs root path 2023-02-25 13:40:20 -08:00
moloch-- 32f0a4e2c4 memfs passes initial unit tests 2023-02-25 13:24:57 -08:00
moloch-- 3de75aaada Re-write memfs with single tree struct 2023-02-25 13:10:41 -08:00
moloch-- 7417f24fa5 Add build constraints for wasm ext 2023-02-25 11:15:05 -08:00
moloch-- 4f6a905355 Fixes to memfs readdir 2023-02-25 09:47:20 -08:00
Joe ba699679c9 Update README.md
Signed-off-by: Joe <[email protected]>
2023-02-25 11:37:09 -06:00
moloch-- 1ebb1f8df5 Fix memfs internal buf handling 2023-02-24 10:49:40 -08:00
moloch-- 8971f4264b Fix additional path handling in memfs 2023-02-23 21:41:11 -08:00
moloch-- dad4e3f627 Fixes to memfs 2023-02-23 18:29:30 -08:00
moloch-- e149795df6 Outline wasm memfs 2023-02-23 16:01:50 -08:00
Joe d1ef51ed49 Merge pull request #1112 from BishopFox/fix/linux-hostuuid
Return zero guid on hostuuid from mac error
2023-02-23 14:30:10 -06:00
moloch-- 03ba0ea9e7 Return zero guid on hostuuid from mac error 2023-02-23 11:37:29 -08:00
moloch-- 7e6c9a0c66 Most unit tests pass.. 2023-02-21 22:25:11 -08:00
moloch-- f9634342e2 Fix traffic encoder import 2023-02-21 20:52:03 -08:00
moloch-- 88d47526ed Switched to --stream flag 2023-02-21 20:47:03 -08:00
moloch-- c221631518 Interactive exec technically working 2023-02-21 20:30:30 -08:00
moloch-- 0cfe4a0d2a Update wazero dep 2023-02-21 16:53:14 -08:00
moloch-- 67a6249465 Implemented non-interactive wasm exec 2023-02-21 11:03:28 -08:00
moloch-- f388f7648a Only render source code files during implant generation 2023-02-21 09:57:49 -08:00
moloch-- 3c4e61253f Wired in wasm exec 2023-02-20 18:04:35 -08:00
moloch-- 89e5a18365 Implemented wasm ext registration 2023-02-20 17:05:55 -08:00
moloch-- be1f71f56e Update build.py to py3 only 2023-02-20 15:40:55 -08:00
moloch-- ac34fae842 Merge branch 'v1.6.0/master' into v1.6.0/wasm 2023-02-20 11:37:44 -08:00
moloch-- 2100d7e1a9 Merge master 2023-02-20 11:37:28 -08:00
Ronan Kervella 42a4e93aae Merge pull request #1111 from BishopFox/go/v1.20.1
Go v1.20.1
2023-02-20 11:36:38 -08:00
Joe 81ec6398b8 Merge pull request #1109 from BishopFox/c350dependabot/go_modules/gorm.io/driver/mysql-1.4.7
Bump gorm.io/driver/mysql from 1.4.6 to 1.4.7
2023-02-20 11:55:29 -06:00
moloch-- 5da01d9278 Garble v1.20.2 2023-02-20 09:35:28 -08:00
dependabot[bot] bc9bba5d39 Bump gorm.io/driver/mysql from 1.4.6 to 1.4.7
Bumps [gorm.io/driver/mysql](https://github.com/go-gorm/mysql) from 1.4.6 to 1.4.7.
- [Release notes](https://github.com/go-gorm/mysql/releases)
- [Commits](https://github.com/go-gorm/mysql/compare/v1.4.6...v1.4.7)

---
updated-dependencies:
- dependency-name: gorm.io/driver/mysql
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-02-20 17:07:25 +00:00
moloch-- 89f029f55b Go v1.20.1 2023-02-20 09:05:05 -08:00
moloch-- 01edbd2fc5 Merge master, update vendor/ 2023-02-20 09:03:47 -08:00
moloch-- 303a6109fc Basic outline of wasm rpcs 2023-02-20 09:02:23 -08:00
Joe 64a31ee3b0 Merge pull request #1108 from BishopFox/a012dependabot/go_modules/gorm.io/driver/postgres-1.4.8
Bump gorm.io/driver/postgres from 1.4.6 to 1.4.8
2023-02-20 11:01:41 -06:00
Joe 9c44890db7 Merge pull request #1110 from BishopFox/44b0dependabot/go_modules/modernc.org/sqlite-1.20.4
Bump modernc.org/sqlite from 1.19.3 to 1.20.4
2023-02-20 10:17:54 -06:00
dependabot[bot] 50103d7ae9 Bump gorm.io/driver/postgres from 1.4.6 to 1.4.8
Bumps [gorm.io/driver/postgres](https://github.com/go-gorm/postgres) from 1.4.6 to 1.4.8.
- [Release notes](https://github.com/go-gorm/postgres/releases)
- [Commits](https://github.com/go-gorm/postgres/compare/v1.4.6...v1.4.8)

---
updated-dependencies:
- dependency-name: gorm.io/driver/postgres
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-02-20 16:17:12 +00:00
Joe 448c9a8c35 Merge pull request #1106 from BishopFox/b450dependabot/go_modules/golang.org/x/net-0.7.0
Bump golang.org/x/net from 0.6.0 to 0.7.0
2023-02-20 10:15:31 -06:00
dependabot[bot] 52e296fed4 Bump golang.org/x/net from 0.6.0 to 0.7.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/compare/v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-02-20 15:24:17 +00:00
Joe 975d37f169 Merge pull request #1107 from BishopFox/c00bdependabot/go_modules/golang.org/x/crypto-0.6.0
Bump golang.org/x/crypto from 0.5.0 to 0.6.0
2023-02-20 09:22:51 -06:00
dependabot[bot] 94a4be6254 Bump modernc.org/sqlite from 1.19.3 to 1.20.4
---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-02-20 06:10:53 +00:00
dependabot[bot] 988282cd40 Bump golang.org/x/crypto from 0.5.0 to 0.6.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/golang/crypto/releases)
- [Commits](https://github.com/golang/crypto/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-02-20 04:06:59 +00:00
moloch-- 9358ed969e Outline wasm call conventions 2023-02-18 10:01:22 -08:00
moloch-- b30e97e412 Re-organize some of implant handlers 2023-02-17 16:33:13 -08:00
moloch-- 977cdd540f Simplify NewWasmExtension api 2023-02-17 12:41:22 -08:00
moloch-- 96c3f0bc9e Remove unused code 2023-02-17 12:19:25 -08:00
moloch-- bdd5e9fe5a Fix unit tests/insert 2023-02-17 12:17:45 -08:00
moloch-- d2a347fd9c Implemented more memfs unit tests 2023-02-17 12:04:06 -08:00
moloch-- 822472cde4 Outline unit tests 2023-02-16 21:53:52 -08:00
moloch-- 58f6b41e50 Switch to pass thru root and /memfs/ 2023-02-16 21:03:00 -08:00
moloch-- 6bdbcf3bbe Initial draft of wasm extensions 2023-02-16 18:22:21 -08:00
Joe dc687055a4 Merge pull request #1103 from BishopFox/fix/1102
Fix missing flag in context for PsCmd
2023-02-16 16:24:21 -06:00
rkervella 1ddeeb8554 Fix missing flag in context for PsCmd 2023-02-16 13:34:15 -08:00
moloch-- 3c23a068d4 Add time() to tfe imports 2023-02-15 18:09:02 -08:00
moloch-- e52ef10fec Remove tinygo tfe example 2023-02-15 12:13:05 -08:00
moloch-- a90689b19c Add flag to skip tests 2023-02-15 12:09:57 -08:00
moloch-- 5bbb36531e Add time limits to tfe tests 2023-02-15 12:03:14 -08:00
moloch-- 9d1a37b339 Add locks to server-side tfe 2023-02-14 15:52:17 -08:00
moloch-- 31575890b4 Move backdoor proto to clientpb 2023-02-14 15:50:31 -08:00
moloch-- 790eb8f947 Mvp of traffic encoders working 2023-02-14 15:21:03 -08:00
moloch-- bacbaaf6a1 Added traffic encoder generate flags 2023-02-14 12:17:38 -08:00
moloch-- 2ddfab8d55 Added completers for tfe args 2023-02-14 11:07:13 -08:00
moloch-- 8d2c3b3fef Improved tfe param validation 2023-02-14 10:55:37 -08:00
moloch-- 13726ac4bf Implemented rm traffic encoder 2023-02-14 08:26:04 -08:00
moloch-- df77a90547 Better error handling for traffic encoder tests 2023-02-13 22:15:58 -08:00
moloch-- 78ae84d0ae Implemented traffic encoder test suite 2023-02-13 17:34:34 -08:00
moloch-- f745b33eaf Started implementing grpcCtx timeouts 2023-02-13 11:09:52 -08:00
moloch-- 973c294cd9 Update pure go sqlite3 2023-02-13 10:52:42 -08:00
moloch-- caf1dfb071 Merge branch 'master' into v1.6.0/master 2023-02-13 09:45:24 -08:00
Joe 8369b03112 Merge pull request #1101 from BishopFox/6751dependabot/go_modules/gorm.io/driver/mysql-1.4.6
Bump gorm.io/driver/mysql from 1.4.5 to 1.4.6
2023-02-13 11:16:23 -06:00
Joe e44bb1a4f1 Merge pull request #1097 from BishopFox/436edependabot/go_modules/golang.org/x/net-0.6.0
Bump golang.org/x/net from 0.5.0 to 0.6.0
2023-02-13 11:15:48 -06:00
moloch-- d05a6cb43f skip overwriting .wasm without --force 2023-02-13 09:12:24 -08:00
dependabot[bot] bca8c13f20 Bump gorm.io/driver/mysql from 1.4.5 to 1.4.6
Bumps [gorm.io/driver/mysql](https://github.com/go-gorm/mysql) from 1.4.5 to 1.4.6.
- [Release notes](https://github.com/go-gorm/mysql/releases)
- [Commits](https://github.com/go-gorm/mysql/compare/v1.4.5...v1.4.6)

---
updated-dependencies:
- dependency-name: gorm.io/driver/mysql
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-02-13 06:16:01 +00:00
dependabot[bot] a8a5368060 Bump golang.org/x/net from 0.5.0 to 0.6.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-02-13 04:08:02 +00:00
moloch-- 1499661950 Fix default traffic encoder unpack 2023-02-12 20:03:49 -08:00
moloch-- 763cad5823 Outline add traffic encoder cmd 2023-02-12 19:03:22 -08:00
moloch-- 9116fe89fb Update garble 2023-02-12 14:39:32 -08:00
moloch-- cfaa892ae5 Attempt to implement docs/notion 2023-02-12 12:38:11 -08:00
moloch-- 14b67b621f Make url args configurable, move default headers into http config 2023-02-12 10:52:08 -08:00
moloch-- e36f2c252e Merge branch 'master' into v1.6.0/master 2023-02-10 19:27:49 -08:00
Joe cf4a8da802 Merge pull request #1094 from BishopFox/fix/go-assets-linux-arm64
Update go-assets.sh
2023-02-07 18:39:46 -06:00
Ronan Kervella b0b4751267 Update go-assets.sh
Update go-assets.sh to actually download the right version of garble for Linux arm64.

Signed-off-by: Ronan Kervella <[email protected]>
2023-02-07 16:06:10 -08:00
moloch-- b6c9a12667 Merge branch 'master' into v1.6.0/master 2023-02-07 08:46:40 -08:00
moloch-- d2a6fa8cd6 Go v1.20 2023-02-07 08:26:21 -08:00
Joe ad7310dc68 Merge pull request #1093 from BishopFox/481ddependabot/go_modules/gorm.io/gorm-1.24.5
Bump gorm.io/gorm from 1.24.3 to 1.24.5
2023-02-07 10:24:08 -06:00
dependabot[bot] e914850a13 Bump gorm.io/gorm from 1.24.3 to 1.24.5
Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.24.3 to 1.24.5.
- [Release notes](https://github.com/go-gorm/gorm/releases)
- [Commits](https://github.com/go-gorm/gorm/compare/v1.24.3...v1.24.5)

---
updated-dependencies:
- dependency-name: gorm.io/gorm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-02-06 03:12:35 +00:00
Ronan Kervella 56e368ccb0 Merge pull request #1092 from BishopFox/fix/protoc-ver
Fix protoc version
2023-02-03 08:28:50 -08:00
moloch-- 8ea559c205 Fast encoders 2023-02-01 19:48:37 -08:00
moloch-- f4e8ec58c3 Fix overly broad client/server import 2023-02-01 19:46:52 -08:00
moloch-- b1ce68710b Additional encoder compatibility unit tests 2023-02-01 19:09:51 -08:00
moloch-- c0427b4095 Improvements to PNG encoder 2023-02-01 17:47:52 -08:00
moloch-- 201548c959 Tweaks to Makefile 2023-02-01 16:34:55 -08:00
moloch-- 9fedb4aa2d Updated Makefile 2023-02-01 16:02:07 -08:00
moloch-- d77fea4618 Add client build for windows/arm64 2023-02-01 15:56:43 -08:00
moloch-- 2be6a314ab Improvements to Makefile 2023-02-01 15:55:01 -08:00
moloch-- 5270169921 Merge branch 'fix/protoc-ver' into v1.6.0/master 2023-02-01 15:00:14 -08:00
moloch-- 4e43f2d0d3 Fix protoc version 2023-02-01 14:39:42 -08:00
moloch-- 4249142857 Merge branch 'master' into v1.6.0/master 2023-02-01 14:22:41 -08:00
Joe cb3fc2923f Merge pull request #1091 from BishopFox/go/v1.20
Go/v1.20
2023-02-01 16:19:02 -06:00
moloch-- 204519b18f Update garble and pb versions 2023-02-01 13:44:26 -08:00
moloch-- e6a974495a Go v1.20 2023-02-01 13:29:40 -08:00
moloch-- 49b658a050 Update pure go sqlite3 2023-02-01 09:43:53 -08:00
moloch-- 93632466f9 Merge branch 'master' into v1.6.0/master 2023-02-01 09:14:34 -08:00
Joe 4c172b7d8f Merge pull request #1090 from mwgielen/output-printing
Add printing of two types of output
2023-02-01 11:12:12 -06:00
Joe 6f76dfa674 Merge pull request #1089 from mamil/fix-leak
fix goroutine leak
2023-02-01 11:11:12 -06:00
Matthijs Gielen e47516c988 Add printing of two messages
Added printing of MsgCallExtensionReq and MsgInvokeExecuteAssemblyReq

Signed-off-by: Matthijs Gielen <[email protected]>
2023-02-01 13:49:49 +01:00
raymonder jin 1a2388aadc fix goroutine leak 2023-02-01 17:58:04 +08:00
Joe d8668e7d4e Merge pull request #1085 from BishopFox/3aaadependabot/go_modules/github.com/gofrs/uuid-4.4.0incompatible
Bump github.com/gofrs/uuid from 4.3.1+incompatible to 4.4.0+incompatible
2023-01-31 19:57:21 -06:00
dependabot[bot] f21669bb45 Bump github.com/gofrs/uuid from 4.3.1+incompatible to 4.4.0+incompatible
Bumps [github.com/gofrs/uuid](https://github.com/gofrs/uuid) from 4.3.1+incompatible to 4.4.0+incompatible.
- [Release notes](https://github.com/gofrs/uuid/releases)
- [Commits](https://github.com/gofrs/uuid/compare/v4.3.1...v4.4.0)

---
updated-dependencies:
- dependency-name: github.com/gofrs/uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-31 16:18:05 +00:00
Ronan Kervella 8175819f52 Merge pull request #1084 from BishopFox/2a14dependabot/go_modules/github.com/fatih/color-1.14.1
Bump github.com/fatih/color from 1.14.0 to 1.14.1
2023-01-31 08:14:31 -08:00
Ronan Kervella d0cfd655ca Merge pull request #1087 from BishopFox/4725dependabot/bundler/docs/activesupport-6.0.6.1
Bump activesupport from 6.0.4.6 to 6.0.6.1 in /docs
2023-01-31 08:12:53 -08:00
dependabot[bot] cc7d5f8a82 Bump activesupport from 6.0.4.6 to 6.0.6.1 in /docs
Bumps [activesupport](https://github.com/rails/rails) from 6.0.4.6 to 6.0.6.1.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.0.4.2/activesupport/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v6.0.4.6...v6.0.6.1)

---
updated-dependencies:
- dependency-name: activesupport
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-31 03:54:02 +00:00
dependabot[bot] 6efd53950b Bump github.com/fatih/color from 1.14.0 to 1.14.1
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.14.0 to 1.14.1.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.14.0...v1.14.1)

---
updated-dependencies:
- dependency-name: github.com/fatih/color
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-30 03:12:42 +00:00
moloch-- a12526368d Add netgo flags, update default -ldflags 2023-01-29 08:46:54 -08:00
moloch-- 51dfc7d50e Fix logf calls 2023-01-27 09:50:21 -07:00
moloch-- 9fe6530be5 Fix gorm foriegn keys 2023-01-26 20:35:42 -07:00
moloch-- 8f8b714ee0 Implement initial integration of traffic encoders into generate pkg 2023-01-26 17:37:33 -07:00
moloch-- 6d2030ef43 Fix server-side traffic encoder initialization 2023-01-26 15:06:36 -07:00
moloch-- 7654a288bf Fix import in implant traffic encoder 2023-01-26 14:39:48 -07:00
moloch-- b2c54a5271 Update dnsclient to use newer encoder api 2023-01-26 10:06:20 -07:00
moloch-- f6a0d26f86 Updated compatibility unit tests 2023-01-26 09:05:22 -07:00
moloch-- cef744a8c4 Update implant vendor/ 2023-01-26 08:46:18 -07:00
moloch-- 006170f7fd Fix unit tests 2023-01-25 21:09:11 -07:00
moloch-- 64996a5377 Added Assets to implant config 2023-01-25 17:34:16 -07:00
moloch-- c7c99d38e0 Increased encoder modulo 2023-01-25 16:20:56 -07:00
moloch-- edbc3bbca3 Changed encoder nonce to uint64 2023-01-25 15:58:08 -07:00
moloch-- 7a76575004 Added compressed english dictionary 2023-01-25 14:54:14 -07:00
Joe 041ae65c61 Merge pull request #1078 from realalexandergeorgiev/realalexandergeorgiev-patch-1
Added Defender for Endpoint processes
2023-01-25 11:30:13 -06:00
Joe 286c9dc3f2 Merge pull request #1080 from BishopFox/f334dependabot/bundler/docs/commonmarker-0.23.7
Bump commonmarker from 0.23.6 to 0.23.7 in /docs
2023-01-25 11:29:57 -06:00
moloch-- ba1224833b Fix traffic encoder unit test imports 2023-01-25 10:24:03 -07:00
dependabot[bot] 6b3d95a0b4 Bump commonmarker from 0.23.6 to 0.23.7 in /docs
Bumps [commonmarker](https://github.com/gjtorikian/commonmarker) from 0.23.6 to 0.23.7.
- [Release notes](https://github.com/gjtorikian/commonmarker/releases)
- [Changelog](https://github.com/gjtorikian/commonmarker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gjtorikian/commonmarker/compare/v0.23.6...v0.23.7)

---
updated-dependencies:
- dependency-name: commonmarker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-25 04:30:26 +00:00
moloch-- b8acd390d3 Implemented implant encoder assets 2023-01-24 14:31:13 -07:00
moloch-- 9904ef0f9c Additional reorganization of encoders/implant pipeline 2023-01-24 11:53:28 -07:00
moloch-- e9ba047c5e Reorganize encoder init for server/implant 2023-01-24 10:41:21 -07:00
Alexander Georgiev 9f73e636b4 Added Defender for Endpoint processes
Added Defender for Endpoint processes based on https://medium.com/csis-techblog/silencing-microsoft-defender-for-endpoint-using-firewall-rules-3839a8bf8d18

Signed-off-by: Alexander Georgiev <[email protected]>
2023-01-24 14:16:44 +01:00
moloch-- d4e4e88507 Unified encoder pkgs 2023-01-23 13:27:40 -07:00
moloch-- 6d4f596cb0 Merge branch 'master' into v1.6.0/master 2023-01-23 08:32:41 -07:00
Joe 4a8cc9386f Merge pull request #1077 from BishopFox/dd5ddependabot/go_modules/github.com/fatih/color-1.14.0
Bump github.com/fatih/color from 1.13.0 to 1.14.0
2023-01-23 08:57:10 -06:00
dependabot[bot] 25f7ac019f Bump github.com/fatih/color from 1.13.0 to 1.14.0
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.13.0 to 1.14.0.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.13.0...v1.14.0)

---
updated-dependencies:
- dependency-name: github.com/fatih/color
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-23 03:44:40 +00:00
moloch-- 2384e9a385 Remove loud logs 2023-01-20 17:55:32 -08:00
moloch-- fd01c17300 Improved unit tests 2023-01-20 17:10:52 -08:00
moloch-- d76ff1d44d Remove wasi 2023-01-20 16:53:52 -08:00
moloch-- 8c573f951c Merge branch 'master' into v1.6.0/master 2023-01-20 16:06:06 -08:00
Joe 19c2533d90 Merge pull request #1076 from BishopFox/go/v1.19.5
Go v1.19.5
2023-01-20 12:19:00 -08:00
moloch-- fa94d98d68 Update go mod/vendor 2023-01-20 11:25:17 -08:00
moloch-- 1469482631 Ensure HOME is set, remove large literal ENV 2023-01-20 11:24:14 -08:00
moloch-- 7eb77b07fa Go v1.19.5 2023-01-20 08:56:01 -08:00
moloch-- c850fb6e8f fix loot unit test 2023-01-20 08:04:43 -08:00
moloch-- 499841fef0 Fix encoders unit tests 2023-01-19 18:20:56 -08:00
moloch-- 2f1cee7a69 Added traffic encoder to implant code base 2023-01-19 17:54:10 -08:00
moloch-- d1e5a18a33 Merge branch 'master' into v1.6.0/master 2023-01-19 13:44:02 -08:00
moloch-- 0c59ac442d Merge master 2023-01-19 13:39:56 -08:00
moloch-- 742efb70c6 Switch back to wee_alloc 2023-01-19 13:35:52 -08:00
moloch-- 8e507dc96b Remove forced errors from unit tests 2023-01-18 14:55:36 -08:00
moloch-- b9598545af re-implemented malloc/free 2023-01-18 14:41:30 -08:00
moloch-- a1b018f1c1 Added more debug statements 2023-01-18 14:16:07 -08:00
moloch-- 5215b24b8d Replace wee_alloc with lol_alloc 2023-01-18 12:39:16 -08:00
moloch-- 6b86f7d0f9 Rust hex encoder works with small inputs 2023-01-18 12:19:42 -08:00
moloch-- 04c5f1d4e6 Rust/wasm OOM's with large inputs ... 2023-01-18 12:14:50 -08:00
moloch-- 8a1a268450 Implemented hex encode/decode in rust 2023-01-17 15:22:55 -08:00
moloch-- 7a88f3fbda Rust example code compiles 2023-01-17 14:53:20 -08:00
moloch-- b2484ab31e Rust example code compiles 2023-01-17 14:53:08 -08:00
moloch-- b46643dcf6 add -opt=2 2023-01-17 11:06:43 -08:00
moloch-- 94ffad3569 Converted to CompiledModule 2023-01-16 17:40:28 -08:00
Ronan Kervella 5184aa8761 Merge pull request #1073 from BishopFox/update/chromedp-v0.8.7
Update/chromedp v0.8.7
2023-01-16 12:21:25 -08:00
moloch-- 92df0e4a20 Style fixes 2023-01-16 11:33:57 -08:00
moloch-- e905032169 Update vendor/ 2023-01-16 10:28:24 -08:00
moloch-- 973b5bb8aa Fix GetCookies API call 2023-01-16 10:28:12 -08:00
Joe f4b4610e28 Merge pull request #1071 from BishopFox/c304dependabot/go_modules/github.com/jedib0t/go-pretty/v6-6.4.4
Bump github.com/jedib0t/go-pretty/v6 from 6.4.3 to 6.4.4
2023-01-16 09:51:02 -08:00
Joe 9c0a97fc3a Merge pull request #1070 from BishopFox/4041dependabot/go_modules/gorm.io/driver/mysql-1.4.5
Bump gorm.io/driver/mysql from 1.4.4 to 1.4.5
2023-01-16 09:49:24 -08:00
dependabot[bot] 571a601b00 Bump github.com/jedib0t/go-pretty/v6 from 6.4.3 to 6.4.4
Bumps [github.com/jedib0t/go-pretty/v6](https://github.com/jedib0t/go-pretty) from 6.4.3 to 6.4.4.
- [Release notes](https://github.com/jedib0t/go-pretty/releases)
- [Commits](https://github.com/jedib0t/go-pretty/compare/v6.4.3...v6.4.4)

---
updated-dependencies:
- dependency-name: github.com/jedib0t/go-pretty/v6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-16 03:12:21 +00:00
dependabot[bot] 422d4914b8 Bump gorm.io/driver/mysql from 1.4.4 to 1.4.5
Bumps [gorm.io/driver/mysql](https://github.com/go-gorm/mysql) from 1.4.4 to 1.4.5.
- [Release notes](https://github.com/go-gorm/mysql/releases)
- [Commits](https://github.com/go-gorm/mysql/compare/v1.4.4...v1.4.5)

---
updated-dependencies:
- dependency-name: gorm.io/driver/mysql
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-16 03:12:00 +00:00
Ronan Kervella a5532e15fe Merge pull request #1068 from BishopFox/fix/pb-sgn
Fix/pb sgn
2023-01-11 14:10:15 -08:00
moloch-- 72c1de84a8 Move DisableSGN out of protobuf since its client-side only 2023-01-11 13:28:22 -08:00
moloch-- d935a038b0 Move DisableSGN out of protobuf since its client-side only 2023-01-11 13:21:15 -08:00
Joe be6cfc9db4 Merge pull request #1066 from BishopFox/fix/1064
Fix/1064
2023-01-09 15:52:31 -08:00
moloch-- cfa16f7e62 More specific cross-platform constraints 2023-01-09 14:51:48 -08:00
moloch-- 1a8487ef71 Fix build constraints for linux/mips 2023-01-09 14:23:46 -08:00
moloch-- 72fcd30fe9 Fix build constraints for linux/mips 2023-01-09 14:23:39 -08:00
moloch-- 37a157de08 More traffic encoder tests 2023-01-09 13:34:06 -08:00
moloch-- d87df821c5 Initialize encoder map on startup 2023-01-09 10:20:48 -08:00
moloch-- 4838d79732 Stricter checks on passthroughFS 2023-01-09 09:46:10 -08:00
Joe 79ff35429d Merge pull request #1061 from BishopFox/17e7dependabot/go_modules/golang.org/x/crypto-0.5.0
Bump golang.org/x/crypto from 0.4.0 to 0.5.0
2023-01-09 08:03:31 -08:00
Joe de2d78158f Merge pull request #1062 from BishopFox/303ddependabot/go_modules/gorm.io/gorm-1.24.3
Bump gorm.io/gorm from 1.24.2 to 1.24.3
2023-01-09 08:03:12 -08:00
moloch-- 51c872e2e8 Better sepperated server/client asset code 2023-01-08 19:25:30 -08:00
dependabot[bot] 19c6e79951 Bump gorm.io/gorm from 1.24.2 to 1.24.3
Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.24.2 to 1.24.3.
- [Release notes](https://github.com/go-gorm/gorm/releases)
- [Commits](https://github.com/go-gorm/gorm/compare/v1.24.2...v1.24.3)

---
updated-dependencies:
- dependency-name: gorm.io/gorm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-09 03:23:50 +00:00
dependabot[bot] 81d8b39db7 Bump golang.org/x/crypto from 0.4.0 to 0.5.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/golang/crypto/releases)
- [Commits](https://github.com/golang/crypto/compare/v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-09 03:23:43 +00:00
moloch-- 6b34c100e7 Rename assets file 2023-01-08 19:18:54 -08:00
moloch-- 91effc6ca8 Implemented internal encodersFS 2023-01-08 19:17:20 -08:00
moloch-- 79a56e88ee implemented init'able encoders 2023-01-08 18:16:35 -08:00
moloch-- a41ef64bfb Update encoder interface 2023-01-08 17:24:26 -08:00
moloch-- 55de4944db Update encoder interface 2023-01-08 12:40:23 -08:00
moloch-- 6803d76fcf Improved traffic encoder unit test 2023-01-07 18:29:19 -08:00
moloch-- 4efcdc019b Traffic encoder unit tests pass 2023-01-07 17:59:13 -08:00
moloch-- e7e420f730 Add initial traffic encoder impl 2023-01-04 17:44:56 -08:00
moloch-- 29f9ff344b Updated traffic encoder readme 2023-01-04 17:02:31 -08:00
moloch-- f33bfca070 Improved wasm module names 2023-01-04 16:58:02 -08:00
moloch-- 8950786040 Add traffic encoders to assets 2023-01-04 15:45:09 -08:00
moloch-- 55fd77fdea Added base64 wazero encoder in server assets 2023-01-04 14:57:57 -08:00
moloch-- 08c61c146b Merge branch 'master' into v1.6.0/master 2023-01-04 14:20:14 -08:00
Joe ce213edab4 Merge pull request #1057 from BishopFox/fix/1055
Fix issue #1055 and #1054
2023-01-04 10:05:58 -08:00
moloch-- 4a996b5494 Fix issue #1055 and #1054 2023-01-04 09:04:36 -08:00
Joe 0910c28a5f Merge pull request #1053 from BishopFox/a3sroot-fix/gzip
A3sroot fix/gzip
2023-01-03 15:21:05 -08:00
moloch-- ff3e37075b Fix hex unit test 2023-01-03 14:33:31 -08:00
moloch-- 41c95a9570 Minor tweaks 2023-01-03 14:23:03 -08:00
dependabot[bot] 6e87b94035 Bump github.com/shirou/gopsutil/v3 from 3.22.11 to 3.22.12
Bumps [github.com/shirou/gopsutil/v3](https://github.com/shirou/gopsutil) from 3.22.11 to 3.22.12.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/commits/v3.22.12)

---
updated-dependencies:
- dependency-name: github.com/shirou/gopsutil/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-03 14:09:02 -08:00
dependabot[bot] 06b2e4ecc1 Bump gorm.io/driver/postgres from 1.4.5 to 1.4.6
Bumps [gorm.io/driver/postgres](https://github.com/go-gorm/postgres) from 1.4.5 to 1.4.6.
- [Release notes](https://github.com/go-gorm/postgres/releases)
- [Commits](https://github.com/go-gorm/postgres/compare/v1.4.5...v1.4.6)

---
updated-dependencies:
- dependency-name: gorm.io/driver/postgres
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-03 14:09:01 -08:00
moloch-- db9bc1317a Tweak downloaded flag file, and add it to make clean-all 2023-01-03 14:08:59 -08:00
James Golovich 7e8d228314 Automatically run go-assets.sh from Makefile if it hasn't been run already 2023-01-03 14:08:13 -08:00
necroph0s 29340acfee Add flag to disable sgn when generating beacon shellcode 2023-01-03 14:07:37 -08:00
moloch-- 067eb5856e Signed fix for pr #995 2023-01-03 14:07:37 -08:00
dependabot[bot] fa58a52cae Bump github.com/pquerna/otp from 1.3.0 to 1.4.0
Bumps [github.com/pquerna/otp](https://github.com/pquerna/otp) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/pquerna/otp/releases)
- [Commits](https://github.com/pquerna/otp/compare/v1.3.0...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/pquerna/otp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-03 14:07:36 -08:00
dependabot[bot] 3ac0ff131a Bump gorm.io/driver/sqlite from 1.4.3 to 1.4.4
Bumps [gorm.io/driver/sqlite](https://github.com/go-gorm/sqlite) from 1.4.3 to 1.4.4.
- [Release notes](https://github.com/go-gorm/sqlite/releases)
- [Commits](https://github.com/go-gorm/sqlite/compare/v1.4.3...v1.4.4)

---
updated-dependencies:
- dependency-name: gorm.io/driver/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-03 14:07:36 -08:00
s3cst4rs cc55f38195 Fix the bug of the corresponding relationship between dwLogonType and dwLogonProvider in MakeToken 2023-01-03 14:07:35 -08:00
Tom Samstag 35eedd75ec install script- use users' primary group name
The install script previously assumed that users were each a member of a
group named the same as their username. While this is a convention on
some systems, it's not universal. This change determines users' primary
group name for chown'ing their client config directory instead of making
this assumption.
2023-01-03 14:07:34 -08:00
rkervella 5067333eff Only alert user when --in-process is not used. 2023-01-03 14:07:33 -08:00
dependabot[bot] 0d1c64aede Bump golang.org/x/sys from 0.2.0 to 0.3.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.2.0 to 0.3.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/compare/v0.2.0...v0.3.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-03 14:07:33 -08:00
James Golovich 98f2340e3e Ensure Wireguard endpoint is valid before trying to use it
Fixes #931
2023-01-03 14:07:32 -08:00
dependabot[bot] bf7ac3997d Bump nokogiri from 1.13.9 to 1.13.10 in /docs
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.9 to 1.13.10.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.9...v1.13.10)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-03 14:07:31 -08:00
dependabot[bot] 0c827c6736 Bump github.com/shirou/gopsutil/v3 from 3.22.10 to 3.22.11
Bumps [github.com/shirou/gopsutil/v3](https://github.com/shirou/gopsutil) from 3.22.10 to 3.22.11.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/commits)

---
updated-dependencies:
- dependency-name: github.com/shirou/gopsutil/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-03 14:07:30 -08:00
dependabot[bot] b8723d93da Bump github.com/jedib0t/go-pretty/v6 from 6.4.2 to 6.4.3
Bumps [github.com/jedib0t/go-pretty/v6](https://github.com/jedib0t/go-pretty) from 6.4.2 to 6.4.3.
- [Release notes](https://github.com/jedib0t/go-pretty/releases)
- [Commits](https://github.com/jedib0t/go-pretty/compare/v6.4.2...v6.4.3)

---
updated-dependencies:
- dependency-name: github.com/jedib0t/go-pretty/v6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-03 14:07:28 -08:00
dependabot[bot] 96d242b0df Bump golang.org/x/text from 0.4.0 to 0.5.0
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-03 14:07:25 -08:00
rkervella 645e5e0d14 Apply new logic to the downloadHandler 2023-01-03 14:07:24 -08:00
rkervella 2a2b7dbf47 Wrap filepath.Match into a custom package for windows specific code. 2023-01-03 14:07:22 -08:00
rkervella 206ab56bee Refactor to remove ioutil dep 2023-01-03 14:07:16 -08:00
rkervella 362efc8f9d Update implant vendor 2023-01-03 14:07:13 -08:00
Joe cf7f4be3ed Merge pull request #1049 from BishopFox/0654dependabot/go_modules/github.com/shirou/gopsutil/v3-3.22.12
Bump github.com/shirou/gopsutil/v3 from 3.22.11 to 3.22.12
2023-01-03 14:02:34 -08:00
dependabot[bot] 0796409887 Bump github.com/shirou/gopsutil/v3 from 3.22.11 to 3.22.12
Bumps [github.com/shirou/gopsutil/v3](https://github.com/shirou/gopsutil) from 3.22.11 to 3.22.12.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/commits/v3.22.12)

---
updated-dependencies:
- dependency-name: github.com/shirou/gopsutil/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-03 21:10:12 +00:00
Joe 30647d267a Merge pull request #1048 from BishopFox/3a7cdependabot/go_modules/gorm.io/driver/postgres-1.4.6
Bump gorm.io/driver/postgres from 1.4.5 to 1.4.6
2023-01-03 13:07:47 -08:00
Joe 65da9c8504 Merge pull request #1052 from BishopFox/jamesgol-auto-go-assets
Jamesgol auto go assets
2023-01-03 13:06:35 -08:00
Ronan Kervella e296b6fdc7 Merge pull request #1050 from necroph0s/disable-sgn
Add flag to disable sgn when generating beacon shellcode
2023-01-03 12:33:12 -08:00
Ronan Kervella 3e3fdbe6a8 Merge pull request #1051 from BishopFox/fix/995
Signed fix for pr #995
2023-01-03 12:27:53 -08:00
moloch-- 8d97ba3aec Tweak downloaded flag file, and add it to make clean-all 2023-01-03 12:16:46 -08:00
dependabot[bot] a5a60a505c Bump github.com/pquerna/otp from 1.3.0 to 1.4.0
Bumps [github.com/pquerna/otp](https://github.com/pquerna/otp) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/pquerna/otp/releases)
- [Commits](https://github.com/pquerna/otp/compare/v1.3.0...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/pquerna/otp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-03 11:56:10 -08:00
dependabot[bot] c04f3f0228 Bump gorm.io/driver/sqlite from 1.4.3 to 1.4.4
Bumps [gorm.io/driver/sqlite](https://github.com/go-gorm/sqlite) from 1.4.3 to 1.4.4.
- [Release notes](https://github.com/go-gorm/sqlite/releases)
- [Commits](https://github.com/go-gorm/sqlite/compare/v1.4.3...v1.4.4)

---
updated-dependencies:
- dependency-name: gorm.io/driver/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-03 11:56:09 -08:00
s3cst4rs 885387b3ea Fix the bug of the corresponding relationship between dwLogonType and dwLogonProvider in MakeToken 2023-01-03 11:56:08 -08:00
Tom Samstag d809a28a5d install script- use users' primary group name
The install script previously assumed that users were each a member of a
group named the same as their username. While this is a convention on
some systems, it's not universal. This change determines users' primary
group name for chown'ing their client config directory instead of making
this assumption.
2023-01-03 11:56:07 -08:00
rkervella f48dfa0e4b Only alert user when --in-process is not used. 2023-01-03 11:56:06 -08:00
dependabot[bot] 0bf19f5242 Bump golang.org/x/sys from 0.2.0 to 0.3.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.2.0 to 0.3.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/compare/v0.2.0...v0.3.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-03 11:56:05 -08:00
James Golovich 7bea0ee08f Ensure Wireguard endpoint is valid before trying to use it
Fixes #931
2023-01-03 11:56:04 -08:00
dependabot[bot] 4df0e87896 Bump nokogiri from 1.13.9 to 1.13.10 in /docs
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.9 to 1.13.10.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.9...v1.13.10)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-03 11:56:04 -08:00
dependabot[bot] 35f1fdd6cb Bump github.com/shirou/gopsutil/v3 from 3.22.10 to 3.22.11
Bumps [github.com/shirou/gopsutil/v3](https://github.com/shirou/gopsutil) from 3.22.10 to 3.22.11.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/commits)

---
updated-dependencies:
- dependency-name: github.com/shirou/gopsutil/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-03 11:56:03 -08:00
dependabot[bot] 19ccc10a25 Bump github.com/jedib0t/go-pretty/v6 from 6.4.2 to 6.4.3
Bumps [github.com/jedib0t/go-pretty/v6](https://github.com/jedib0t/go-pretty) from 6.4.2 to 6.4.3.
- [Release notes](https://github.com/jedib0t/go-pretty/releases)
- [Commits](https://github.com/jedib0t/go-pretty/compare/v6.4.2...v6.4.3)

---
updated-dependencies:
- dependency-name: github.com/jedib0t/go-pretty/v6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-03 11:56:02 -08:00
dependabot[bot] b900af8b21 Bump golang.org/x/text from 0.4.0 to 0.5.0
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-03 11:56:00 -08:00
moloch-- bf3619553a Signed fix for pr #995 2023-01-03 11:43:39 -08:00
dependabot[bot] f0de5eb2d1 Bump gorm.io/driver/postgres from 1.4.5 to 1.4.6
Bumps [gorm.io/driver/postgres](https://github.com/go-gorm/postgres) from 1.4.5 to 1.4.6.
- [Release notes](https://github.com/go-gorm/postgres/releases)
- [Commits](https://github.com/go-gorm/postgres/compare/v1.4.5...v1.4.6)

---
updated-dependencies:
- dependency-name: gorm.io/driver/postgres
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-03 19:41:52 +00:00
Joe d647389c52 Merge pull request #1041 from BishopFox/def1dependabot/go_modules/github.com/pquerna/otp-1.4.0
Bump github.com/pquerna/otp from 1.3.0 to 1.4.0
2023-01-03 11:40:13 -08:00
Joe d1e5053c34 Merge pull request #1047 from BishopFox/4392dependabot/go_modules/gorm.io/driver/sqlite-1.4.4
Bump gorm.io/driver/sqlite from 1.4.3 to 1.4.4
2023-01-03 11:39:22 -08:00
necroph0s ea045fb1a6 Add flag to disable sgn when generating beacon shellcode 2023-01-03 14:11:20 -05:00
dependabot[bot] d15afa23a5 Bump gorm.io/driver/sqlite from 1.4.3 to 1.4.4
Bumps [gorm.io/driver/sqlite](https://github.com/go-gorm/sqlite) from 1.4.3 to 1.4.4.
- [Release notes](https://github.com/go-gorm/sqlite/releases)
- [Commits](https://github.com/go-gorm/sqlite/compare/v1.4.3...v1.4.4)

---
updated-dependencies:
- dependency-name: gorm.io/driver/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-02 03:07:28 +00:00
Ronan Kervella e231cd5252 Merge pull request #1043 from s3cst4rs/master
Fix the bug of the corresponding relationship between dwLogonType and dwLogonProvider in MakeToken
2022-12-30 08:19:55 -08:00
Joe 5bcae143cb Merge pull request #1046 from tecknicaltom/install-gid
install script- use users' primary group name
2022-12-30 08:35:37 -06:00
Tom Samstag d1d2415508 install script- use users' primary group name
The install script previously assumed that users were each a member of a
group named the same as their username. While this is a convention on
some systems, it's not universal. This change determines users' primary
group name for chown'ing their client config directory instead of making
this assumption.
2022-12-29 16:25:05 -08:00
s3cst4rs 57a4cb6b12 Fix the bug of the corresponding relationship between dwLogonType and dwLogonProvider in MakeToken 2022-12-22 10:18:18 +08:00
dependabot[bot] 4845dfed87 Bump github.com/pquerna/otp from 1.3.0 to 1.4.0
Bumps [github.com/pquerna/otp](https://github.com/pquerna/otp) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/pquerna/otp/releases)
- [Commits](https://github.com/pquerna/otp/compare/v1.3.0...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/pquerna/otp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-12-19 03:08:14 +00:00
Ronan Kervella 17e102e72c Merge pull request #1038 from BishopFox/fix/1036
Only alert user when `--in-process` is not used.
2022-12-14 10:23:01 +01:00
rkervella 8d1ce4cca7 Only alert user when --in-process is not used. 2022-12-13 09:57:25 +01:00
Ronan Kervella 508257f825 Merge pull request #1035 from BishopFox/8c73dependabot/go_modules/golang.org/x/sys-0.3.0
Bump golang.org/x/sys from 0.2.0 to 0.3.0
2022-12-12 10:20:47 +01:00
dependabot[bot] ec2fc66c9f Bump golang.org/x/sys from 0.2.0 to 0.3.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.2.0 to 0.3.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/compare/v0.2.0...v0.3.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-12-12 03:17:36 +00:00
Ronan Kervella 3b24870ce8 Merge pull request #1024 from jamesgol/fix/931/wg
Ensure Wireguard endpoint is valid before trying to use it
2022-12-08 09:25:21 +01:00
Ronan Kervella b6340ead44 Merge pull request #1028 from BishopFox/0c7cdependabot/bundler/docs/nokogiri-1.13.10
Bump nokogiri from 1.13.9 to 1.13.10 in /docs
2022-12-08 09:25:03 +01:00
dependabot[bot] 0cf021dc2b Bump nokogiri from 1.13.9 to 1.13.10 in /docs
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.9 to 1.13.10.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.9...v1.13.10)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-12-08 03:48:16 +00:00
Ronan Kervella aac9ded76a Merge pull request #1020 from BishopFox/4772dependabot/go_modules/github.com/shirou/gopsutil/v3-3.22.11
Bump github.com/shirou/gopsutil/v3 from 3.22.10 to 3.22.11
2022-12-05 23:44:14 -08:00
James Golovich 2fefb634ef Ensure Wireguard endpoint is valid before trying to use it
Fixes #931
2022-12-05 19:00:59 -08:00
Joe db11d8d6bb Merge pull request #1021 from BishopFox/f5efdependabot/go_modules/github.com/jedib0t/go-pretty/v6-6.4.3
Bump github.com/jedib0t/go-pretty/v6 from 6.4.2 to 6.4.3
2022-12-05 09:55:59 -06:00
Joe cca1f66ea6 Merge pull request #1022 from BishopFox/0b3ddependabot/go_modules/golang.org/x/text-0.5.0
Bump golang.org/x/text from 0.4.0 to 0.5.0
2022-12-04 23:18:19 -06:00
dependabot[bot] cdd941bdad Bump golang.org/x/text from 0.4.0 to 0.5.0
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-12-05 03:27:37 +00:00
dependabot[bot] a37e8d6b2d Bump github.com/jedib0t/go-pretty/v6 from 6.4.2 to 6.4.3
Bumps [github.com/jedib0t/go-pretty/v6](https://github.com/jedib0t/go-pretty) from 6.4.2 to 6.4.3.
- [Release notes](https://github.com/jedib0t/go-pretty/releases)
- [Commits](https://github.com/jedib0t/go-pretty/compare/v6.4.2...v6.4.3)

---
updated-dependencies:
- dependency-name: github.com/jedib0t/go-pretty/v6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-12-05 03:27:29 +00:00
dependabot[bot] 8d1dc478b9 Bump github.com/shirou/gopsutil/v3 from 3.22.10 to 3.22.11
Bumps [github.com/shirou/gopsutil/v3](https://github.com/shirou/gopsutil) from 3.22.10 to 3.22.11.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/commits)

---
updated-dependencies:
- dependency-name: github.com/shirou/gopsutil/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-12-05 03:27:22 +00:00
James Golovich 7b6ff79b5f Automatically run go-assets.sh from Makefile if it hasn't been run already 2022-12-02 18:37:45 -08:00
a3sroot 0ec79a8e55 gzip frequent object creation can lead to memory leaks 2022-12-01 15:46:05 +08:00
Joe 8a28bf4506 Merge pull request #1018 from BishopFox/fix/1017
Refactor calls to `filepath.Match` implant side
2022-11-30 15:04:23 -06:00
rkervella 82cb8797a9 Apply new logic to the downloadHandler 2022-11-30 12:15:11 -08:00
rkervella d778ada3c5 Wrap filepath.Match into a custom package for windows specific code. 2022-11-30 12:11:07 -08:00
rkervella 2a0efd19f5 Refactor to remove ioutil dep 2022-11-30 11:01:46 -08:00
Joe 0912e43568 Merge pull request #1015 from BishopFox/experiments/implant-mod-trim
Update implant vendor
2022-11-30 09:53:08 -06:00
rkervella 748407ae2c Update implant vendor 2022-11-28 10:03:11 -08:00
Joe 177c8fbed8 Merge pull request #1009 from BishopFox/stage
Stage
2022-11-22 19:16:07 -06:00
Joe cd94a65432 Merge pull request #1008 from BishopFox/moloch---patch-5
Update SECURITY.md
2022-11-22 18:38:17 -06:00
rkervella 419c58e77f Switch to unsafe.Slice 2022-11-22 16:21:50 -08:00
Joe 51aa00e741 Update SECURITY.md
Signed-off-by: Joe <[email protected]>
2022-11-22 17:57:56 -06:00
Joe ffe4c490fd Merge pull request #1004 from BishopFox/fix/1003
Resolve absolute path if file is not in path for `execute`
2022-11-16 18:25:19 -06:00
rkervella 702c2371a4 Fix #1003 2022-11-16 15:12:07 -08:00
moloch-- 9aa738884a Tweak pb 2022-11-14 17:32:03 -08:00
Joe 776f416ed1 Merge pull request #1001 from BishopFox/d446dependabot/go_modules/gorm.io/driver/mysql-1.4.4
Bump gorm.io/driver/mysql from 1.4.3 to 1.4.4
2022-11-14 10:44:19 -06:00
Joe ce98ce8b37 Merge pull request #1002 from BishopFox/6decdependabot/go_modules/github.com/Ne0nd0g/go-clr-1.0.3
Bump github.com/Ne0nd0g/go-clr from 1.0.2 to 1.0.3
2022-11-14 10:43:59 -06:00
dependabot[bot] de8c6cb9b5 Bump github.com/Ne0nd0g/go-clr from 1.0.2 to 1.0.3
Bumps [github.com/Ne0nd0g/go-clr](https://github.com/Ne0nd0g/go-clr) from 1.0.2 to 1.0.3.
- [Release notes](https://github.com/Ne0nd0g/go-clr/releases)
- [Changelog](https://github.com/Ne0nd0g/go-clr/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Ne0nd0g/go-clr/compare/v1.0.2...v1.0.3)

---
updated-dependencies:
- dependency-name: github.com/Ne0nd0g/go-clr
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-11-14 03:06:45 +00:00
dependabot[bot] 6afdad6d50 Bump gorm.io/driver/mysql from 1.4.3 to 1.4.4
Bumps [gorm.io/driver/mysql](https://github.com/go-gorm/mysql) from 1.4.3 to 1.4.4.
- [Release notes](https://github.com/go-gorm/mysql/releases)
- [Commits](https://github.com/go-gorm/mysql/compare/v1.4.3...v1.4.4)

---
updated-dependencies:
- dependency-name: gorm.io/driver/mysql
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-11-14 03:06:18 +00:00
Joe d699a8d140 Merge pull request #998 from BishopFox/fix/backdoor
Generate name when none has been assigned
2022-11-10 09:27:46 -06:00
rkervella 77148d0d31 Generate name when none has been assigned 2022-11-09 15:58:00 -08:00
Ronan Kervella c7e77c8f8b Merge pull request #996 from MrAle98/feat/tokenManagement
improved token management
2022-11-09 08:28:14 -08:00
MrAle98 5e6148b193 improved token management 2022-11-09 14:41:22 +01:00
moloch-- f0fae008d3 Merge branch 'master' into v1.6.0/master 2022-11-07 07:59:02 -07:00
Joe 7b12e893a5 Merge pull request #992 from BishopFox/299adependabot/go_modules/github.com/jedib0t/go-pretty/v6-6.4.2
Bump github.com/jedib0t/go-pretty/v6 from 6.4.0 to 6.4.2
2022-11-07 08:58:27 -06:00
Joe a619b59329 Merge pull request #993 from BishopFox/56d7dependabot/go_modules/github.com/gofrs/uuid-4.3.1incompatible
Bump github.com/gofrs/uuid from 4.3.0+incompatible to 4.3.1+incompatible
2022-11-07 08:57:48 -06:00
Joe ead23d8bf6 Merge pull request #994 from BishopFox/6c07dependabot/go_modules/github.com/shirou/gopsutil/v3-3.22.10
Bump github.com/shirou/gopsutil/v3 from 3.22.9 to 3.22.10
2022-11-07 08:57:16 -06:00
dependabot[bot] 7e6abd2211 Bump github.com/shirou/gopsutil/v3 from 3.22.9 to 3.22.10
Bumps [github.com/shirou/gopsutil/v3](https://github.com/shirou/gopsutil) from 3.22.9 to 3.22.10.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v3.22.9...v3.22.10)

---
updated-dependencies:
- dependency-name: github.com/shirou/gopsutil/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-11-07 03:08:21 +00:00
dependabot[bot] 4052093d57 Bump github.com/gofrs/uuid from 4.3.0+incompatible to 4.3.1+incompatible
Bumps [github.com/gofrs/uuid](https://github.com/gofrs/uuid) from 4.3.0+incompatible to 4.3.1+incompatible.
- [Release notes](https://github.com/gofrs/uuid/releases)
- [Commits](https://github.com/gofrs/uuid/compare/v4.3.0...v4.3.1)

---
updated-dependencies:
- dependency-name: github.com/gofrs/uuid
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-11-07 03:08:06 +00:00
dependabot[bot] a676cb328a Bump github.com/jedib0t/go-pretty/v6 from 6.4.0 to 6.4.2
Bumps [github.com/jedib0t/go-pretty/v6](https://github.com/jedib0t/go-pretty) from 6.4.0 to 6.4.2.
- [Release notes](https://github.com/jedib0t/go-pretty/releases)
- [Commits](https://github.com/jedib0t/go-pretty/compare/v6.4.0...v6.4.2)

---
updated-dependencies:
- dependency-name: github.com/jedib0t/go-pretty/v6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-11-07 03:07:53 +00:00
moloch-- 25b14a97e2 merge master 2022-11-04 20:39:49 -07:00
Joe 1be1904c4d Merge pull request #990 from BishopFox/stage
Fix a few bugs
2022-11-04 22:16:19 -05:00
rkervella ead6b48b74 Add default flag value for netstat 2022-11-04 16:41:08 -07:00
rkervella 5d8ee38cb4 Allow user to skip reverse lookup 2022-11-04 16:39:23 -07:00
rkervella cef27f6511 Use IP instead of Sockaddr 2022-11-04 16:29:56 -07:00
rkervella dd91251710 Add debug target 2022-11-04 16:14:06 -07:00
rkervella d13e3fc61e Fix terminate to support beacons 2022-11-04 15:27:57 -07:00
Ronan Kervella cfb292d6d6 Merge pull request #987 from BishopFox/fix/webtable
Fix website content table
2022-11-03 17:54:03 -07:00
moloch-- 0e66a5643e Fix website content table 2022-11-03 08:40:23 -07:00
moloch-- 6cc3955f2a Use default handler instead of 404 2022-11-03 08:38:28 -07:00
moloch-- 1cfcfc5659 Move state to parent 2022-11-02 20:42:19 -07:00
moloch-- 5a9b01516d Speed float32 2022-11-02 20:39:18 -07:00
moloch-- ededdfee1c Detailed status 2022-11-02 20:05:08 -07:00
Joe 5a7ee43120 Merge pull request #986 from BishopFox/feature/runas-password
Revamped `runas` command
2022-11-02 21:57:06 -05:00
Joe 8b7a66a595 Merge pull request #985 from BishopFox/feature/alternate-logon-type
Let user choose the logon type
2022-11-02 21:56:44 -05:00
rkervella f8ae372796 Reworked runas to act as the windows utility 2022-11-02 18:22:18 -07:00
rkervella 5908033ffd Fix const package 2022-11-02 17:46:38 -07:00
rkervella e083fa6db4 Reworked runas 2022-11-02 17:46:08 -07:00
rkervella eb96269114 Add CreateProcessWithLogonW 2022-11-02 17:27:15 -07:00
rkervella e9945d7cb4 Let user choose the logon type 2022-11-02 17:16:08 -07:00
moloch-- f9382baa35 Merge branch 'master' into v1.6.0/master 2022-11-02 16:14:45 -07:00
Joe c91740d2ac Merge pull request #984 from BishopFox/feature/pstree
Fix pstree
2022-11-02 18:06:40 -05:00
rkervella 170c2bc462 Use nodes vs branches when it makes sense. 2022-11-02 15:24:37 -07:00
rkervella ac56a98671 Safely delete nodes 2022-11-02 15:18:57 -07:00
rkervella 6c7814ce4f Fix pstree 2022-11-02 14:24:10 -07:00
moloch-- 35522b1bc6 Cleanup ioutil 2022-11-02 12:04:15 -07:00
moloch-- f66f61eb01 Merge branch 'master' into v1.6.0/master 2022-11-02 09:13:48 -07:00
Joe 4adc9abd6a Merge pull request #982 from BishopFox/feature/pstree
Add process tree option to `ps`
2022-11-02 11:08:20 -05:00
rkervella 418b061c14 Add support for ps tree 2022-11-01 22:42:38 -07:00
moloch-- 9cfef52739 Merge branch 'master' into v1.6.0/creds 2022-11-01 15:59:11 -07:00
rkervella 95ea7d8390 Fix indentation 2022-11-01 15:47:06 -07:00
Joe 7f02c2ca96 Merge pull request #980 from BishopFox/go/v1.19.3
Go v1.19.3
2022-11-01 13:59:27 -05:00
moloch-- 430b5ffb79 Go v1.19.3 2022-11-01 10:59:06 -07:00
moloch-- e256b74773 Parse crackfileid 2022-11-01 10:50:48 -07:00
Joe e0c7779c6d Merge pull request #977 from BishopFox/b716dependabot/go_modules/github.com/spf13/cobra-1.6.1
Bump github.com/spf13/cobra from 1.6.0 to 1.6.1
2022-10-31 00:25:43 -05:00
Joe aa31df6813 Merge pull request #978 from BishopFox/f5a9dependabot/go_modules/modernc.org/sqlite-1.19.3
Bump modernc.org/sqlite from 1.19.2 to 1.19.3
2022-10-31 00:25:26 -05:00
Joe 4146b382ff Merge pull request #976 from BishopFox/c5dcdependabot/go_modules/github.com/mattn/go-sqlite3-1.14.16
Bump github.com/mattn/go-sqlite3 from 1.14.15 to 1.14.16
2022-10-31 00:24:55 -05:00
dependabot[bot] 1e2e3caca0 Bump modernc.org/sqlite from 1.19.2 to 1.19.3
---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-10-31 03:24:40 +00:00
dependabot[bot] 40a9b74119 Bump github.com/spf13/cobra from 1.6.0 to 1.6.1
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.6.0...v1.6.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-10-31 03:24:11 +00:00
dependabot[bot] 125a4ac0c4 Bump github.com/mattn/go-sqlite3 from 1.14.15 to 1.14.16
Bumps [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) from 1.14.15 to 1.14.16.
- [Release notes](https://github.com/mattn/go-sqlite3/releases)
- [Commits](https://github.com/mattn/go-sqlite3/compare/v1.14.15...v1.14.16)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-sqlite3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-10-31 03:24:04 +00:00
moloch-- 91d1177f82 Bug fixes to crack add/rm 2022-10-30 17:07:28 -07:00
moloch-- 1a66b392ba implemented other crack file types 2022-10-30 16:56:44 -07:00
moloch-- 05b887962a File mgmt 2022-10-30 15:19:53 -07:00
moloch-- ffeebebc8a Display benchmarks 2022-10-29 19:48:55 -07:00
moloch-- c06089974e Updated bench types 2022-10-29 18:35:55 -07:00
moloch-- f47a1d9606 Benchmark rpc 2022-10-29 17:25:35 -07:00
moloch-- ac9a5052aa Updated task models 2022-10-29 13:52:27 -07:00
moloch-- 921abe0620 Expanded db models 2022-10-27 20:34:04 -07:00
moloch-- c3f4b7493d Updated pb 2022-10-27 17:43:20 -07:00
moloch-- 4f2e86c6fc Made HostUUID pk 2022-10-25 22:53:37 -07:00
moloch-- d9f2146849 Added more crackstation events 2022-10-25 21:22:05 -07:00
moloch-- 3a4158fada Add crack basic cmds 2022-10-25 20:18:40 -07:00
moloch-- 7d095fae82 Added collections 2022-10-25 19:11:40 -07:00
moloch-- 364e61bf10 Added collections 2022-10-25 19:10:45 -07:00
moloch-- 5685af7978 Added more hash types 2022-10-25 18:23:55 -07:00
moloch-- 6b43991619 Added some basic file parsers 2022-10-24 22:38:40 -07:00
moloch-- c91a2ce822 Updated readme 2022-10-24 21:39:38 -07:00
moloch-- da6c11f259 Updated help 2022-10-24 21:25:23 -07:00
moloch-- 82a9e7fc9a Cred crud fixes 2022-10-24 20:05:50 -07:00
moloch-- e7f03babaa Cred crud 2022-10-24 19:29:03 -07:00
moloch-- 0af718beea Go mod tidy/vendor 2022-10-24 09:21:03 -07:00
moloch-- 16f96c5add Merge branch 'master' into feature/creds 2022-10-24 09:20:34 -07:00
Joe 84c56f3c4e Merge pull request #967 from BishopFox/30d7dependabot/go_modules/gorm.io/driver/postgres-1.4.5
Bump gorm.io/driver/postgres from 1.4.4 to 1.4.5
2022-10-24 11:20:10 -05:00
dependabot[bot] 14553f9a5a Bump gorm.io/driver/postgres from 1.4.4 to 1.4.5
Bumps [gorm.io/driver/postgres](https://github.com/go-gorm/postgres) from 1.4.4 to 1.4.5.
- [Release notes](https://github.com/go-gorm/postgres/releases)
- [Commits](https://github.com/go-gorm/postgres/compare/v1.4.4...v1.4.5)

---
updated-dependencies:
- dependency-name: gorm.io/driver/postgres
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-10-24 15:26:40 +00:00
Joe 441038a508 Merge pull request #968 from BishopFox/01f2dependabot/go_modules/github.com/stretchr/testify-1.8.1
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1
2022-10-24 10:25:39 -05:00
Joe 4bf328edd9 Merge pull request #969 from BishopFox/0370dependabot/go_modules/gorm.io/driver/sqlite-1.4.3
Bump gorm.io/driver/sqlite from 1.4.2 to 1.4.3
2022-10-24 10:25:20 -05:00
Joe f7d5d5f4c6 Merge pull request #971 from BishopFox/d52bdependabot/go_modules/gorm.io/driver/mysql-1.4.3
Bump gorm.io/driver/mysql from 1.4.1 to 1.4.3
2022-10-24 10:25:03 -05:00
Joe ea764705f1 Merge pull request #970 from BishopFox/f6e5dependabot/go_modules/golang.org/x/text-0.4.0
Bump golang.org/x/text from 0.3.8 to 0.4.0
2022-10-24 10:24:45 -05:00
moloch-- 3f00c639dd Merge branch 'master' into feature/creds 2022-10-24 08:24:35 -07:00
moloch-- f5c75eba83 Tweak pb 2022-10-24 08:24:16 -07:00
moloch-- 2a86250fd4 Fix spelling 2022-10-23 23:25:33 -07:00
moloch-- c4616ff43c wip on hashcat protobuf 2022-10-23 23:01:31 -07:00
moloch-- c3a28dcf7a wip on hashcat protobuf 2022-10-23 22:53:23 -07:00
dependabot[bot] 0417fc16f6 Bump gorm.io/driver/mysql from 1.4.1 to 1.4.3
Bumps [gorm.io/driver/mysql](https://github.com/go-gorm/mysql) from 1.4.1 to 1.4.3.
- [Release notes](https://github.com/go-gorm/mysql/releases)
- [Commits](https://github.com/go-gorm/mysql/compare/v1.4.1...v1.4.3)

---
updated-dependencies:
- dependency-name: gorm.io/driver/mysql
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-10-24 03:40:19 +00:00
dependabot[bot] 901e9fd9e1 Bump golang.org/x/text from 0.3.8 to 0.4.0
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.8 to 0.4.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.3.8...v0.4.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-10-24 03:40:13 +00:00
dependabot[bot] c5b3250d17 Bump gorm.io/driver/sqlite from 1.4.2 to 1.4.3
Bumps [gorm.io/driver/sqlite](https://github.com/go-gorm/sqlite) from 1.4.2 to 1.4.3.
- [Release notes](https://github.com/go-gorm/sqlite/releases)
- [Commits](https://github.com/go-gorm/sqlite/compare/v1.4.2...v1.4.3)

---
updated-dependencies:
- dependency-name: gorm.io/driver/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-10-24 03:40:07 +00:00
dependabot[bot] 9f72364e54 Bump github.com/stretchr/testify from 1.8.0 to 1.8.1
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-10-24 03:40:00 +00:00
moloch-- b1b6f8186c Implement core crackstation mgmt 2022-10-23 14:10:39 -07:00
Ronan Kervella 184dde22ad Merge pull request #965 from BishopFox/moloch---patch-4
Update autorelease.yml
2022-10-23 13:29:46 -07:00
Joe 0f5262ef87 Update autorelease.yml
Remove goreleaser branch trigger

Signed-off-by: Joe <[email protected]>
2022-10-22 13:21:15 -05:00
moloch-- f68932ab3f Add kerb and net ntlm hashes 2022-10-21 14:08:08 -07:00
moloch-- 8a669d1d84 Merge branch 'master' into feature/creds 2022-10-21 13:44:09 -07:00
Joe bb8b7111b7 Merge pull request #964 from BishopFox/stage
Remove ioutil usage
2022-10-21 15:21:24 -05:00
rkervella 567e51ca46 Remove ioutil usage 2022-10-21 11:46:29 -07:00
Joe 05166e896f Merge pull request #962 from BishopFox/moloch---patch-3
Remove status badge until github fixes
2022-10-21 12:01:47 -05:00
Joe 3cfe6435f3 Remove status badge until github fixes
https://github.com/actions/runner/issues/1830

Signed-off-by: Joe <[email protected]>
2022-10-21 11:23:57 -05:00
Ronan Kervella 48c65108d6 Merge pull request #960 from BishopFox/moloch---patch-2
Update badge
2022-10-21 09:00:01 -07:00
Ronan Kervella a271932c8a Merge pull request #961 from BishopFox/fix/garble-linux-arm64
Download the correct garble executable for linux arm64
2022-10-21 08:28:13 -07:00
moloch-- 90b3c7bca4 Merge branch 'master' into feature/creds 2022-10-21 08:17:00 -07:00
moloch-- 8c6fe18280 Download the correct garble executable for linux arm64 2022-10-21 07:38:41 -07:00
Joe 97dbae571c Update badge
Signed-off-by: Joe <[email protected]>
2022-10-20 15:44:48 -05:00
Joe b5e629c4a6 Merge pull request #959 from BishopFox/test/code-ql
Test/code ql
2022-10-20 15:04:24 -05:00
moloch-- 30b1cb8a85 Appease codeql's zip/path traversal false detection 2022-10-20 11:45:35 -07:00
moloch-- eb70ed2d0b Tweak codeql config, fix db logging issue 2022-10-20 10:39:02 -07:00
Joe 53593be73f Merge pull request #958 from BishopFox/fix/action-go
Switch actions to Go ^1.19
2022-10-20 12:35:21 -05:00
moloch-- a144991ede Update codeql config 2022-10-20 10:03:34 -07:00
moloch-- cf5ae8bd07 Merge branch 'master' into feature/creds 2022-10-20 09:58:46 -07:00
moloch-- 0bb5ea506a Switch actions to Go ^1.19 2022-10-20 09:53:13 -07:00
Joe d76e845bda Merge pull request #957 from BishopFox/0145dependabot/bundler/docs/nokogiri-1.13.9
Bump nokogiri from 1.13.6 to 1.13.9 in /docs
2022-10-19 13:25:05 -05:00
dependabot[bot] 47d1f0d66b Bump nokogiri from 1.13.6 to 1.13.9 in /docs
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.6 to 1.13.9.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.6...v1.13.9)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-10-19 17:07:35 +00:00
Joe bf1127f7f2 Merge pull request #956 from BishopFox/go-sqlite
Update pure go sqlite3
2022-10-19 12:07:04 -05:00
moloch-- 8b58648713 Use gosqlite by default for linux-arm64 builds 2022-10-19 09:19:49 -07:00
moloch-- 15b5b7c09b Update pure go sqlite3 2022-10-19 09:00:25 -07:00
moloch-- 4d3ac9177a Added new models to orm 2022-10-18 17:13:24 -07:00
moloch-- 92a9bc4da9 Update help 2022-10-18 16:55:35 -07:00
moloch-- 4b3a9dad8a Refactoring loot/creds schemes 2022-10-18 16:45:41 -07:00
Ronan Kervella d7fcfe8760 Merge pull request #952 from BishopFox/feature/task-fetch-execute-assembly
Handle `execute-assembly --in-process` in `task fetch`
2022-10-18 12:06:56 -07:00
rkervella 88ca9cf905 Handle in-process execute assembly in task fetch 2022-10-18 10:55:23 -07:00
rkervella c41fc309ad Handle execute-assembly in task fetch 2022-10-18 10:51:49 -07:00
Joe a8a36dd6e2 Merge pull request #951 from BishopFox/fix/tls-compat
Ensure at least one modern cipher suite for https
2022-10-17 16:04:25 -05:00
moloch-- 0a4dfccf25 Ensure at least one modern cipher suite for https 2022-10-17 13:20:06 -07:00
Joe 20df965603 Merge pull request #950 from BishopFox/feature/external-builder
Fix issue #948
2022-10-17 14:16:31 -05:00
moloch-- 7b697ae5d1 Fix profile beacon new 2022-10-17 11:19:06 -07:00
moloch-- ab5b319a9d Fix issue #948 2022-10-17 11:07:40 -07:00
Ronan Kervella fc18744280 Merge pull request #945 from BishopFox/feature/external-builder
Regenerate external builds
2022-10-17 08:27:33 -07:00
Joe 8c5d55404c Merge pull request #946 from BishopFox/1acfdependabot/go_modules/github.com/spf13/cobra-1.6.0
Bump github.com/spf13/cobra from 1.5.0 to 1.6.0
2022-10-17 09:34:06 -05:00
Joe 53c436b7dc Merge pull request #947 from BishopFox/170ddependabot/go_modules/golang.org/x/text-0.3.8
Bump golang.org/x/text from 0.3.7 to 0.3.8
2022-10-17 09:33:42 -05:00
dependabot[bot] 3bf6ca5527 Bump golang.org/x/text from 0.3.7 to 0.3.8
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.7 to 0.3.8.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.3.7...v0.3.8)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-10-17 03:31:12 +00:00
dependabot[bot] f5b8e3f23f Bump github.com/spf13/cobra from 1.5.0 to 1.6.0
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.5.0...v1.6.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-10-17 03:30:58 +00:00
moloch-- 3cb03537e5 Implement failed build notifications 2022-10-16 15:32:05 -07:00
moloch-- 85d23885ae Improved long help 2022-10-16 14:34:28 -07:00
moloch-- 6cad9d45d0 Regenerate external builds 2022-10-16 14:17:30 -07:00
Ronan Kervella 2810bebd07 Merge pull request #943 from BishopFox/feature/external-builder
Feature/external builder
2022-10-16 07:17:52 -07:00
moloch-- cf0eb211e4 Implement more build events 2022-10-15 18:29:18 -07:00
moloch-- 3668cd73fb Unit tests pass 2022-10-15 18:02:31 -07:00
moloch-- 69804ed3b9 Unique builder names 2022-10-15 16:43:33 -07:00
moloch-- 2d376ce90b Quality of life improvements 2022-10-15 14:59:56 -07:00
moloch-- dbee28263b Refactor to support tracking builder state 2022-10-15 13:08:16 -07:00
moloch-- 3160c8f31f Fix regenerate/file name 2022-10-14 20:16:01 -07:00
moloch-- 84746926f0 Basic workflow is working 2022-10-14 19:26:22 -07:00
Ronan Kervella 020e18d0f8 Merge pull request #941 from jamesgol/fix-reconfig
Fix reconfig DB saving for sessions
2022-10-14 15:28:52 -07:00
James Golovich ceca730e6b Fix reconfig DB saving for sessions 2022-10-14 13:58:53 -07:00
moloch-- 677a079132 Merged master 2022-10-13 17:18:50 -07:00
Joe 971f44e4a1 Merge pull request #937 from BishopFox/6d9bdependabot/go_modules/gorm.io/driver/sqlite-1.4.2
Bump gorm.io/driver/sqlite from 1.3.6 to 1.4.2
2022-10-11 08:46:11 -05:00
Joe d17b842d63 Merge pull request #936 from BishopFox/f965dependabot/go_modules/gorm.io/driver/mysql-1.4.1
Bump gorm.io/driver/mysql from 1.3.6 to 1.4.1
2022-10-11 08:45:47 -05:00
dependabot[bot] 032e116a42 Bump gorm.io/driver/mysql from 1.3.6 to 1.4.1
Bumps [gorm.io/driver/mysql](https://github.com/go-gorm/mysql) from 1.3.6 to 1.4.1.
- [Release notes](https://github.com/go-gorm/mysql/releases)
- [Commits](https://github.com/go-gorm/mysql/compare/v1.3.6...v1.4.1)

---
updated-dependencies:
- dependency-name: gorm.io/driver/mysql
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-10-11 04:23:27 +00:00
dependabot[bot] 5cc548589f Bump gorm.io/driver/sqlite from 1.3.6 to 1.4.2
Bumps [gorm.io/driver/sqlite](https://github.com/go-gorm/sqlite) from 1.3.6 to 1.4.2.
- [Release notes](https://github.com/go-gorm/sqlite/releases)
- [Commits](https://github.com/go-gorm/sqlite/compare/v1.3.6...v1.4.2)

---
updated-dependencies:
- dependency-name: gorm.io/driver/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-10-11 04:22:29 +00:00
Joe 4047b42522 Merge pull request #938 from BishopFox/d1dcdependabot/go_modules/gorm.io/driver/postgres-1.4.4
Bump gorm.io/driver/postgres from 1.3.10 to 1.4.4
2022-10-10 23:21:08 -05:00
Ronan Kervella a2b039bb51 Merge pull request #932 from BishopFox/feature/sgn-inject
Feature/sgn inject
2022-10-10 18:43:48 +02:00
Ronan Kervella 3c7fe8f1c6 Merge pull request #933 from BishopFox/go/v1.19.2
Go v1.19.2
2022-10-10 18:43:08 +02:00
dependabot[bot] a1d6d00a6a Bump gorm.io/driver/postgres from 1.3.10 to 1.4.4
Bumps [gorm.io/driver/postgres](https://github.com/go-gorm/postgres) from 1.3.10 to 1.4.4.
- [Release notes](https://github.com/go-gorm/postgres/releases)
- [Commits](https://github.com/go-gorm/postgres/compare/v1.3.10...v1.4.4)

---
updated-dependencies:
- dependency-name: gorm.io/driver/postgres
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-10-10 03:39:19 +00:00
moloch-- 2481b9632f Updated garble 2022-10-09 09:57:01 +02:00
moloch-- 58e11d40fa Go v1.19.2 2022-10-09 09:01:28 +02:00
moloch-- 196d42c8f1 Merge branch 'master' into feature/sgn-inject 2022-10-08 17:32:52 +02:00
Joe 3a4eee20a0 Merge pull request #928 from BishopFox/28d2dependabot/go_modules/github.com/jedib0t/go-pretty/v6-6.4.0
Bump github.com/jedib0t/go-pretty/v6 from 6.3.8 to 6.4.0
2022-10-08 04:20:26 -05:00
dependabot[bot] 7714950206 Bump github.com/jedib0t/go-pretty/v6 from 6.3.8 to 6.4.0
Bumps [github.com/jedib0t/go-pretty/v6](https://github.com/jedib0t/go-pretty) from 6.3.8 to 6.4.0.
- [Release notes](https://github.com/jedib0t/go-pretty/releases)
- [Commits](https://github.com/jedib0t/go-pretty/compare/v6.3.8...v6.4.0)

---
updated-dependencies:
- dependency-name: github.com/jedib0t/go-pretty/v6
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-10-04 18:33:07 +00:00
Joe bae0f479b8 Merge pull request #930 from BishopFox/76b4dependabot/go_modules/github.com/shirou/gopsutil/v3-3.22.9
Bump github.com/shirou/gopsutil/v3 from 3.22.8 to 3.22.9
2022-10-04 13:31:27 -05:00
Joe fd090228e8 Merge pull request #927 from BishopFox/7dc3dependabot/go_modules/gorm.io/gorm-1.23.10
Bump gorm.io/gorm from 1.23.9 to 1.23.10
2022-10-04 13:30:43 -05:00
Joe 69dfe8c047 Merge pull request #929 from BishopFox/04d1dependabot/go_modules/github.com/chromedp/chromedp-0.8.6
Bump github.com/chromedp/chromedp from 0.8.5 to 0.8.6
2022-10-04 13:30:11 -05:00
dependabot[bot] d8b9f7cbd6 Bump github.com/shirou/gopsutil/v3 from 3.22.8 to 3.22.9
Bumps [github.com/shirou/gopsutil/v3](https://github.com/shirou/gopsutil) from 3.22.8 to 3.22.9.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v3.22.8...v3.22.9)

---
updated-dependencies:
- dependency-name: github.com/shirou/gopsutil/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-10-03 03:20:06 +00:00
dependabot[bot] 4c6269ba5a Bump github.com/chromedp/chromedp from 0.8.5 to 0.8.6
Bumps [github.com/chromedp/chromedp](https://github.com/chromedp/chromedp) from 0.8.5 to 0.8.6.
- [Release notes](https://github.com/chromedp/chromedp/releases)
- [Commits](https://github.com/chromedp/chromedp/compare/v0.8.5...v0.8.6)

---
updated-dependencies:
- dependency-name: github.com/chromedp/chromedp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-10-03 03:19:56 +00:00
dependabot[bot] c98d1e2c17 Bump gorm.io/gorm from 1.23.9 to 1.23.10
Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.23.9 to 1.23.10.
- [Release notes](https://github.com/go-gorm/gorm/releases)
- [Commits](https://github.com/go-gorm/gorm/compare/v1.23.9...v1.23.10)

---
updated-dependencies:
- dependency-name: gorm.io/gorm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-10-03 03:19:37 +00:00
moloch-- d582987c78 Refactor randomString to randomFileName 2022-09-30 19:39:37 -07:00
moloch-- 794db93ec9 Refactor randomString to randomFileName 2022-09-30 19:38:19 -07:00
moloch-- 338b622b97 Reorder code 2022-09-30 18:35:33 -07:00
moloch-- 4ecf42b5c2 Add cmd flag to disable sgn 2022-09-30 18:31:55 -07:00
moloch-- 7c5262d63d Added sgn to migrate, clean up ioutil usage 2022-09-30 18:18:52 -07:00
moloch-- 1a41eacb66 Tweaks to sgn 2022-09-30 10:07:46 -07:00
Joe 32e4ed63e9 Merge pull request #926 from BishopFox/fix/tls1.2
Tweak https/tls server compatibility for windows
2022-09-30 10:52:55 -05:00
moloch-- e65629e089 Tweak https/tls server compatibility for windows 2022-09-30 08:10:46 -07:00
Ronan Kervella 0c14621e53 Merge pull request #924 from BishopFox/fix/headers
Only add cache header to responses that need it
2022-09-29 13:09:40 -07:00
moloch-- e27e030431 Only add cache header to responses that need it 2022-09-29 09:01:01 -07:00
moloch-- 1fd850c738 wip refactor of generate code 2022-09-28 20:45:12 -07:00
Ronan Kervella 4738bf229c Merge pull request #922 from jamesgol/dns-beacon
Ensure beacon tries to connect the same as session
2022-09-28 16:45:14 -07:00
Joe c0a5a06efc Merge pull request #921 from pb376/fix-mtls-conn-close
Avoid closing nil tls connection #919
2022-09-28 17:53:24 -05:00
James Golovich 97ff802a40 Ensure beacon tries to connect the same as session 2022-09-28 15:41:20 -07:00
pb376 106c7f0427 Avoid closing nil tls connection #919 2022-09-28 15:12:40 -05:00
Joe 37a46a21e0 Merge pull request #918 from BishopFox/fix/stager-https
Add support for HTTPS stagers
2022-09-28 11:23:46 -05:00
Joe 060d1c40fd Merge pull request #723 from BishopFox/feature/ssh-kerberos
Add kerberos support for SSH client
2022-09-28 11:23:26 -05:00
rkervella 3320f3958b Update implant vendor 2022-09-28 07:39:37 -07:00
rkervella 643a9ca3fe Update implant vendor 2022-09-28 07:38:59 -07:00
rkervella 52c2e1b0cf Merge branch 'master' into feature/ssh-kerberos 2022-09-28 07:38:20 -07:00
moloch-- 0fab805980 initial outline of external builders completed 2022-09-27 22:15:47 -07:00
moloch-- dd9bb01640 wip on external builder cli 2022-09-26 23:41:13 -07:00
moloch-- 0df56e5a95 Remove ioutil 2022-09-26 22:41:53 -07:00
moloch-- e8a77d83ea Add template name field, and basic external build workflow 2022-09-26 22:39:46 -07:00
moloch-- 98de546086 Add template name field 2022-09-26 21:23:34 -07:00
moloch-- 9e9ab2042f Tweak external build api, remove 3rd party unit test framework 2022-09-26 20:59:34 -07:00
rkervella d7d946f17a Merge branch 'master' into feature/ssh-kerberos 2022-08-04 12:27:39 -07:00
rkervella c4555a124a Merge branch 'master' into feature/ssh-kerberos 2022-07-15 10:25:39 -07:00
rkervella 65a44da85f Merge branch 'master' into feature/ssh-kerberos 2022-07-15 10:24:37 -07:00
rkervella 6b0d6b2784 Merge branch 'master' into feature/ssh-kerberos 2022-06-20 18:53:18 -07:00
rkervella 4b1991ad5d Add kerberos support for SSH client 2022-06-20 15:14:40 -07:00
15638 changed files with 8124615 additions and 3182685 deletions

No files matched your search

+7
View File
@@ -1,4 +1,9 @@
# go-assets.sh downloads
/server/assets/fs/**.zip
/server/assets/fs/**/garble*
/server/assets/fs/**/zig.tar.xz
/server/assets/fs/**/zig.zip
/server/assets/fs/src.zip
/*.sdk.tar.xz
@@ -19,3 +24,5 @@
/SECURITY.md
/README.md
/CONTRIBUTING.md
.downloaded_assets
+1 -1
View File
@@ -5,4 +5,4 @@ queries:
uses: security-extended
paths:
- server
- implant
- client
+73 -137
View File
@@ -2,154 +2,90 @@ name: Release
on:
push:
tags: ["v[1-9]+.[0-9]+.[0-9]+"]
branches: [master, goreleaser]
branches:
- master
permissions:
contents: write
jobs:
linux-windows-build:
name: Linux & Windows Build
if: startsWith( github.ref, 'refs/tags/v')
tag-check:
name: Check Release Tag
runs-on: ubuntu-latest
timeout-minutes: 45
timeout-minutes: 30
outputs:
tag: ${{ steps.tag.outputs.tag }}
steps:
- name: Go 1.19
uses: actions/setup-go@v3
- name: Check Out Code
uses: actions/checkout@v6
with:
go-version: "1.19.1"
fetch-depth: 0
- name: OS Packages
- name: Find Semver Tag
id: tag
run: |
sudo apt-get update --fix-missing && sudo apt-get -y install \
git build-essential zlib1g zlib1g-dev wget zip unzip \
mingw-w64 binutils-mingw-w64 g++-mingw-w64 gcc-multilib
git fetch --prune --tags -f
tag=$(git tag --points-at "$GITHUB_SHA" | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)
echo "tag=$tag" >> "$GITHUB_OUTPUT"
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Git Fetch Tags
run: git fetch --prune --unshallow --tags -f
- name: Go Assets
run: ./go-assets.sh
- name: Make
env:
ARTIFACT_SUFFIX: _linux
run: export PATH=/home/runner/go/bin/:$PATH && make linux
- name: Linux Artifacts
uses: actions/upload-artifact@v3
with:
name: linux
path: ./sliver-*
- name: Make Windows
env:
ARTIFACT_SUFFIX: _windows
run: |
make clean
export PATH=/home/runner/go/bin/:$PATH && make windows
- name: Windows Artifacts
uses: actions/upload-artifact@v3
with:
name: windows
path: ./sliver-*
macos-build:
name: MacOS Build
if: startsWith( github.ref, 'refs/tags/v')
runs-on: macos-latest
timeout-minutes: 45
steps:
- name: Go 1.19
uses: actions/setup-go@v3
with:
go-version: "1.19.1"
- name: Mingw
run: brew install mingw-w64
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Git Fetch Tags
run: git fetch --prune --unshallow --tags -f
- name: Go Assets
run: ./go-assets.sh
- name: Make AMD64
env:
ARTIFACT_SUFFIX: _macos
run: make macos
- name: Make ARM64
env:
ARTIFACT_SUFFIX: _macos-arm64
run: make macos-arm64
- name: MacOS Artifacts
uses: actions/upload-artifact@v3
with:
name: macos
path: ./sliver-*
tagged-release:
needs: [linux-windows-build, macos-build]
name: "Tagged Release"
if: startsWith( github.ref, 'refs/tags/v')
release:
name: Release
needs: tag-check
if: needs.tag-check.outputs.tag != ''
runs-on: ubuntu-latest
environment: release
timeout-minutes: 45
steps:
- run: mkdir -p ./builds
- uses: actions/download-artifact@v3
- name: Check Out Code
uses: actions/checkout@v6
with:
path: ./builds
fetch-depth: 0
- name: Extract Artifacts
run: |
mkdir -p ./artifacts
cp ./builds/linux/* ./artifacts
cp ./builds/windows/* ./artifacts
cp ./builds/macos/* ./artifacts
- id: install-secret-key
name: GPG Key(s)
run: |
cat <(echo -e "${{ secrets.SLIVER_GPG }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
# Linux
- name: Linux AMD64
run: |
gpg --default-key 4449039C --output ./artifacts/sliver-server_linux.sig --detach-sig ./artifacts/sliver-server_linux
gpg --default-key 4449039C --output ./artifacts/sliver-client_linux.sig --detach-sig ./artifacts/sliver-client_linux
# Windows
- name: Windows AMD64
run: |
gpg --default-key 4449039C --output ./artifacts/sliver-server_windows.sig --detach-sig ./artifacts/sliver-server_windows.exe
gpg --default-key 4449039C --output ./artifacts/sliver-client_windows.sig --detach-sig ./artifacts/sliver-client_windows.exe
# MacOS AMD64
- name: MacOS AMD64
run: |
gpg --default-key 4449039C --output ./artifacts/sliver-server_macos.sig --detach-sig ./artifacts/sliver-server_macos
gpg --default-key 4449039C --output ./artifacts/sliver-client_macos.sig --detach-sig ./artifacts/sliver-client_macos
# MacOS ARM64
- name: Package MacOS ARM64
run: |
gpg --default-key 4449039C --output ./artifacts/sliver-server_macos-arm64.sig --detach-sig ./artifacts/sliver-server_macos-arm64
gpg --default-key 4449039C --output ./artifacts/sliver-client_macos-arm64.sig --detach-sig ./artifacts/sliver-client_macos-arm64
- name: "Publish Release"
uses: "marvinpinto/action-automatic-releases@latest"
- name: Go 1.25.8
uses: actions/setup-go@v6
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
files: |
./artifacts/*
go-version: "1.25.8"
- name: Install Minisign
run: sudo apt-get update --fix-missing && sudo apt-get -y install minisign
- name: Build Clients
run: |
make clients
mkdir -p artifacts
mv sliver-client_* artifacts/
- name: Build Servers
run: |
make servers
mv sliver-server_* artifacts/
- name: Sign Artifacts
env:
MINISIGN_KEY: ${{ secrets.MINISIGN_SLIVER_RELEASE_KEY }}
run: |
echo "$MINISIGN_KEY" | base64 -d > minisign.key
echo "minisign.key bytes: $(wc -c < minisign.key | tr -d ' ')"
echo "minisign.key sha256: $(sha256sum minisign.key | awk '{print $1}')"
chmod 600 minisign.key
for file in artifacts/sliver-*; do
[ -f "$file" ] || continue
minisign -S -s minisign.key -m "$file" -x "$file.minisig" -W
done
rm -f minisign.key
- name: Create Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag="${{ needs.tag-check.outputs.tag }}"
if gh release view "$tag" >/dev/null 2>&1; then
echo "Release $tag already exists."
exit 0
fi
gh release create "$tag" --generate-notes
- name: Upload Artifacts
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload "${{ needs.tag-check.outputs.tag }}" artifacts/* --clobber
+15 -39
View File
@@ -4,26 +4,25 @@ on:
push:
branches:
- test/*
# pull_request:
# branches:
# - master
pull_request:
branches:
- master
jobs:
CodeQL-Build:
name: CodeQL Security Scan
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
runs-on: ubuntu-latest
timeout-minutes: 45
timeout-minutes: 90
steps:
# Setup go environment
- name: Go 1.19
uses: actions/setup-go@v3
- name: Go 1.25.8
uses: actions/setup-go@v6
with:
go-version: "1.19.1"
go-version: "1.25.8"
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v6
with:
# Must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head of the pull request.
@@ -34,44 +33,21 @@ jobs:
- name: OS Packages
run: |
sudo apt-get update --fix-missing && sudo apt-get -y install \
git build-essential zlib1g zlib1g-dev wget zip unzip \
mingw-w64 binutils-mingw-w64 g++-mingw-w64
git build-essential zlib1g zlib1g-dev wget zip unzip
- name: Protoc
env:
PROTOC_VER: 3.11.4
run: |
wget -O protoc-${PROTOC_VER}-linux-x86_64.zip https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VER}/protoc-${PROTOC_VER}-linux-x86_64.zip \
&& unzip protoc-${PROTOC_VER}-linux-x86_64.zip \
&& sudo cp -vv ./bin/protoc /usr/local/bin/protoc
- name: Check Out Code
uses: actions/checkout@v6
- name: Protoc-gen-go
env:
PROTOC_GEN_GO_VER: 1.3.5
run: |
wget -O protoc-gen-go.tar.gz https://github.com/golang/protobuf/archive/v${PROTOC_GEN_GO_VER}.tar.gz \
&& tar xvf protoc-gen-go.tar.gz \
&& cd protobuf-${PROTOC_GEN_GO_VER} \
&& make install
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Go Assets
run: ./go-assets.sh
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v4
with:
config-file: ./.github/codeql/codeql-config.yml
languages: go
# Build the server ... is this necessary though?
- run: |
make
- name: Make
run: make
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v4
env:
VERSION: ${{github.sha}}
+102
View File
@@ -0,0 +1,102 @@
# Sample workflow for building and deploying a Next.js site to GitHub Pages
#
# To get started with Next.js see: https://nextjs.org/docs/getting-started
#
name: Sliver Docs
on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ github.workspace }}/docs/sliver-docs
env:
working-directory: ${{ github.workspace }}/docs/sliver-docs
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Detect package manager
id: detect-package-manager
run: |
if [ -f "${{ github.workspace }}/docs/sliver-docs/yarn.lock" ]; then
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
echo "runner=yarn" >> $GITHUB_OUTPUT
exit 0
elif [ -f "${{ github.workspace }}/docs/sliver-docs/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
exit 0
else
echo "Unable to determine package manager"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v6
with:
cache: "npm"
cache-dependency-path: "**/package-lock.json"
node-version: "lts/*"
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Restore cache
uses: actions/cache@v5
with:
path: |
.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
- name: Install dependencies
working-directory: ${{ env.working-directory}}
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
- name: Build with Next.js
working-directory: ${{ env.working-directory}}
run: ${{ steps.detect-package-manager.outputs.runner }} next build
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: ${{ github.workspace }}/docs/sliver-docs/out
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
-79
View File
@@ -1,79 +0,0 @@
name: Build & Test
on:
push:
branches:
- test/*
pull_request:
branches:
- master
types:
- opened
- reopened
- synchronize
- ready_for_review
jobs:
linux-windows-build:
name: Linux & Windows Build
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Go 1.19
uses: actions/setup-go@v3
with:
go-version: "1.19.1"
- name: OS Packages
run: |
sudo apt-get update --fix-missing && sudo apt-get -y install \
git build-essential zlib1g zlib1g-dev wget zip unzip \
mingw-w64 binutils-mingw-w64 g++-mingw-w64 gcc-multilib
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Git Fetch Tags
run: git fetch --prune --unshallow --tags -f
- name: Go Assets
run: ./go-assets.sh
- name: Make
run: make linux
- name: Test
run: ./sliver-server unpack --force && ./go-tests.sh
- name: Make Windows
run: make windows
macos-build:
name: MacOS Build
runs-on: macos-latest
timeout-minutes: 90
steps:
- name: Go 1.19
uses: actions/setup-go@v3
with:
go-version: "1.19.1"
- name: Mingw
run: brew install mingw-w64
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Git Fetch Tags
run: git fetch --prune --unshallow --tags -f
- name: Go Assets
run: ./go-assets.sh
- name: Make
run: make macos
- name: Test
env:
SLIVER_CC_32: /usr/local/bin/i686-w64-mingw32-gcc
SLIVER_CC_64: /usr/local/bin/x86_64-w64-mingw32-gcc
run: ./sliver-server unpack --force && ./go-tests.sh
+168
View File
@@ -0,0 +1,168 @@
name: Build & Test
on:
pull_request:
branches:
- master
paths:
- "go.mod"
- "go.sum"
- ".github/workflows/unit-tests.yml"
- "Makefile"
- "**/*.go"
- "**/*.c"
- "**/*.h"
- "**/*.sh"
- "**/*.ps1"
types:
- opened
- reopened
- synchronize
- ready_for_review
jobs:
linux-build-test:
name: Linux Build & Test
runs-on: ubuntu-latest
timeout-minutes: 180
steps:
- name: Go 1.25.8
uses: actions/setup-go@v6
with:
go-version: "1.25.8"
- name: OS Packages
run: |
sudo apt-get update --fix-missing && sudo apt-get -y install \
git build-essential zlib1g zlib1g-dev wget zip unzip
- name: Check Out Code
uses: actions/checkout@v6
- name: Git Fetch Tags
run: git fetch --prune --unshallow --tags -f
- name: Make Windows (amd64)
run: make windows-amd64
- name: Make Linux (arm64)
run: make linux-arm64
- name: Make Linux (amd64)
run: make linux-amd64
- name: Determine go-tests flags
id: go-tests-flags
shell: bash
run: |
set -euo pipefail
base_sha="${{ github.event.pull_request.base.sha }}"
head_sha="${{ github.sha }}"
if git diff --name-only "$base_sha" "$head_sha" | grep -qE '^(implant/|server/gogo/|server/generate/)'; then
echo "args=" >> "$GITHUB_OUTPUT"
else
echo "args=--skip-generate" >> "$GITHUB_OUTPUT"
fi
- name: Test Linux
run: make clean && make && ./sliver-server unpack --force && ./go-tests.sh ${{ steps.go-tests-flags.outputs.args }}
windows-build-test:
name: Windows Build & Test
runs-on: windows-latest
timeout-minutes: 180
steps:
- name: Go 1.25.8
uses: actions/setup-go@v6
with:
go-version: "1.25.8"
- name: Install make
run: choco install make -y --no-progress
- name: Check Out Code
uses: actions/checkout@v6
- name: Git Fetch Tags
run: git fetch --prune --unshallow --tags -f
- name: Make Windows (amd64)
run: make windows-amd64
- name: Determine go-tests flags
id: go-tests-flags
shell: pwsh
run: |
$baseSha = "${{ github.event.pull_request.base.sha }}"
$headSha = "${{ github.sha }}"
$changedFiles = git diff --name-only $baseSha $headSha
if ($changedFiles | Select-String -Pattern '^(implant/|server/gogo/|server/generate/)') {
"args=" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
} else {
"args=--skip-generate" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
}
- name: Test Windows
shell: pwsh
run: |
make clean
make
./go-tests.ps1 ${{ steps.go-tests-flags.outputs.args }}
macos-build-test:
name: MacOS Test
runs-on: macos-latest
timeout-minutes: 180
steps:
- name: Go 1.25.8
uses: actions/setup-go@v6
with:
go-version: "1.25.8"
- name: Check Out Code
uses: actions/checkout@v6
- name: Git Fetch Tags
run: git fetch --prune --unshallow --tags -f
- name: Make MacOS (amd64)
run: make macos-amd64
- name: Make MacOS (arm64)
run: make macos-arm64
- name: Determine go-tests flags
id: go-tests-flags
shell: bash
run: |
set -euo pipefail
base_sha="${{ github.event.pull_request.base.sha }}"
head_sha="${{ github.sha }}"
if git diff --name-only "$base_sha" "$head_sha" | grep -qE '^(implant/|server/gogo/|server/generate/)'; then
echo "args=" >> "$GITHUB_OUTPUT"
else
echo "args=--skip-generate" >> "$GITHUB_OUTPUT"
fi
- name: Test MacOS
run: make clean && make && ./sliver-server unpack --force && ./go-tests.sh ${{ steps.go-tests-flags.outputs.args }}
clients-build:
name: Clients Build
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Go 1.25.8
uses: actions/setup-go@v6
with:
go-version: "1.25.8"
- name: Check Out Code
uses: actions/checkout@v6
- name: Git Fetch Tags
run: git fetch --prune --unshallow --tags -f
- name: Make
run: make clients
+18
View File
@@ -1,7 +1,17 @@
/crush
/examples
/.vscode
/.vscode/*
/.devcontainer
/.idea
/artifacts
/artifacts/**
*.rc
/Dockerfile.*
/*.sdk.tar.xz
@@ -14,10 +24,12 @@
/sliver-server
/sliver-server_arm64
/sliver.exe
/sliver-server_*
/sliver-client
/sliver-client_arm64
/sliver-client.exe
/sliver-client_*
sliver-server-linux.zip
sliver-server-macos.zip
@@ -32,6 +44,7 @@ sliver-server-windows.zip
# Test binary, build with `go test -c`
/*.test
/test.py
# Output of the go coverage tool, specifically when used with LiteIDE
/*.out
@@ -42,3 +55,8 @@ sliver-server-windows.zip
.DS_Store
dist/
.gocache/
.gomodcache/
# Flag to show that go-assets.sh has been run
.downloaded_assets
+18
View File
@@ -0,0 +1,18 @@
# Repository Guidelines
## Build, Test, and Development Commands
- `make` builds server + client using vendored modules and runs `go-assets.sh`.
- `make client` builds a CGO-free client; `make debug` keeps symbols.
- `make pb` regenerates protobuf stubs from `protobuf/`.
- `./go-tests.sh` runs the Go test suite, this is the only way you should run unit tests.
- Docs site: `cd docs/sliver-docs && npm install && npm run dev` for local dev; `npm run build` for a static build.
## Coding Style & Naming Conventions
- Run `gofmt` on all Go code; keep package names lowercase and idiomatic.
- Avoid `CGO` and empty interfaces; prefer explicit types and interfaces.
- Do not import `server` packages from `client`.
## Testing Guidelines
- Prefer `docker build --target test --build-arg GO_TESTS_FLAGS=--skip-generate .`
- Add or update tests when behavior changes; some server packages run longer tests.
+106 -55
View File
@@ -1,73 +1,124 @@
FROM golang:1.19.1
#
# IMPORTANT: This Dockerfile is used for testing, I do not recommend deploying
# Sliver using this container configuration! However, if you do want
# a Docker deployment this is probably a good place to start.
# For production:
# docker build --target production -t sliver .
# docker run -it --rm -v $HOME/.sliver:/home/sliver/.sliver sliver
#
# For unit testing:
# docker build --target test .
# docker build --target test --build-arg GO_TESTS_FLAGS=--skip-generate .
#
ENV PROTOC_VER 3.19.4
ENV PROTOC_GEN_GO_VER v1.27.1
ENV GRPC_GO v1.2.0
# STAGE: base
## Compiles Sliver for use
FROM golang:latest AS base
# Base packages
### Base packages
RUN apt-get update --fix-missing && apt-get -y install \
git build-essential zlib1g zlib1g-dev \
libxml2 libxml2-dev libxslt-dev locate curl \
libreadline6-dev libcurl4-openssl-dev git-core \
libssl-dev libyaml-dev openssl autoconf libtool \
ncurses-dev bison curl wget xsel postgresql \
postgresql-contrib postgresql-client libpq-dev \
libapr1 libaprutil1 libsvn1 \
libpcap-dev libsqlite3-dev libgmp3-dev \
zip unzip mingw-w64 binutils-mingw-w64 g++-mingw-w64 \
nasm gcc-multilib
git build-essential zlib1g zlib1g-dev wget zip unzip
#
# > User
#
### Add sliver user
RUN groupadd -g 999 sliver && useradd -r -u 999 -g sliver sliver
RUN mkdir -p /home/sliver/ && chown -R sliver:sliver /home/sliver
#
# > Metasploit
#
RUN curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall \
&& chmod 755 msfinstall \
&& ./msfinstall
RUN mkdir -p ~/.msf4/ && touch ~/.msf4/initial_setup_complete \
&& su -l sliver -c 'mkdir -p ~/.msf4/ && touch ~/.msf4/initial_setup_complete'
#
# > Sliver
#
# Protoc
WORKDIR /tmp
RUN wget -O protoc-${PROTOC_VER}-linux-x86_64.zip https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VER}/protoc-${PROTOC_VER}-linux-x86_64.zip \
&& unzip protoc-${PROTOC_VER}-linux-x86_64.zip \
&& cp -vv ./bin/protoc /usr/local/bin
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@${PROTOC_GEN_GO_VER} \
&& go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@${GRPC_GO}
# Go assets
### Build sliver:
RUN mkdir -p /go/src/github.com/bishopfox/sliver
WORKDIR /go/src/github.com/bishopfox/sliver
ADD . /go/src/github.com/bishopfox/sliver/
RUN make clean-all \
&& ./go-assets.sh
RUN make
RUN cp -vv sliver-server /opt/sliver-server
RUN make \
&& cp -vv sliver-server /opt/sliver-server \
&& /opt/sliver-server unpack --force
# STAGE: test
## Run unit tests against the compiled instance
## Use `--target test` in the docker build command to run this stage
FROM base AS test
# Run unit tests
RUN /go/src/github.com/bishopfox/sliver/go-tests.sh
ARG GO_TESTS_FLAGS=""
ENV GO_TESTS_FLAGS="${GO_TESTS_FLAGS}"
# Clean up
RUN make clean \
&& rm -rf /go/src/* \
&& rm -rf /home/sliver/.sliver
RUN apt-get update --fix-missing \
&& apt-get -y upgrade \
&& apt-get -y install \
curl
RUN /opt/sliver-server unpack --force
### Run unit tests
RUN /go/src/github.com/bishopfox/sliver/go-tests.sh ${GO_TESTS_FLAGS}
# STAGE: production
## Final dockerized form of Sliver
FROM debian:bookworm-slim AS production
### Install production packages
RUN apt-get update --fix-missing \
&& apt-get -y upgrade \
&& apt-get -y install \
libxml2 libxml2-dev libxslt-dev locate gnupg \
libreadline6-dev libcurl4-openssl-dev git-core \
libssl-dev libyaml-dev openssl autoconf libtool \
ncurses-dev bison curl xsel postgresql \
postgresql-contrib postgresql-client libpq-dev \
curl libapr1 libaprutil1 libsvn1 \
libpcap-dev libsqlite3-dev libgmp3-dev \
nasm
### Install MSF for stager generation
RUN curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall \
&& chmod 755 msfinstall \
&& ./msfinstall \
&& mkdir -p ~/.msf4/ \
&& touch ~/.msf4/initial_setup_complete
### Cleanup unneeded packages
RUN apt-get remove -y curl gnupg \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
### Add sliver user
RUN groupadd -g 999 sliver \
&& useradd -r -u 999 -g sliver sliver \
&& mkdir -p /home/sliver/ \
&& chown -R sliver:sliver /home/sliver \
&& su -l sliver -c 'mkdir -p ~/.msf4/ && touch ~/.msf4/initial_setup_complete'
### Copy compiled binary
COPY --from=base /opt/sliver-server /opt/sliver-server
### Unpack Sliver:
USER sliver
RUN /opt/sliver-server unpack --force
WORKDIR /home/sliver/
VOLUME [ "/home/sliver/.sliver" ]
ENTRYPOINT [ "/opt/sliver-server" ]
# STAGE: production-slim (about 1Gb smaller)
FROM debian:bookworm-slim AS production-slim
### Install production packages
RUN apt-get update --fix-missing \
&& apt-get -y upgrade
### Cleanup unneeded packages
RUN apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
### Add sliver user
RUN groupadd -g 999 sliver \
&& useradd -r -u 999 -g sliver sliver \
&& mkdir -p /home/sliver/ \
&& chown -R sliver:sliver /home/sliver
### Copy compiled binary
COPY --from=base /opt/sliver-server /opt/sliver-server
### Unpack Sliver:
USER sliver
RUN /opt/sliver-server unpack --force
WORKDIR /home/sliver/
VOLUME [ "/home/sliver/.sliver" ]
ENTRYPOINT [ "/opt/sliver-server" ]
+283 -133
View File
@@ -3,162 +3,312 @@
#
GO ?= go
ARTIFACT_SUFFIX ?=
ARTIFACT_SUFFIX ?=
ENV =
TAGS ?= -tags osusergo,netgo,cgosqlite,sqlite_omit_load_extension
TAGS ?= -tags go_sqlite
CGO_ENABLED = 0
ifneq (,$(findstring cgo_sqlite,$(TAGS)))
CGO_ENABLED = 1
endif
#
# Prerequisites
#
# https://stackoverflow.com/questions/5618615/check-if-a-program-exists-from-a-makefile
EXECUTABLES = uname sed git zip date cut $(GO)
K := $(foreach exec,$(EXECUTABLES),\
$(if $(shell which $(exec)),some string,$(error "No $(exec) in PATH")))
#
# Version Information
#
GO_VERSION = $(shell $(GO) version)
GO_MAJOR_VERSION = $(shell $(GO) version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1)
GO_MINOR_VERSION = $(shell $(GO) version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f2)
MIN_SUPPORTED_GO_MAJOR_VERSION = 1
MIN_SUPPORTED_GO_MINOR_VERSION = 18
MIN_SUPPORTED_GO_MINOR_VERSION = 25
GO_VERSION_VALIDATION_ERR_MSG = Golang version is not supported, please update to at least $(MIN_SUPPORTED_GO_MAJOR_VERSION).$(MIN_SUPPORTED_GO_MINOR_VERSION)
VERSION ?= $(shell git describe --abbrev=0)
COMPILED_AT = $(shell date +%s)
RELEASES_URL ?= https://api.github.com/repos/BishopFox/sliver/releases
ARMORY_PUB_KEY ?= RWSBpxpRWDrD7Fe+VvRE3c2VEDC2NK80rlNCj+BX0gz44Xw07r6KQD9L
SLIVER_PUBLIC_KEY ?= RWTZPg959v3b7tLG7VzKHRB1/QT+d3c71Uzetfa44qAoX5rH7mGoQTTR
ARMORY_PUBLIC_KEY ?= RWSBpxpRWDrD7Fe+VvRE3c2VEDC2NK80rlNCj+BX0gz44Xw07r6KQD9L
ARMORY_REPO_URL ?= https://api.github.com/repos/sliverarmory/armory/releases
VERSION_PKG = github.com/bishopfox/sliver/client/version
CLIENT_ASSETS_PKG = github.com/bishopfox/sliver/client/assets
SLIVER_UPDATE_PKG = github.com/bishopfox/sliver/client/command/update
PB_COMPILERS = protoc protoc-gen-go protoc-gen-go-grpc
GIT_DIRTY = $(shell git diff --quiet|| echo 'Dirty')
GIT_COMMIT = $(shell git rev-parse HEAD)
ifneq ($(OS),Windows_NT)
#
# Prerequisites
#
# https://stackoverflow.com/questions/5618615/check-if-a-program-exists-from-a-makefile
EXECUTABLES = uname sed git date cut $(GO)
K := $(foreach exec,$(EXECUTABLES),\
$(if $(shell which $(exec)),some string,$(error "No $(exec) in PATH")))
#
# Build Information
#
GO_MAJOR_VERSION = $(shell $(GO) version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1)
GO_MINOR_VERSION = $(shell $(GO) version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f2)
LDFLAGS = -ldflags "-s -w \
-X $(VERSION_PKG).Version=$(VERSION) \
-X \"$(VERSION_PKG).GoVersion=$(GO_VERSION)\" \
-X $(VERSION_PKG).CompiledAt=$(COMPILED_AT) \
-X $(VERSION_PKG).GithubReleasesURL=$(RELEASES_URL) \
-X $(VERSION_PKG).GitCommit=$(GIT_COMMIT) \
-X $(VERSION_PKG).GitDirty=$(GIT_DIRTY) \
-X $(CLIENT_ASSETS_PKG).DefaultArmoryPublicKey=$(ARMORY_PUB_KEY) \
-X $(CLIENT_ASSETS_PKG).DefaultArmoryRepoURL=$(ARMORY_REPO_URL)"
SED_INPLACE := sed -i
STATIC_TARGET := linux
-X $(SLIVER_UPDATE_PKG).SliverPublicKey=$(SLIVER_PUBLIC_KEY) \
-X $(CLIENT_ASSETS_PKG).DefaultArmoryPublicKey=$(ARMORY_PUBLIC_KEY) \
-X $(CLIENT_ASSETS_PKG).DefaultArmoryRepoURL=$(ARMORY_REPO_URL)"
# Debug builds shouldn't be stripped (-s -w flags)
LDFLAGS_DEBUG = -ldflags "-X $(CLIENT_ASSETS_PKG).DefaultArmoryPublicKey=$(ARMORY_PUBLIC_KEY) \
-X $(CLIENT_ASSETS_PKG).DefaultArmoryRepoURL=$(ARMORY_REPO_URL)"
SED_INPLACE := sed -i
STATIC_TARGET := linux
UNAME_S := $(shell uname -s)
UNAME_P := $(shell uname -p)
# If the target is Windows from Linux/Darwin, check for mingw
CROSS_COMPILERS = x86_64-w64-mingw32-gcc x86_64-w64-mingw32-g++
ifneq (,$(findstring cgosqlite,$(TAGS)))
ENV +=CGO_ENABLED=1
ifeq ($(MAKECMDGOALS), windows)
K := $(foreach exec,$(CROSS_COMPILERS),\
$(if $(shell which $(exec)),some string,$(error "Missing cross-compiler $(exec) in PATH")))
ENV += CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++
endif
endif
# Programs required for generating protobuf/grpc files
PB_COMPILERS = protoc protoc-gen-go protoc-gen-go-grpc
ifeq ($(MAKECMDGOALS), pb)
K := $(foreach exec,$(PB_COMPILERS),\
$(if $(shell which $(exec)),some string,$(error "Missing protobuf util $(exec) in PATH")))
endif
# *** Darwin ***
ifeq ($(UNAME_S),Darwin)
SED_INPLACE := sed -i ''
STATIC_TARGET := macos
endif
# If no target is specified, determine GOARCH
ifeq ($(UNAME_P),arm)
ifeq ($(MAKECMDGOALS), )
ENV += GOARCH=arm64
endif
endif
ifeq ($(MAKECMDGOALS), linux)
# Redefine LDFLAGS to add the static part
LDFLAGS = -ldflags "-s -w \
-extldflags '-static' \
-X $(VERSION_PKG).Version=$(VERSION) \
-X \"$(VERSION_PKG).GoVersion=$(GO_VERSION)\" \
-X $(VERSION_PKG).CompiledAt=$(COMPILED_AT) \
-X $(VERSION_PKG).GithubReleasesURL=$(RELEASES_URL) \
-X $(VERSION_PKG).GitCommit=$(GIT_COMMIT) \
-X $(VERSION_PKG).GitDirty=$(GIT_DIRTY) \
-X $(CLIENT_ASSETS_PKG).DefaultArmoryPublicKey=$(ARMORY_PUB_KEY) \
-X $(CLIENT_ASSETS_PKG).DefaultArmoryRepoURL=$(ARMORY_REPO_URL)"
endif
# *** Darwin ***
ifeq ($(UNAME_S),Darwin)
SED_INPLACE := sed -i ''
STATIC_TARGET := macos
endif
# If no target is specified, determine GOARCH
ifeq ($(UNAME_P),arm)
ifeq ($(MAKECMDGOALS), )
ifeq ($(origin GOARCH), undefined)
ENV += GOARCH=arm64
endif
endif
endif
ifeq ($(MAKECMDGOALS), linux)
# Redefine LDFLAGS to add the static part
LDFLAGS = -ldflags "-s -w \
-extldflags '-static' \
-X $(CLIENT_ASSETS_PKG).DefaultArmoryPublicKey=$(ARMORY_PUBLIC_KEY) \
-X $(CLIENT_ASSETS_PKG).DefaultArmoryRepoURL=$(ARMORY_REPO_URL)"
endif
#
# Targets
#
.PHONY: default
default: clean validate-go-version
env -u GOOS -u GOARCH $(MAKE) GOOS= GOARCH= .downloaded_assets
$(ENV) $(if $(GOOS),GOOS=$(GOOS)) $(if $(GOARCH),GOARCH=$(GOARCH)) CGO_ENABLED=$(CGO_ENABLED) $(GO) build -mod=vendor -trimpath $(TAGS),server $(LDFLAGS) -o sliver-server$(ARTIFACT_SUFFIX) ./server
$(ENV) $(if $(GOOS),GOOS=$(GOOS)) $(if $(GOARCH),GOARCH=$(GOARCH)) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client$(ARTIFACT_SUFFIX) ./client
# Allows you to build a CGO-free client for any target e.g. `GOOS=windows GOARCH=arm64 make client`
# NOTE: WireGuard is not supported on all platforms, but most 64-bit GOOS/GOARCH combinations should work.
.PHONY: client
client: clean .downloaded_assets validate-go-version
$(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client ./client
.PHONY: macos-amd64
macos-amd64: clean .downloaded_assets validate-go-version
GOOS=darwin GOARCH=amd64 $(ENV) CGO_ENABLED=$(CGO_ENABLED) $(GO) build -mod=vendor -trimpath $(TAGS),server $(LDFLAGS) -o sliver-server$(ARTIFACT_SUFFIX) ./server
GOOS=darwin GOARCH=amd64 $(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client$(ARTIFACT_SUFFIX) ./client
.PHONY: macos-arm64
macos-arm64: clean .downloaded_assets validate-go-version
GOOS=darwin GOARCH=arm64 $(ENV) CGO_ENABLED=$(CGO_ENABLED) $(GO) build -mod=vendor -trimpath $(TAGS),server $(LDFLAGS) -o sliver-server$(ARTIFACT_SUFFIX) ./server
GOOS=darwin GOARCH=arm64 $(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client$(ARTIFACT_SUFFIX) ./client
.PHONY: linux-amd64
linux-amd64: clean .downloaded_assets validate-go-version
GOOS=linux GOARCH=amd64 $(ENV) CGO_ENABLED=$(CGO_ENABLED) $(GO) build -mod=vendor -trimpath $(TAGS),server $(LDFLAGS) -o sliver-server$(ARTIFACT_SUFFIX) ./server
GOOS=linux GOARCH=amd64 $(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client$(ARTIFACT_SUFFIX) ./client
.PHONY: linux-arm64
linux-arm64: clean .downloaded_assets validate-go-version
GOOS=linux GOARCH=arm64 $(ENV) CGO_ENABLED=$(CGO_ENABLED) $(GO) build -mod=vendor -trimpath $(TAGS),server $(LDFLAGS) -o sliver-server$(ARTIFACT_SUFFIX) ./server
GOOS=linux GOARCH=arm64 $(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client$(ARTIFACT_SUFFIX) ./client
.PHONY: windows-amd64
windows-amd64: clean .downloaded_assets validate-go-version
GOOS=windows GOARCH=amd64 $(ENV) CGO_ENABLED=$(CGO_ENABLED) $(GO) build -mod=vendor -trimpath $(TAGS),server $(LDFLAGS) -o sliver-server$(ARTIFACT_SUFFIX).exe ./server
GOOS=windows GOARCH=amd64 $(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client$(ARTIFACT_SUFFIX).exe ./client
.PHONY: clients
clients: clean .downloaded_assets validate-go-version
GOOS=darwin GOARCH=amd64 $(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client_macos-amd64$(ARTIFACT_SUFFIX) ./client
GOOS=darwin GOARCH=arm64 $(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client_macos-arm64$(ARTIFACT_SUFFIX) ./client
GOOS=linux GOARCH=386 $(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client_linux-386$(ARTIFACT_SUFFIX) ./client
GOOS=linux GOARCH=amd64 $(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client_linux-amd64$(ARTIFACT_SUFFIX) ./client
GOOS=linux GOARCH=arm64 $(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client_linux-arm64$(ARTIFACT_SUFFIX) ./client
GOOS=windows GOARCH=386 $(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client_windows-386$(ARTIFACT_SUFFIX).exe ./client
GOOS=windows GOARCH=amd64 $(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client_windows-amd64$(ARTIFACT_SUFFIX).exe ./client
GOOS=windows GOARCH=arm64 $(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client_windows-arm64$(ARTIFACT_SUFFIX).exe ./client
GOOS=freebsd GOARCH=amd64 $(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client_freebsd-amd64$(ARTIFACT_SUFFIX) ./client
GOOS=freebsd GOARCH=arm64 $(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client_freebsd-arm64$(ARTIFACT_SUFFIX) ./client
.PHONY: servers
servers: clean .downloaded_assets validate-go-version
GOOS=windows GOARCH=amd64 $(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),server $(LDFLAGS) -o sliver-server_windows-amd64$(ARTIFACT_SUFFIX).exe ./server
GOOS=windows GOARCH=arm64 $(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),server $(LDFLAGS) -o sliver-server_windows-arm64$(ARTIFACT_SUFFIX).exe ./server
GOOS=linux GOARCH=amd64 $(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),server $(LDFLAGS) -o sliver-server_linux-amd64$(ARTIFACT_SUFFIX) ./server
GOOS=linux GOARCH=arm64 $(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),server $(LDFLAGS) -o sliver-server_linux-arm64$(ARTIFACT_SUFFIX) ./server
GOOS=darwin GOARCH=arm64 $(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),server $(LDFLAGS) -o sliver-server_darwin-arm64$(ARTIFACT_SUFFIX) ./server
GOOS=darwin GOARCH=amd64 $(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor -trimpath $(TAGS),server $(LDFLAGS) -o sliver-server_darwin-amd64$(ARTIFACT_SUFFIX) ./server
.PHONY: pb
pb:
protoc -I protobuf/ protobuf/commonpb/common.proto --go_out=paths=source_relative:protobuf/
protoc -I protobuf/ protobuf/sliverpb/sliver.proto --go_out=paths=source_relative:protobuf/
protoc -I protobuf/ protobuf/clientpb/client.proto --go_out=paths=source_relative:protobuf/
protoc -I protobuf/ protobuf/dnspb/dns.proto --go_out=paths=source_relative:protobuf/
protoc -I protobuf/ protobuf/rpcpb/services.proto --go_out=paths=source_relative:protobuf/ --go-grpc_out=protobuf/ --go-grpc_opt=paths=source_relative
.PHONY: debug
debug: clean
$(ENV) CGO_ENABLED=$(CGO_ENABLED) $(GO) build -mod=vendor $(TAGS),server $(LDFLAGS_DEBUG) -o sliver-server$(ARTIFACT_SUFFIX) ./server
$(ENV) CGO_ENABLED=0 $(GO) build -mod=vendor $(TAGS),client $(LDFLAGS_DEBUG) -o sliver-client$(ARTIFACT_SUFFIX) ./client
validate-go-version:
@if [ $(GO_MAJOR_VERSION) -gt $(MIN_SUPPORTED_GO_MAJOR_VERSION) ]; then \
exit 0 ;\
elif [ $(GO_MAJOR_VERSION) -lt $(MIN_SUPPORTED_GO_MAJOR_VERSION) ]; then \
echo '$(GO_VERSION_VALIDATION_ERR_MSG)';\
exit 1; \
elif [ $(GO_MINOR_VERSION) -lt $(MIN_SUPPORTED_GO_MINOR_VERSION) ] ; then \
echo '$(GO_VERSION_VALIDATION_ERR_MSG)';\
exit 1; \
fi
.PHONY: clean-all
clean-all: clean
rm -rf ./server/assets/fs/darwin/amd64
rm -rf ./server/assets/fs/darwin/arm64
rm -rf ./server/assets/fs/windows/amd64
rm -rf ./server/assets/fs/linux/amd64
rm -f ./server/assets/fs/*.zip
rm -f ./.downloaded_assets
.PHONY: clean
clean:
rm -f sliver-client sliver-client_* sliver-server sliver-server_* sliver-*.exe
.downloaded_assets:
$(ENV) $(GO) run -mod=vendor ./util/cmd/assets
touch ./.downloaded_assets
#
# Targets
# >>> WINDOWS <<<
#
.PHONY: default
default: clean validate-go-version
$(ENV) $(GO) build -mod=vendor -trimpath $(TAGS),server $(LDFLAGS) -o sliver-server$(ARTIFACT_SUFFIX) ./server
$(ENV) $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client$(ARTIFACT_SUFFIX) ./client
else
.PHONY: macos
macos: clean validate-go-version
GOOS=darwin GOARCH=amd64 $(ENV) $(GO) build -mod=vendor -trimpath $(TAGS),server $(LDFLAGS) -o sliver-server$(ARTIFACT_SUFFIX) ./server
GOOS=darwin GOARCH=amd64 $(ENV) $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client$(ARTIFACT_SUFFIX) ./client
SHELL := cmd.exe
.SHELLFLAGS := /C
.PHONY: macos-arm64
macos-arm64: clean validate-go-version
GOOS=darwin GOARCH=arm64 $(ENV) $(GO) build -mod=vendor -trimpath $(TAGS),server $(LDFLAGS) -o sliver-server$(ARTIFACT_SUFFIX) ./server
GOOS=darwin GOARCH=arm64 $(ENV) $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client$(ARTIFACT_SUFFIX) ./client
GO_VERSION := $(patsubst go%,%,$(strip $(shell $(GO) env GOVERSION)))
GO_MAJOR_VERSION := $(word 1,$(subst ., ,$(GO_VERSION)))
GO_MINOR_VERSION := $(word 2,$(subst ., ,$(GO_VERSION)))
.PHONY: linux
linux: clean validate-go-version
GOOS=linux GOARCH=amd64 $(ENV) $(GO) build -mod=vendor -trimpath $(TAGS),server $(LDFLAGS) -o sliver-server$(ARTIFACT_SUFFIX) ./server
GOOS=linux GOARCH=amd64 $(ENV) $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client$(ARTIFACT_SUFFIX) ./client
LDFLAGS = -ldflags "-s -w -X $(SLIVER_UPDATE_PKG).SliverPublicKey=$(SLIVER_PUBLIC_KEY) -X $(CLIENT_ASSETS_PKG).DefaultArmoryPublicKey=$(ARMORY_PUBLIC_KEY) -X $(CLIENT_ASSETS_PKG).DefaultArmoryRepoURL=$(ARMORY_REPO_URL)"
.PHONY: linux-arm64
linux-arm64: clean validate-go-version
GOOS=linux GOARCH=arm64 $(ENV) $(GO) build -mod=vendor -trimpath $(TAGS),server $(LDFLAGS) -o sliver-server$(ARTIFACT_SUFFIX) ./server
GOOS=linux GOARCH=arm64 $(ENV) $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client$(ARTIFACT_SUFFIX) ./client
LDFLAGS_DEBUG = -ldflags "-X $(CLIENT_ASSETS_PKG).DefaultArmoryPublicKey=$(ARMORY_PUBLIC_KEY) -X $(CLIENT_ASSETS_PKG).DefaultArmoryRepoURL=$(ARMORY_REPO_URL)"
.PHONY: windows
windows: clean validate-go-version
GOOS=windows $(ENV) $(GO) build -mod=vendor -trimpath $(TAGS),server $(LDFLAGS) -o sliver-server$(ARTIFACT_SUFFIX).exe ./server
GOOS=windows $(ENV) $(GO) build -mod=vendor -trimpath $(TAGS),client $(LDFLAGS) -o sliver-client$(ARTIFACT_SUFFIX).exe ./client
.PHONY: pb
pb:
protoc -I protobuf/ protobuf/commonpb/common.proto --go_out=paths=source_relative:protobuf/
protoc -I protobuf/ protobuf/sliverpb/sliver.proto --go_out=paths=source_relative:protobuf/
protoc -I protobuf/ protobuf/clientpb/client.proto --go_out=paths=source_relative:protobuf/
protoc -I protobuf/ protobuf/dnspb/dns.proto --go_out=paths=source_relative:protobuf/
protoc -I protobuf/ protobuf/rpcpb/services.proto --go_out=paths=source_relative:protobuf/ --go-grpc_out=protobuf/ --go-grpc_opt=paths=source_relative
validate-go-version:
@if [ $(GO_MAJOR_VERSION) -gt $(MIN_SUPPORTED_GO_MAJOR_VERSION) ]; then \
exit 0 ;\
elif [ $(GO_MAJOR_VERSION) -lt $(MIN_SUPPORTED_GO_MAJOR_VERSION) ]; then \
echo '$(GO_VERSION_VALIDATION_ERR_MSG)';\
exit 1; \
elif [ $(GO_MINOR_VERSION) -lt $(MIN_SUPPORTED_GO_MINOR_VERSION) ] ; then \
echo '$(GO_VERSION_VALIDATION_ERR_MSG)';\
exit 1; \
fi
.PHONY: clean-all
clean-all: clean
rm -rf ./server/assets/fs/darwin/amd64
rm -rf ./server/assets/fs/darwin/arm64
rm -rf ./server/assets/fs/windows/amd64
rm -rf ./server/assets/fs/linux/amd64
rm -f ./server/assets/fs/*.zip
.PHONY: clean
clean:
rm -f sliver-client sliver-server sliver-*.exe
COMMA := ,
ifeq ($(MAKECMDGOALS), linux)
LDFLAGS = -ldflags "-s -w -extldflags '-static' -X $(CLIENT_ASSETS_PKG).DefaultArmoryPublicKey=$(ARMORY_PUBLIC_KEY) -X $(CLIENT_ASSETS_PKG).DefaultArmoryRepoURL=$(ARMORY_REPO_URL)"
endif
define windows_exec
$(strip $(foreach envvar,$(1),set "$(envvar)" && ))$(2)
endef
define windows_go_build
$(call windows_exec,$(ENV) GOOS=$(1) GOARCH=$(2) CGO_ENABLED=$(3),"$(GO)" build $(4) $(TAGS)$(COMMA)$(5) $(6) -o $(7) ./$(5))
endef
.PHONY: default
default: clean validate-go-version
$(call windows_exec,$(ENV) GOOS= GOARCH=,"$(MAKE)" GOOS= GOARCH= .downloaded_assets)
$(call windows_go_build,$(GOOS),$(GOARCH),$(CGO_ENABLED),-mod=vendor -trimpath,server,$(LDFLAGS),sliver-server$(ARTIFACT_SUFFIX))
$(call windows_go_build,$(GOOS),$(GOARCH),0,-mod=vendor -trimpath,client,$(LDFLAGS),sliver-client$(ARTIFACT_SUFFIX))
.PHONY: client
client: clean .downloaded_assets validate-go-version
$(call windows_go_build,$(GOOS),$(GOARCH),0,-mod=vendor -trimpath,client,$(LDFLAGS),sliver-client)
.PHONY: macos-amd64
macos-amd64: clean .downloaded_assets validate-go-version
$(call windows_go_build,darwin,amd64,$(CGO_ENABLED),-mod=vendor -trimpath,server,$(LDFLAGS),sliver-server$(ARTIFACT_SUFFIX))
$(call windows_go_build,darwin,amd64,0,-mod=vendor -trimpath,client,$(LDFLAGS),sliver-client$(ARTIFACT_SUFFIX))
.PHONY: macos-arm64
macos-arm64: clean .downloaded_assets validate-go-version
$(call windows_go_build,darwin,arm64,$(CGO_ENABLED),-mod=vendor -trimpath,server,$(LDFLAGS),sliver-server$(ARTIFACT_SUFFIX))
$(call windows_go_build,darwin,arm64,0,-mod=vendor -trimpath,client,$(LDFLAGS),sliver-client$(ARTIFACT_SUFFIX))
.PHONY: linux-amd64
linux-amd64: clean .downloaded_assets validate-go-version
$(call windows_go_build,linux,amd64,$(CGO_ENABLED),-mod=vendor -trimpath,server,$(LDFLAGS),sliver-server$(ARTIFACT_SUFFIX))
$(call windows_go_build,linux,amd64,0,-mod=vendor -trimpath,client,$(LDFLAGS),sliver-client$(ARTIFACT_SUFFIX))
.PHONY: linux-arm64
linux-arm64: clean .downloaded_assets validate-go-version
$(call windows_go_build,linux,arm64,$(CGO_ENABLED),-mod=vendor -trimpath,server,$(LDFLAGS),sliver-server$(ARTIFACT_SUFFIX))
$(call windows_go_build,linux,arm64,0,-mod=vendor -trimpath,client,$(LDFLAGS),sliver-client$(ARTIFACT_SUFFIX))
.PHONY: windows-amd64
windows-amd64: clean .downloaded_assets validate-go-version
$(call windows_go_build,windows,amd64,$(CGO_ENABLED),-mod=vendor -trimpath,server,$(LDFLAGS),sliver-server$(ARTIFACT_SUFFIX).exe)
$(call windows_go_build,windows,amd64,0,-mod=vendor -trimpath,client,$(LDFLAGS),sliver-client$(ARTIFACT_SUFFIX).exe)
.PHONY: clients
clients: clean .downloaded_assets validate-go-version
$(call windows_go_build,darwin,amd64,0,-mod=vendor -trimpath,client,$(LDFLAGS),sliver-client_macos-amd64$(ARTIFACT_SUFFIX))
$(call windows_go_build,darwin,arm64,0,-mod=vendor -trimpath,client,$(LDFLAGS),sliver-client_macos-arm64$(ARTIFACT_SUFFIX))
$(call windows_go_build,linux,386,0,-mod=vendor -trimpath,client,$(LDFLAGS),sliver-client_linux-386$(ARTIFACT_SUFFIX))
$(call windows_go_build,linux,amd64,0,-mod=vendor -trimpath,client,$(LDFLAGS),sliver-client_linux-amd64$(ARTIFACT_SUFFIX))
$(call windows_go_build,linux,arm64,0,-mod=vendor -trimpath,client,$(LDFLAGS),sliver-client_linux-arm64$(ARTIFACT_SUFFIX))
$(call windows_go_build,windows,386,0,-mod=vendor -trimpath,client,$(LDFLAGS),sliver-client_windows-386$(ARTIFACT_SUFFIX).exe)
$(call windows_go_build,windows,amd64,0,-mod=vendor -trimpath,client,$(LDFLAGS),sliver-client_windows-amd64$(ARTIFACT_SUFFIX).exe)
$(call windows_go_build,windows,arm64,0,-mod=vendor -trimpath,client,$(LDFLAGS),sliver-client_windows-arm64$(ARTIFACT_SUFFIX).exe)
$(call windows_go_build,freebsd,amd64,0,-mod=vendor -trimpath,client,$(LDFLAGS),sliver-client_freebsd-amd64$(ARTIFACT_SUFFIX))
$(call windows_go_build,freebsd,arm64,0,-mod=vendor -trimpath,client,$(LDFLAGS),sliver-client_freebsd-arm64$(ARTIFACT_SUFFIX))
.PHONY: servers
servers: clean .downloaded_assets validate-go-version
$(call windows_go_build,windows,amd64,0,-mod=vendor -trimpath,server,$(LDFLAGS),sliver-server_windows-amd64$(ARTIFACT_SUFFIX).exe)
$(call windows_go_build,windows,arm64,0,-mod=vendor -trimpath,server,$(LDFLAGS),sliver-server_windows-arm64$(ARTIFACT_SUFFIX).exe)
$(call windows_go_build,linux,amd64,0,-mod=vendor -trimpath,server,$(LDFLAGS),sliver-server_linux-amd64$(ARTIFACT_SUFFIX))
$(call windows_go_build,linux,arm64,0,-mod=vendor -trimpath,server,$(LDFLAGS),sliver-server_linux-arm64$(ARTIFACT_SUFFIX))
$(call windows_go_build,darwin,arm64,0,-mod=vendor -trimpath,server,$(LDFLAGS),sliver-server_darwin-arm64$(ARTIFACT_SUFFIX))
$(call windows_go_build,darwin,amd64,0,-mod=vendor -trimpath,server,$(LDFLAGS),sliver-server_darwin-amd64$(ARTIFACT_SUFFIX))
.PHONY: pb
pb: validate-pb-compilers
protoc -I protobuf/ protobuf/commonpb/common.proto --go_out=paths=source_relative:protobuf/
protoc -I protobuf/ protobuf/sliverpb/sliver.proto --go_out=paths=source_relative:protobuf/
protoc -I protobuf/ protobuf/clientpb/client.proto --go_out=paths=source_relative:protobuf/
protoc -I protobuf/ protobuf/dnspb/dns.proto --go_out=paths=source_relative:protobuf/
protoc -I protobuf/ protobuf/rpcpb/services.proto --go_out=paths=source_relative:protobuf/ --go-grpc_out=protobuf/ --go-grpc_opt=paths=source_relative
.PHONY: debug
debug: clean
$(call windows_go_build,$(GOOS),$(GOARCH),$(CGO_ENABLED),-mod=vendor,server,$(LDFLAGS_DEBUG),sliver-server$(ARTIFACT_SUFFIX))
$(call windows_go_build,$(GOOS),$(GOARCH),0,-mod=vendor,client,$(LDFLAGS_DEBUG),sliver-client$(ARTIFACT_SUFFIX))
.PHONY: validate-pb-compilers
validate-pb-compilers:
@for %%P in ($(PB_COMPILERS)) do @where.exe %%P >NUL || (echo Missing protobuf util %%P in PATH & exit /b 1)
validate-go-version:
@if $(GO_MAJOR_VERSION) GTR $(MIN_SUPPORTED_GO_MAJOR_VERSION) (exit /b 0) else if $(GO_MAJOR_VERSION) LSS $(MIN_SUPPORTED_GO_MAJOR_VERSION) (echo $(GO_VERSION_VALIDATION_ERR_MSG) & exit /b 1) else if $(GO_MINOR_VERSION) LSS $(MIN_SUPPORTED_GO_MINOR_VERSION) (echo $(GO_VERSION_VALIDATION_ERR_MSG) & exit /b 1)
.PHONY: clean-all
clean-all: clean
-rmdir /S /Q server\assets\fs\darwin\amd64
-rmdir /S /Q server\assets\fs\darwin\arm64
-rmdir /S /Q server\assets\fs\windows\amd64
-rmdir /S /Q server\assets\fs\linux\amd64
-del /Q /F server\assets\fs\*.zip 2>NUL
-del /Q /F .downloaded_assets 2>NUL
.PHONY: clean
clean:
-del /Q /F sliver-client sliver-client_* sliver-server sliver-server_* sliver-*.exe 2>NUL
.downloaded_assets:
$(call windows_exec,$(ENV),"$(GO)" run -mod=vendor ./util/cmd/assets)
@type NUL > .downloaded_assets
endif
+21 -25
View File
@@ -1,32 +1,33 @@
Sliver
======
# Sliver
Sliver is an open source cross-platform adversary emulation/red team framework, it can be used by organizations of all sizes to perform security testing. Sliver's implants support C2 over Mutual TLS (mTLS), WireGuard, HTTP(S), and DNS and are dynamically compiled with per-binary asymmetric encryption keys.
The server and client support MacOS, Windows, and Linux. Implants are supported on MacOS, Windows, and Linux (and possibly every Golang compiler target but we've not tested them all).
![Go](https://github.com/BishopFox/sliver/workflows/Go/badge.svg?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/BishopFox/sliver)](https://goreportcard.com/report/github.com/BishopFox/sliver) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Release](https://github.com/BishopFox/sliver/actions/workflows/autorelease.yml/badge.svg)](https://github.com/BishopFox/sliver/actions/workflows/autorelease.yml) [![Go Report Card](https://goreportcard.com/badge/github.com/BishopFox/sliver)](https://goreportcard.com/report/github.com/BishopFox/sliver) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
Visit [https://sliver.sh/](https://sliver.sh/) for tutorials and documentation.
### Features
* Dynamic code generation
* Compile-time obfuscation
* Multiplayer-mode
* Staged and Stageless payloads
* [Procedurally generated C2](https://github.com/BishopFox/sliver/wiki/HTTP(S)-C2#under-the-hood) over HTTP(S)
* [DNS canary](https://github.com/BishopFox/sliver/wiki/DNS-C2#dns-canaries) blue team detection
* [Secure C2](https://github.com/BishopFox/sliver/wiki/Transport-Encryption) over mTLS, WireGuard, HTTP(S), and DNS
* Fully scriptable using [JavaScript/TypeScript](https://github.com/moloch--/sliver-script) or [Python](https://github.com/moloch--/sliver-py)
* Windows process migration, process injection, user token manipulation, etc.
* Let's Encrypt integration
* In-memory .NET assembly execution
* COFF/BOF in-memory loader
* TCP and named pipe pivots
* Much more!
- Dynamic code generation
- Compile-time obfuscation
- Multiplayer-mode
- Staged and Stageless payloads
- [Procedurally generated C2](https://sliver.sh/docs?name=HTTPS+C2) over HTTP(S)
- [DNS canary](https://sliver.sh/docs?name=DNS+C2) blue team detection
- [Secure C2](https://sliver.sh/docs?name=Transport+Encryption) over mTLS, WireGuard, HTTP(S), and DNS
- Fully scriptable using [Python](https://github.com/moloch--/sliver-py)
- Windows process migration, process injection, user token manipulation, etc.
- Let's Encrypt integration
- In-memory .NET assembly execution
- COFF/BOF in-memory loader
- TCP and named pipe pivots
- Much more!
### Getting Started
Download the latest [release](https://github.com/BishopFox/sliver/releases) and see the Sliver [wiki](https://github.com/BishopFox/sliver/wiki/Getting-Started) for a quick tutorial on basic setup and usage. To get the very latest and greatest compile from source.
Download the latest [release](https://github.com/BishopFox/sliver/releases) and see the Sliver [wiki](https://sliver.sh/docs?name=Getting+Started) for a quick tutorial on basic setup and usage. To get the very latest and greatest compile from source.
#### Linux One Liner
@@ -34,17 +35,12 @@ Download the latest [release](https://github.com/BishopFox/sliver/releases) and
### Help!
Please checkout the [wiki](https://github.com/BishopFox/sliver/wiki), or start a [GitHub discussion](https://github.com/BishopFox/sliver/discussions). We also tend to hang out in the #golang Slack channel on the [Bloodhound Gang](https://bloodhoundgang.herokuapp.com/) server.
Please checkout the [wiki](https://sliver.sh/), or start a [GitHub discussion](https://github.com/BishopFox/sliver/discussions).
### Compile From Source
See the [wiki](https://github.com/BishopFox/sliver/wiki/Compile-From-Source).
### Feedback
Please take a moment and fill out [our survey](https://forms.gle/SwVsHFNh24ChG58C6)
See the [wiki](https://sliver.sh/docs?name=Compile+from+Source).
### License - GPLv3
Sliver is licensed under [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html), some sub-components may have separate licenses. See their respective subdirectories in this project for details.
+1 -1
View File
@@ -15,4 +15,4 @@ Anything in the `master` branch, without an open ticket.
### Reporting a Vulnerability
Please report high and/or critical vulnerabilities via email `jdemesy<[a]>bishopfox.com`, if no response within 14 days, file a ticket with a `security` tag. Medium to Low risk vulnerabilities can simply be filed as a normal bug/issue with the `security` tag.
Please report high and/or critical vulnerabilities via GitHub's private [report a vulnerability feature](https://github.com/BishopFox/sliver/security/advisories).
-118
View File
@@ -1,118 +0,0 @@
#!/usr/bin/env python
"""
Sliver Implant Framework
Copyright (C) 2019 Bishop Fox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
import os
import sys
import argparse
try:
input = raw_input # Py2 / Py3 compatability
except NameError:
pass
INFO = "\033[1m\033[36m[*]\033[0m "
WARN = "\033[1m\033[31m[!]\033[0m "
BOLD = "\033[1m"
NORM = "\033[0m"
def exec_cmd(cmd, ignore_status=False):
""" Executes a command with some sugar """
print("\n" + INFO + " %s\n" % cmd)
status = os.system(cmd)
if status != 0 and not ignore_status:
print("\n" + WARN + "Command did not exit cleanly (%s) " % status)
if input("continue? [Y/n]: ").upper() != 'Y':
sys.exit(status)
return status
def docker_rm_volumes():
exec_cmd("docker volume rm $(docker volume ls -q)", ignore_status=True)
def docker_rm_containers():
exec_cmd("docker rm $(docker ps -a -q)", ignore_status=True)
def docker_rm_images():
exec_cmd("docker rmi -f $(docker images -q)", ignore_status=True)
def docker_prune():
exec_cmd("docker image prune -f", ignore_status=True)
def docker_rm_all():
docker_rm_containers()
docker_rm_images()
docker_rm_volumes()
def build():
status = exec_cmd("docker build -t sliver .")
if status == 0:
print(INFO+"Build successful, start with %sdocker run -it sliver:latest%s" % (BOLD, NORM))
print(INFO+"Remember you'll need to manually forward network ports")
def main(args):
""" Execute the respective task(s) based on cli args """
if args.rm_images:
docker_rm_images()
if args.rm_containers:
docker_rm_containers()
if args.rm_volumes:
docker_rm_volumes()
if args.rm_all:
docker_rm_all()
if not args.no_prune:
docker_prune()
if not args.no_build:
build()
if __name__ == '__main__':
parser = argparse.ArgumentParser(
description='automates interactions with docker')
parser.add_argument('--no-build', '-b',
help='do not run build',
dest='no_build',
action='store_true')
parser.add_argument('--no-prune', '-np',
help='do not prune images',
dest='no_prune',
action='store_true')
parser.add_argument('--rm-all', '-rma',
help='rm all containers, images, and volumes',
dest='rm_all',
action='store_true')
parser.add_argument('--rm-containers', '-rmc',
help='rm all containers',
dest='rm_containers',
action='store_true')
parser.add_argument('--rm-images', '-rmi',
help='rm all images',
dest='rm_images',
action='store_true')
parser.add_argument('--rm-volumes', '-rmv',
help='rm dangling volumes only',
dest='rm_volumes',
action='store_true')
try:
main(parser.parse_args())
except KeyboardInterrupt:
print("\n\n" + WARN + "User stopped process")
+23 -15
View File
@@ -1,18 +1,26 @@
Client
=======
# client
This directory contains the client implementation, pretty much all of this code is also used by the server console.
## Overview
__Important:__ No code in this directory can import any code from `server/`.
Main command-line client for interacting with and administering Sliver servers. Provides the Cobra entrypoint and aggregates console, command, and transport subsystems.
* `assets/` - Static asset files and management code (e.g. client configs)
* `cli/` - Command line interface implementation
* `command/` - Console command implementations
* `constants/` - Various shared constant values
* `core/` - Client state management
* `licenses/` - Open source licenses
* `spin/` - Console spinner library
* `tcpproxy/` - Local TCP proxy listener code
* `transport/` - Wires the client to the server
* `version/` - Version information
* `main.go` - Entrypoint
## Go Files
- `main.go` – Entry point that initializes the CLI, processes flags, and launches the interactive console.
## Sub-packages
- `assets/` – Manages embedded client asset manifests such as operator profiles, settings, and armory catalogs. Handles serialization, bundling, and lookup of static client metadata.
- `cli/` – Defines the Cobra root command and CLI initialization for the Sliver client binary. Sets up persistent flags, environment bootstrapping, and command wiring.
- `command/` – Shared registration glue, scaffolding, and helpers for Sliver client console command groups. Hosts common utilities for binding Cobra commands to RPC-backed actions.
- `console/` – Renders the interactive console UI, logging, and terminal helpers for the client. Coordinates readline behavior, prompt styling, and message formatting.
- `constants/` – Centralizes constants shared across the client runtime and command packages. Captures strings, flag names, and feature toggles used throughout the CLI.
- `core/` – Maintains client application state, background workers, and RPC coordination. Orchestrates session tracking, event streams, and health checks.
- `credentials/` – Credential management utilities including sniffers and import helpers for operators. Provides parsers, storage helpers, and output formatting for recovered secrets.
- `licenses/` – Holds embedded license metadata bundled with the client distribution. Supplies license retrieval utilities used for attribution commands.
- `overlord/` – Supervises long-running client jobs, scheduling, and task orchestration. Tracks job lifecycle events and exposes status updates to the console.
- `packages/` – Deals with packaged extensions and module discovery for the client. Scans, validates, and caches extension manifests and assets.
- `spin/` – Lightweight terminal spinner utilities used for progress feedback. Wraps spinner styles and timing helpers shared across commands.
- `tcpproxy/` – Implements the local TCP proxy used for port forwarding from the client side. Manages listener lifecycles, connection pumps, and cleanup hooks.
- `transport/` – Client-side transports and RPC wiring to communicate with Sliver servers. Builds authenticated gRPC clients, TLS dialers, and reconnect logic.
- `version/` – Build-time version and semantic metadata for the client binary. Exposes git information, release channels, and helper formatters.
+14 -2
View File
@@ -1,3 +1,15 @@
Assets
======
# client/assets
## Overview
Manages embedded client asset manifests such as operator profiles, settings, and armory catalogs. Handles serialization, bundling, and lookup of static client metadata. Core logic addresses aliases, armories, C2 profiles, and extensions within the assets package.
## Go Files
- `aliases.go` – Provides helpers for discovering, installing, and reading alias manifests shipped with the client.
- `armories.go` – Loads configured armory definitions and persists operator customizations.
- `assets.go` – Central entry point that exposes asset directories, lazy initialization, and filesystem utilities.
- `c2profiles.go` – Embeds default HTTP C2 profile templates and exposes lookup utilities.
- `config.go` – Tracks client configuration paths and manages persistence of runtime options.
- `extensions.go` – Handles embedded extension manifests and supports lookup by command name.
- `settings.go` – Stores default console settings and manages serialization to disk.
+1 -2
View File
@@ -19,7 +19,6 @@ package assets
*/
import (
"io/ioutil"
"log"
"os"
"path/filepath"
@@ -45,7 +44,7 @@ func GetAliasesDir() string {
// GetInstalledAliasManifests - Returns a list of installed alias manifests
func GetInstalledAliasManifests() []string {
aliasDir := GetAliasesDir()
aliasDirContent, err := ioutil.ReadDir(aliasDir)
aliasDirContent, err := os.ReadDir(aliasDir)
if err != nil {
log.Printf("error loading aliases: %s", err)
return []string{}
+58 -20
View File
@@ -20,7 +20,6 @@ package assets
import (
"encoding/json"
"io/ioutil"
"log"
"os"
"os/exec"
@@ -28,7 +27,8 @@ import (
)
const (
armoryConfigFileName = "armories.json"
ArmoryConfigFileName = "armories.json"
DefaultArmoryName = "Default"
)
var (
@@ -37,9 +37,11 @@ var (
// DefaultArmoryRepoURL - The default repo url for the armory
DefaultArmoryRepoURL string
defaultArmoryConfig = &ArmoryConfig{
DefaultArmoryConfig = &ArmoryConfig{
PublicKey: DefaultArmoryPublicKey,
RepoURL: DefaultArmoryRepoURL,
Name: DefaultArmoryName,
Enabled: true,
}
)
@@ -49,29 +51,65 @@ type ArmoryConfig struct {
RepoURL string `json:"repo_url"`
Authorization string `json:"authorization"`
AuthorizationCmd string `json:"authorization_cmd"`
Name string `json:"name"`
Enabled bool `json:"enabled"`
}
// GetArmoriesConfig - The parsed armory config file
func GetArmoriesConfig() []*ArmoryConfig {
armoryConfigPath := filepath.Join(GetRootAppDir(), armoryConfigFileName)
if _, err := os.Stat(armoryConfigPath); os.IsNotExist(err) {
return []*ArmoryConfig{defaultArmoryConfig}
}
data, err := ioutil.ReadFile(armoryConfigPath)
if err != nil {
return []*ArmoryConfig{defaultArmoryConfig}
}
var armoryConfigs []*ArmoryConfig
err = json.Unmarshal(data, &armoryConfigs)
if err != nil {
return []*ArmoryConfig{defaultArmoryConfig}
}
for _, armoryConfig := range armoryConfigs {
func RefreshArmoryAuthorization(armories []*ArmoryConfig) {
for _, armoryConfig := range armories {
if armoryConfig.AuthorizationCmd != "" {
armoryConfig.Authorization = executeAuthorizationCmd(armoryConfig)
}
}
return append(armoryConfigs, defaultArmoryConfig)
}
// GetArmoriesConfig - The parsed armory config file
func GetArmoriesConfig() []*ArmoryConfig {
armoryConfigPath := filepath.Join(GetRootAppDir(), ArmoryConfigFileName)
if _, err := os.Stat(armoryConfigPath); os.IsNotExist(err) {
return []*ArmoryConfig{DefaultArmoryConfig}
}
data, err := os.ReadFile(armoryConfigPath)
if err != nil {
return []*ArmoryConfig{DefaultArmoryConfig}
}
var armoryConfigsFromFile []*ArmoryConfig
var armoryConfigs []*ArmoryConfig
err = json.Unmarshal(data, &armoryConfigsFromFile)
if err != nil {
return []*ArmoryConfig{DefaultArmoryConfig}
}
// Force the default armory to be the last
defaultArmorySpecified := false
for _, config := range armoryConfigsFromFile {
if config.Name == DefaultArmoryName {
defaultArmorySpecified = true
continue
} else {
armoryConfigs = append(armoryConfigs, config)
}
}
if defaultArmorySpecified {
armoryConfigs = append(armoryConfigs, DefaultArmoryConfig)
}
RefreshArmoryAuthorization(armoryConfigs)
return armoryConfigs
}
func SaveArmoriesConfig(armories []*ArmoryConfig) error {
configData, err := json.Marshal(armories)
if err != nil {
return err
}
armoryConfigPath := filepath.Join(GetRootAppDir(), ArmoryConfigFileName)
err = os.WriteFile(armoryConfigPath, configData, 0640)
if err != nil {
return err
}
return nil
}
func executeAuthorizationCmd(armoryConfig *ArmoryConfig) string {
+49 -8
View File
@@ -20,7 +20,6 @@ package assets
import (
"fmt"
"io/ioutil"
"log"
"os"
"os/user"
@@ -35,12 +34,19 @@ const (
SliverClientDirName = ".sliver-client"
versionFileName = "version"
envVarName = "SLIVER_CLIENT_ROOT_DIR"
)
// GetRootAppDir - Get the Sliver app dir ~/.sliver-client/
func GetRootAppDir() string {
user, _ := user.Current()
dir := filepath.Join(user.HomeDir, SliverClientDirName)
value := os.Getenv(envVarName)
var dir string
if len(value) == 0 {
user, _ := user.Current()
dir = filepath.Join(user.HomeDir, SliverClientDirName)
} else {
dir = value
}
if _, err := os.Stat(dir); os.IsNotExist(err) {
err = os.MkdirAll(dir, 0700)
if err != nil {
@@ -50,9 +56,45 @@ func GetRootAppDir() string {
return dir
}
// GetClientLogsDir - Get the Sliver client logs dir ~/.sliver-client/logs/
func GetClientLogsDir() string {
logsDir := filepath.Join(GetRootAppDir(), "logs")
if _, err := os.Stat(logsDir); os.IsNotExist(err) {
err = os.MkdirAll(logsDir, 0700)
if err != nil {
log.Fatal(err)
}
}
return logsDir
}
// GetConsoleLogsDir - Get the Sliver client console logs dir ~/.sliver-client/logs/console/
func GetConsoleLogsDir() string {
consoleLogsDir := filepath.Join(GetClientLogsDir(), "console")
if _, err := os.Stat(consoleLogsDir); os.IsNotExist(err) {
err = os.MkdirAll(consoleLogsDir, 0700)
if err != nil {
log.Fatal(err)
}
}
return consoleLogsDir
}
// GetMCPLogsDir - Get the Sliver client MCP logs dir ~/.sliver-client/logs/mcp/
func GetMCPLogsDir() string {
mcpLogsDir := filepath.Join(GetClientLogsDir(), "mcp")
if _, err := os.Stat(mcpLogsDir); os.IsNotExist(err) {
err = os.MkdirAll(mcpLogsDir, 0700)
if err != nil {
log.Fatal(err)
}
}
return mcpLogsDir
}
func assetVersion() string {
appDir := GetRootAppDir()
data, err := ioutil.ReadFile(filepath.Join(appDir, versionFileName))
data, err := os.ReadFile(filepath.Join(appDir, versionFileName))
if err != nil {
return ""
}
@@ -73,7 +115,7 @@ func Setup(force bool, echo bool) {
if force || localVer == "" || localVer != ver.GitCommit {
if echo {
fmt.Printf(`
Sliver Copyright (C) 2022 Bishop Fox
Sliver Copyright (C) 2026 Bishop Fox
This program comes with ABSOLUTELY NO WARRANTY; for details type 'licenses'.
This is free software, and you are welcome to redistribute it
under certain conditions; type 'licenses' for details.`)
@@ -81,7 +123,6 @@ under certain conditions; type 'licenses' for details.`)
}
saveAssetVersion(appDir)
}
if _, err := os.Stat(filepath.Join(appDir, settingsFileName)); os.IsNotExist(err) {
SaveSettings(nil)
}
_, _ = LoadSettings()
_, _ = LoadSpoofMetadataConfig()
}
+73
View File
@@ -0,0 +1,73 @@
package assets
/*
Sliver Implant Framework
Copyright (C) 2019 Bishop Fox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// HTTPC2Config - Parent config file struct for implant/server
type HTTPC2Config struct {
ImplantConfig HTTPC2ImplantConfig `json:"implant_config"`
ServerConfig HTTPC2ServerConfig `json:"server_config"`
}
// HTTPC2ServerConfig - Server configuration options
type HTTPC2ServerConfig struct {
RandomVersionHeaders bool `json:"random_version_headers"`
Headers []NameValueProbability `json:"headers"`
Cookies []string `json:"cookies"`
}
type NameValueProbability struct {
Name string `json:"name"`
Value string `json:"value"`
Probability int `json:"probability"`
Method string `json:"method"`
}
// HTTPC2ImplantConfig - Implant configuration options
// Procedural C2
// ===============
// .txt = rsakey
// .css = start
// .php = session
//
// .js = poll
//
// .png = stop
// .woff = sliver shellcode
type HTTPC2ImplantConfig struct {
UserAgent string `json:"user_agent"`
ChromeBaseVersion int `json:"chrome_base_version"`
MacOSVersion string `json:"macos_version"`
NonceQueryArgChars string `json:"nonce_query_args"`
URLParameters []NameValueProbability `json:"url_parameters"`
Headers []NameValueProbability `json:"headers"`
NonceQueryLength int `json:"nonce_query_length"`
NonceMode string `json:"nonce_mode"`
MaxFileGen int `json:"max_files"`
MinFileGen int `json:"min_files"`
MaxPathGen int `json:"max_paths"`
MinPathGen int `json:"min_paths"`
MaxPathLength int `json:"max_path_length"`
MinPathLength int `json:"min_path_length"`
Extensions []string `json:"extensions"`
Files []string `json:"files"`
Paths []string `json:"paths"`
}
+24 -15
View File
@@ -23,10 +23,9 @@ import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"io"
"log"
"os"
"path"
"path/filepath"
)
@@ -35,15 +34,25 @@ const (
ConfigDirName = "configs"
)
// ClientWGConfig - Optional WireGuard wrapper configuration for multiplayer.
type ClientWGConfig struct {
ServerPubKey string `json:"server_pub_key"`
ClientPrivateKey string `json:"client_private_key"`
ClientPubKey string `json:"client_pub_key"`
ClientIP string `json:"client_ip"`
ServerIP string `json:"server_ip"`
}
// ClientConfig - Client JSON config
type ClientConfig struct {
Operator string `json:"operator"` // This value is actually ignored for the most part (cert CN is used instead)
LHost string `json:"lhost"`
LPort int `json:"lport"`
Token string `json:"token"`
CACertificate string `json:"ca_certificate"`
PrivateKey string `json:"private_key"`
Certificate string `json:"certificate"`
Operator string `json:"operator"` // This value is actually ignored for the most part (cert CN is used instead)
LHost string `json:"lhost"`
LPort int `json:"lport"`
Token string `json:"token"`
CACertificate string `json:"ca_certificate"`
PrivateKey string `json:"private_key"`
Certificate string `json:"certificate"`
WG *ClientWGConfig `json:"wg,omitempty"`
}
// GetConfigDir - Returns the path to the config dir
@@ -51,7 +60,7 @@ func GetConfigDir() string {
rootDir, _ := filepath.Abs(GetRootAppDir())
dir := filepath.Join(rootDir, ConfigDirName)
if _, err := os.Stat(dir); os.IsNotExist(err) {
err = os.MkdirAll(dir, 0700)
err = os.MkdirAll(dir, 0o700)
if err != nil {
log.Fatal(err)
}
@@ -62,7 +71,7 @@ func GetConfigDir() string {
// GetConfigs - Returns a list of available configs
func GetConfigs() map[string]*ClientConfig {
configDir := GetConfigDir()
configFiles, err := ioutil.ReadDir(configDir)
configFiles, err := os.ReadDir(configDir)
if err != nil {
log.Printf("No configs found %v", err)
return map[string]*ClientConfig{}
@@ -70,8 +79,8 @@ func GetConfigs() map[string]*ClientConfig {
confs := map[string]*ClientConfig{}
for _, confFile := range configFiles {
confFilePath := path.Join(configDir, confFile.Name())
log.Printf("Parsing config %s", confFilePath)
confFilePath := filepath.Join(configDir, confFile.Name())
// log.Printf("Parsing config %s", confFilePath)
conf, err := ReadConfig(confFilePath)
if err != nil {
@@ -91,7 +100,7 @@ func ReadConfig(confFilePath string) (*ClientConfig, error) {
return nil, err
}
defer confFile.Close()
data, err := ioutil.ReadAll(confFile)
data, err := io.ReadAll(confFile)
if err != nil {
log.Printf("Read failed %v", err)
return nil, err
@@ -114,7 +123,7 @@ func SaveConfig(config *ClientConfig) error {
filename := fmt.Sprintf("%s_%s.cfg", filepath.Base(config.Operator), filepath.Base(config.LHost))
saveTo, _ := filepath.Abs(filepath.Join(configDir, filename))
configJSON, _ := json.Marshal(config)
err := ioutil.WriteFile(saveTo, configJSON, 0600)
err := os.WriteFile(saveTo, configJSON, 0o600)
if err != nil {
log.Printf("Failed to write config to: %s (%v)", saveTo, err)
return err
+1 -2
View File
@@ -19,7 +19,6 @@ package assets
*/
import (
"io/ioutil"
"log"
"os"
"path/filepath"
@@ -46,7 +45,7 @@ func GetExtensionsDir() string {
// GetInstalledExtensionManifests - Returns a list of installed extension manifests
func GetInstalledExtensionManifests() []string {
extDir := GetExtensionsDir()
extDirContent, err := ioutil.ReadDir(extDir)
extDirContent, err := os.ReadDir(extDir)
if err != nil {
log.Printf("error loading aliases: %s", err)
return []string{}
+27
View File
@@ -0,0 +1,27 @@
package assets
import (
"os"
"path/filepath"
"strings"
)
func legacyBackupPath(legacyPath string) string {
dir := filepath.Dir(legacyPath)
base := filepath.Base(legacyPath)
name := strings.TrimSuffix(base, filepath.Ext(base))
return filepath.Join(dir, "."+name+".json-old")
}
func renameLegacyConfig(legacyPath string) error {
if _, err := os.Stat(legacyPath); os.IsNotExist(err) {
return nil
}
backupPath := legacyBackupPath(legacyPath)
if _, err := os.Stat(backupPath); err == nil {
if err := os.Remove(backupPath); err != nil {
return err
}
}
return os.Rename(legacyPath, backupPath)
}
+95 -16
View File
@@ -20,39 +20,113 @@ package assets
import (
"encoding/json"
"io/ioutil"
"os"
"path/filepath"
"strings"
"gopkg.in/yaml.v3"
)
const (
settingsFileName = "tui-settings.json"
settingsFileName = "tui-settings.yaml"
settingsLegacyFileName = "tui-settings.json"
)
const (
// Accepted values for tui-settings.yaml "prompt:":
// - host: show "[host]" prefix on sliver-client, "[server]" on server console
// - operator-host: show "[operator@host]" prefix on sliver-client, "[server]" on server console
// - basic: show "sliver >" (no prefix)
// - custom: render full prompt from prompt_template
PromptStyleHost = "host"
PromptStyleOperatorHost = "operator-host"
PromptStyleBasic = "basic"
PromptStyleCustom = "custom"
)
// ClientSettings - Client JSON config
type ClientSettings struct {
TableStyle string `json:"tables"`
AutoAdult bool `json:"autoadult"`
BeaconAutoResults bool `json:"beacon_autoresults"`
SmallTermWidth int `json:"small_term_width"`
AlwaysOverflow bool `json:"always_overflow"`
VimMode bool `json:"vim_mode"`
TableStyle string `json:"tables" yaml:"tables"`
AutoAdult bool `json:"autoadult" yaml:"autoadult"`
BeaconAutoResults bool `json:"beacon_autoresults" yaml:"beacon_autoresults"`
SmallTermWidth int `json:"small_term_width" yaml:"small_term_width"`
AlwaysOverflow bool `json:"always_overflow" yaml:"always_overflow"`
VimMode bool `json:"vim_mode" yaml:"vim_mode"`
UserConnect bool `json:"user_connect" yaml:"user_connect"`
ConsoleLogs bool `json:"console_logs" yaml:"console_logs"`
PromptStyle string `json:"prompt" yaml:"prompt"`
PromptTemplate string `json:"prompt_template" yaml:"prompt_template"`
}
// LoadSettings - Load the client settings from disk
func LoadSettings() (*ClientSettings, error) {
rootDir, _ := filepath.Abs(GetRootAppDir())
data, err := ioutil.ReadFile(filepath.Join(rootDir, settingsFileName))
if err != nil {
settingsPath := filepath.Join(rootDir, settingsFileName)
legacyPath := filepath.Join(rootDir, settingsLegacyFileName)
settings := defaultSettings()
migratedLegacy := false
data, err := os.ReadFile(settingsPath)
if err == nil {
if err = yaml.Unmarshal(data, settings); err != nil {
return defaultSettings(), err
}
} else if !os.IsNotExist(err) {
return defaultSettings(), err
} else if data, err = os.ReadFile(legacyPath); err == nil {
if err = json.Unmarshal(data, settings); err != nil {
return defaultSettings(), err
}
migratedLegacy = true
} else if !os.IsNotExist(err) {
return defaultSettings(), err
}
settings := defaultSettings()
err = json.Unmarshal(data, settings)
if err != nil {
return defaultSettings(), err
// Ensure any missing/unknown values are coerced to a supported prompt style.
settings.PromptStyle = NormalizePromptStyle(settings.PromptStyle)
if err := SaveSettings(settings); err != nil {
return settings, err
}
if migratedLegacy {
if err := renameLegacyConfig(legacyPath); err != nil {
return settings, err
}
}
return settings, nil
}
// NormalizePromptStyle canonicalizes prompt style strings and returns a safe
// default if the value is empty/unknown.
func NormalizePromptStyle(v string) string {
switch strings.ToLower(strings.TrimSpace(v)) {
case PromptStyleOperatorHost:
return PromptStyleOperatorHost
case PromptStyleHost:
return PromptStyleHost
case PromptStyleBasic:
return PromptStyleBasic
case PromptStyleCustom:
return PromptStyleCustom
// Backward compatible aliases.
case "show host":
return PromptStyleHost
case "show user and host":
return PromptStyleOperatorHost
case "show operator and host":
return PromptStyleOperatorHost
case "operator@host":
return PromptStyleOperatorHost
case "user@host":
return PromptStyleOperatorHost
case "":
return PromptStyleHost
default:
return PromptStyleHost
}
}
func defaultSettings() *ClientSettings {
return &ClientSettings{
TableStyle: "SliverDefault",
@@ -61,19 +135,24 @@ func defaultSettings() *ClientSettings {
SmallTermWidth: 170,
AlwaysOverflow: false,
VimMode: false,
ConsoleLogs: true,
PromptStyle: PromptStyleHost,
PromptTemplate: DefaultPromptTemplate,
}
}
const DefaultPromptTemplate = `{{- if .IsServer -}}{{ .Styles.Bold.Render "[server]" }} {{ .Styles.Underline.Render "sliver" }}{{ .Target.Suffix }} > {{- else -}}{{- if .Host -}}{{ .Styles.BoldPrimary.Render (printf "[%s]" .Host) }} {{- end -}}{{ .Styles.Underline.Render "sliver" }}{{ .Target.Suffix }} > {{- end -}}`
// SaveSettings - Save the current settings to disk
func SaveSettings(settings *ClientSettings) error {
rootDir, _ := filepath.Abs(GetRootAppDir())
if settings == nil {
settings = defaultSettings()
}
data, err := json.MarshalIndent(settings, "", " ")
data, err := yaml.Marshal(settings)
if err != nil {
return err
}
err = ioutil.WriteFile(filepath.Join(rootDir, settingsFileName), data, 0600)
err = os.WriteFile(filepath.Join(rootDir, settingsFileName), data, 0o600)
return err
}
+137
View File
@@ -0,0 +1,137 @@
package assets
import (
"encoding/json"
"os"
"path/filepath"
"testing"
)
func TestLoadSettingsParsesYAML(t *testing.T) {
t.Setenv(envVarName, t.TempDir())
rootDir, _ := filepath.Abs(GetRootAppDir())
settingsPath := filepath.Join(rootDir, settingsFileName)
data := []byte(`tables: "Compact"
autoadult: true
beacon_autoresults: false
small_term_width: 120
always_overflow: true
vim_mode: true
user_connect: true
console_logs: false
prompt: "basic"
prompt_template: "{{.Host}}"
`)
if err := os.WriteFile(settingsPath, data, 0o600); err != nil {
t.Fatalf("failed to write yaml settings: %v", err)
}
settings, err := LoadSettings()
if err != nil {
t.Fatalf("expected no error, got %v", err)
}
if settings.TableStyle != "Compact" {
t.Fatalf("expected TableStyle %q, got %q", "Compact", settings.TableStyle)
}
if !settings.AutoAdult {
t.Fatalf("expected AutoAdult true")
}
if settings.BeaconAutoResults {
t.Fatalf("expected BeaconAutoResults false")
}
if settings.SmallTermWidth != 120 {
t.Fatalf("expected SmallTermWidth %d, got %d", 120, settings.SmallTermWidth)
}
if !settings.AlwaysOverflow {
t.Fatalf("expected AlwaysOverflow true")
}
if !settings.VimMode {
t.Fatalf("expected VimMode true")
}
if !settings.UserConnect {
t.Fatalf("expected UserConnect true")
}
if settings.ConsoleLogs {
t.Fatalf("expected ConsoleLogs false")
}
if settings.PromptStyle != PromptStyleBasic {
t.Fatalf("expected PromptStyle %q, got %q", PromptStyleBasic, settings.PromptStyle)
}
if settings.PromptTemplate != "{{.Host}}" {
t.Fatalf("expected PromptTemplate %q, got %q", "{{.Host}}", settings.PromptTemplate)
}
}
func TestLoadSettingsMigratesLegacyJSON(t *testing.T) {
t.Setenv(envVarName, t.TempDir())
rootDir, _ := filepath.Abs(GetRootAppDir())
legacyPath := filepath.Join(rootDir, settingsLegacyFileName)
legacy := &ClientSettings{
TableStyle: "Legacy",
AutoAdult: true,
BeaconAutoResults: false,
SmallTermWidth: 200,
AlwaysOverflow: true,
VimMode: true,
UserConnect: true,
ConsoleLogs: false,
PromptStyle: PromptStyleOperatorHost,
PromptTemplate: "{{.Operator}}@{{.Host}} sliver > ",
}
data, err := json.MarshalIndent(legacy, "", " ")
if err != nil {
t.Fatalf("failed to marshal legacy settings: %v", err)
}
if err := os.WriteFile(legacyPath, data, 0o600); err != nil {
t.Fatalf("failed to write legacy settings: %v", err)
}
settings, err := LoadSettings()
if err != nil {
t.Fatalf("expected no error, got %v", err)
}
if settings.TableStyle != "Legacy" {
t.Fatalf("expected TableStyle %q, got %q", "Legacy", settings.TableStyle)
}
if settings.PromptStyle != PromptStyleOperatorHost {
t.Fatalf("expected PromptStyle %q, got %q", PromptStyleOperatorHost, settings.PromptStyle)
}
if settings.PromptTemplate != "{{.Operator}}@{{.Host}} sliver > " {
t.Fatalf("expected PromptTemplate %q, got %q", "{{.Operator}}@{{.Host}} sliver > ", settings.PromptTemplate)
}
if _, err := os.Stat(filepath.Join(rootDir, settingsFileName)); err != nil {
t.Fatalf("expected yaml settings to exist: %v", err)
}
if _, err := os.Stat(legacyPath); !os.IsNotExist(err) {
t.Fatalf("expected legacy settings to be renamed: %v", err)
}
if _, err := os.Stat(legacyBackupPath(legacyPath)); err != nil {
t.Fatalf("expected legacy backup to exist: %v", err)
}
}
func TestLoadSettingsWritesDefault(t *testing.T) {
t.Setenv(envVarName, t.TempDir())
settings, err := LoadSettings()
if err != nil {
t.Fatalf("expected no error, got %v", err)
}
if settings.TableStyle != "SliverDefault" {
t.Fatalf("expected default TableStyle %q, got %q", "SliverDefault", settings.TableStyle)
}
if settings.PromptStyle != PromptStyleHost {
t.Fatalf("expected default PromptStyle %q, got %q", PromptStyleHost, settings.PromptStyle)
}
if settings.PromptTemplate != DefaultPromptTemplate {
t.Fatalf("expected default PromptTemplate %q, got %q", DefaultPromptTemplate, settings.PromptTemplate)
}
rootDir, _ := filepath.Abs(GetRootAppDir())
if _, err := os.Stat(filepath.Join(rootDir, settingsFileName)); err != nil {
t.Fatalf("expected default settings to be written: %v", err)
}
}
+216
View File
@@ -0,0 +1,216 @@
package assets
/*
Sliver Implant Framework
Copyright (C) 2026 Bishop Fox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import (
"os"
"path/filepath"
"gopkg.in/yaml.v3"
)
const spoofMetadataFileName = "spoof-metadata.yaml"
const defaultSpoofMetadataConfigTemplate = `# Sliver executable metadata spoofing configuration.
# Used by generate commands when --spoof-metadata is set.
#
# Fields that reference file content support either:
# - path: read bytes from a local file path
# - base64: inline base64 file content
# Do not set both path and base64 for the same object.
#
# Example 1: Minimal path-based metadata cloning (most common)
pe:
source:
name: metadata-source.exe
path: ""
# Optional icon donor. Reserved for future standalone icon mutation support.
icon:
name: icon.ico
path: ""
# Example 2: Inline/base64 source (uncomment and remove "path" above)
# source:
# name: metadata-source.exe
# base64: "TVqQAAMAAAAEAAAA..."
# Example 3: Optional PE structure overrides (advanced)
# Applied after metadata/resources are cloned from source.
# Omitted fields keep cloned values.
# resource_directory:
# characteristics: 0
# time_date_stamp: 0
# major_version: 1
# minor_version: 0
# number_of_named_entries: 0
# number_of_id_entries: 0
#
# resource_directory_entries:
# - name: 1
# offset_to_data: 0
#
# resource_data_entries:
# - offset_to_data: 0
# size: 0
# code_page: 0
# reserved: 0
#
# export_directory:
# characteristics: 0
# time_date_stamp: 0
# major_version: 1
# minor_version: 0
# name: 0
# base: 0
# number_of_functions: 0
# number_of_names: 0
# address_of_functions: 0
# address_of_names: 0
# address_of_name_ordinals: 0
`
// SpoofMetadataConfig stores default metadata spoofing inputs for generate commands.
type SpoofMetadataConfig struct {
PE *PESpoofMetadataConfig `json:"pe,omitempty" yaml:"pe,omitempty"`
}
// PESpoofMetadataConfig stores PE-specific spoofing inputs.
type PESpoofMetadataConfig struct {
Source *SpoofMetadataDataSource `json:"source,omitempty" yaml:"source,omitempty"`
Icon *SpoofMetadataDataSource `json:"icon,omitempty" yaml:"icon,omitempty"`
ResourceDirectory *ImageResourceDirectory `json:"resource_directory,omitempty" yaml:"resource_directory,omitempty"`
ResourceDirectoryEntries []*ImageResourceDirectoryEntry `json:"resource_directory_entries,omitempty" yaml:"resource_directory_entries,omitempty"`
ResourceDataEntries []*ImageResourceDataEntry `json:"resource_data_entries,omitempty" yaml:"resource_data_entries,omitempty"`
ExportDirectory *ImageExportDirectory `json:"export_directory,omitempty" yaml:"export_directory,omitempty"`
}
// SpoofMetadataDataSource points to bytes that should be sent to the server.
// Either Path or Base64 may be set.
type SpoofMetadataDataSource struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Path string `json:"path,omitempty" yaml:"path,omitempty"`
Base64 string `json:"base64,omitempty" yaml:"base64,omitempty"`
}
type ImageResourceDirectory struct {
Characteristics uint32 `json:"characteristics,omitempty" yaml:"characteristics,omitempty"`
TimeDateStamp uint32 `json:"time_date_stamp,omitempty" yaml:"time_date_stamp,omitempty"`
MajorVersion uint32 `json:"major_version,omitempty" yaml:"major_version,omitempty"`
MinorVersion uint32 `json:"minor_version,omitempty" yaml:"minor_version,omitempty"`
NumberOfNamedEntries uint32 `json:"number_of_named_entries,omitempty" yaml:"number_of_named_entries,omitempty"`
NumberOfIDEntries uint32 `json:"number_of_id_entries,omitempty" yaml:"number_of_id_entries,omitempty"`
}
type ImageResourceDirectoryEntry struct {
Name uint32 `json:"name,omitempty" yaml:"name,omitempty"`
OffsetToData uint32 `json:"offset_to_data,omitempty" yaml:"offset_to_data,omitempty"`
}
type ImageResourceDataEntry struct {
OffsetToData uint32 `json:"offset_to_data,omitempty" yaml:"offset_to_data,omitempty"`
Size uint32 `json:"size,omitempty" yaml:"size,omitempty"`
CodePage uint32 `json:"code_page,omitempty" yaml:"code_page,omitempty"`
Reserved uint32 `json:"reserved,omitempty" yaml:"reserved,omitempty"`
}
type ImageExportDirectory struct {
Characteristics uint32 `json:"characteristics,omitempty" yaml:"characteristics,omitempty"`
TimeDateStamp uint32 `json:"time_date_stamp,omitempty" yaml:"time_date_stamp,omitempty"`
MajorVersion uint32 `json:"major_version,omitempty" yaml:"major_version,omitempty"`
MinorVersion uint32 `json:"minor_version,omitempty" yaml:"minor_version,omitempty"`
Name uint32 `json:"name,omitempty" yaml:"name,omitempty"`
Base uint32 `json:"base,omitempty" yaml:"base,omitempty"`
NumberOfFunctions uint32 `json:"number_of_functions,omitempty" yaml:"number_of_functions,omitempty"`
NumberOfNames uint32 `json:"number_of_names,omitempty" yaml:"number_of_names,omitempty"`
AddressOfFunctions uint32 `json:"address_of_functions,omitempty" yaml:"address_of_functions,omitempty"`
AddressOfNames uint32 `json:"address_of_names,omitempty" yaml:"address_of_names,omitempty"`
AddressOfNameOrdinals uint32 `json:"address_of_name_ordinals,omitempty" yaml:"address_of_name_ordinals,omitempty"`
}
// SpoofMetadataConfigPath returns the spoof metadata config file path.
func SpoofMetadataConfigPath() string {
rootDir, _ := filepath.Abs(GetRootAppDir())
return filepath.Join(rootDir, spoofMetadataFileName)
}
// LoadSpoofMetadataConfig loads spoof metadata config from disk, writing defaults
// if the file is missing.
func LoadSpoofMetadataConfig() (*SpoofMetadataConfig, error) {
config := defaultSpoofMetadataConfig()
configPath := SpoofMetadataConfigPath()
data, err := os.ReadFile(configPath)
if err != nil {
if !os.IsNotExist(err) {
return defaultSpoofMetadataConfig(), err
}
if err := os.WriteFile(configPath, []byte(defaultSpoofMetadataConfigTemplate), 0o600); err != nil {
return defaultSpoofMetadataConfig(), err
}
data = []byte(defaultSpoofMetadataConfigTemplate)
}
if err := yaml.Unmarshal(data, config); err != nil {
return defaultSpoofMetadataConfig(), err
}
normalizeSpoofMetadataConfig(config)
return config, nil
}
// SaveSpoofMetadataConfig writes spoof metadata config to disk.
func SaveSpoofMetadataConfig(config *SpoofMetadataConfig) error {
if config == nil {
config = defaultSpoofMetadataConfig()
}
normalizeSpoofMetadataConfig(config)
data, err := yaml.Marshal(config)
if err != nil {
return err
}
return os.WriteFile(SpoofMetadataConfigPath(), data, 0o600)
}
func normalizeSpoofMetadataConfig(config *SpoofMetadataConfig) {
if config.PE == nil {
config.PE = &PESpoofMetadataConfig{}
}
if config.PE.Source == nil {
config.PE.Source = &SpoofMetadataDataSource{Name: "metadata-source.exe"}
}
if config.PE.Icon == nil {
config.PE.Icon = &SpoofMetadataDataSource{Name: "icon.ico"}
}
}
func defaultSpoofMetadataConfig() *SpoofMetadataConfig {
return &SpoofMetadataConfig{
PE: &PESpoofMetadataConfig{
Source: &SpoofMetadataDataSource{
Name: "metadata-source.exe",
Path: "",
},
Icon: &SpoofMetadataDataSource{
Name: "icon.ico",
Path: "",
},
},
}
}
+13 -3
View File
@@ -1,4 +1,14 @@
CLI
===
# client/cli
This package implements the Sliver client cli.
## Overview
Defines the Cobra root command and CLI initialization for the Sliver client binary. Sets up persistent flags, environment bootstrapping, and command wiring. Core logic addresses console, implant, import, and version within the cli package.
## Go Files
- `cli.go` – Builds the root Cobra command, wires global flags, and starts the console UI.
- `config.go` – Parses CLI configuration files and environment variables used during startup.
- `console.go` – Launches the interactive console mode and handles profile selection.
- `implant.go` – Implements CLI entry points for implant-specific operations without launching the console.
- `import.go` – Provides import routines for bringing external state into the client (e.g., implants or loot).
- `version.go` – Prints version/build information for the CLI binary.
+41 -46
View File
@@ -25,11 +25,8 @@ import (
"path"
"github.com/bishopfox/sliver/client/assets"
"github.com/bishopfox/sliver/client/command"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/client/transport"
"github.com/bishopfox/sliver/client/version"
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)
@@ -37,14 +34,10 @@ const (
logFileName = "sliver-client.log"
)
var (
sliverServerVersion = fmt.Sprintf("v%s", version.FullVersion())
)
// Initialize logging
// Initialize logging.
func initLogging(appDir string) *os.File {
log.SetFlags(log.LstdFlags | log.Lshortfile)
logFile, err := os.OpenFile(path.Join(appDir, logFileName), os.O_RDWR|os.O_CREATE|os.O_APPEND, 0600)
logFile, err := os.OpenFile(path.Join(appDir, logFileName), os.O_RDWR|os.O_CREATE|os.O_APPEND, 0o600)
if err != nil {
panic(fmt.Sprintf("[!] Error opening file: %s", err))
}
@@ -53,57 +46,59 @@ func initLogging(appDir string) *os.File {
}
func init() {
appDir := assets.GetRootAppDir()
logFile := initLogging(appDir)
defer logFile.Close()
rootCmd.TraverseChildren = true
rootCmd.Flags().String(RCFlagName, "", "path to rc script file")
rootCmd.PersistentFlags().Bool(disableWGFlag, false, "connect to multiplayer directly even if the operator config includes a WireGuard wrapper")
rootCmd.PersistentFlags().Bool(requireWGFlag, false, "require the operator config's WireGuard wrapper for multiplayer connections")
// Create the console client, without any RPC or commands bound to it yet.
// This created before anything so that multiple commands can make use of
// the same underlying command/run infrastructure.
con := console.NewConsole(false)
// Import
rootCmd.AddCommand(cmdImport)
rootCmd.AddCommand(importCmd())
// Version
rootCmd.AddCommand(cmdVersion)
// Client console.
// All commands and RPC connection are generated WITHIN the command RunE():
// that means there should be no redundant command tree/RPC connections with
// other command trees below, such as the implant one.
rootCmd.AddCommand(consoleCmd(con))
// MCP stdio server.
rootCmd.AddCommand(mcpCmd(con))
// Implant.
// The implant command allows users to run commands on slivers from their
// system shell. It makes use of pre-runners for connecting to the server
// and binding sliver commands. These same pre-runners are also used for
// command completion/filtering purposes.
rootCmd.AddCommand(implantCmd(con))
// No subcommand invoked means starting the console.
rootCmd.RunE, rootCmd.PostRunE = consoleRunnerCmd(con, true)
// Completions
carapace.Gen(rootCmd)
}
var rootCmd = &cobra.Command{
Use: "sliver-client",
Short: "",
Long: ``,
Run: func(cmd *cobra.Command, args []string) {
appDir := assets.GetRootAppDir()
logFile := initLogging(appDir)
defer logFile.Close()
os.Args = os.Args[:1] // Stops grumble from complaining
err := StartClientConsole()
if err != nil {
fmt.Printf("[!] %s\n", err)
}
},
}
// StartClientConsole - Start the client console
func StartClientConsole() error {
configs := assets.GetConfigs()
if len(configs) == 0 {
fmt.Printf("No config files found at %s (see --help)\n", assets.GetConfigDir())
return nil
}
config := selectConfig()
if config == nil {
return nil
}
fmt.Printf("Connecting to %s:%d ...\n", config.LHost, config.LPort)
rpc, ln, err := transport.MTLSConnect(config)
if err != nil {
fmt.Printf("Connection to server failed %s", err)
return nil
}
defer ln.Close()
return console.Start(rpc, command.BindCommands, func(con *console.SliverConsoleClient) {}, false)
}
// Execute - Execute root command
// Execute - Execute root command.
func Execute() {
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
fmt.Printf("root command: %s\n", err)
os.Exit(1)
}
}
+15 -32
View File
@@ -23,51 +23,34 @@ import (
"sort"
"github.com/bishopfox/sliver/client/assets"
"gopkg.in/AlecAivazis/survey.v1"
"github.com/bishopfox/sliver/client/forms"
)
func selectConfig() *assets.ClientConfig {
func selectConfig() (string, *assets.ClientConfig) {
configs := assets.GetConfigs()
if len(configs) == 0 {
return nil
return "", nil
}
if len(configs) == 1 {
for _, config := range configs {
return config
for key, config := range configs {
return key, config
}
}
answer := struct{ Config string }{}
qs := getPromptForConfigs(configs)
err := survey.Ask(qs, &answer)
if err != nil {
fmt.Println(err.Error())
return nil
}
return configs[answer.Config]
}
func getPromptForConfigs(configs map[string]*assets.ClientConfig) []*survey.Question {
keys := []string{}
for k := range configs {
keys = append(keys, k)
keys := make([]string, 0, len(configs))
for key := range configs {
keys = append(keys, key)
}
sort.Strings(keys)
return []*survey.Question{
{
Name: "config",
Prompt: &survey.Select{
Message: "Select a server:",
Options: keys,
Default: keys[0],
},
},
selection := keys[0]
err := forms.Select("Select a server:", keys, &selection)
if err != nil {
fmt.Println(err.Error())
return "", nil
}
return selection, configs[selection]
}
+26
View File
@@ -0,0 +1,26 @@
package cli
import (
"context"
"fmt"
"os"
"google.golang.org/grpc"
"google.golang.org/grpc/connectivity"
)
func handleConnectionLost(ln *grpc.ClientConn) {
if ln == nil {
return
}
currentState := ln.GetState()
// currentState should be "Ready" when the connection is established.
if ln.WaitForStateChange(context.Background(), currentState) {
newState := ln.GetState()
// newState will be "Idle" if the connection is lost.
if newState == connectivity.Idle {
fmt.Println("\nLost connection to server. Exiting now.")
os.Exit(1)
}
}
}
+89
View File
@@ -0,0 +1,89 @@
package cli
/*
Sliver Implant Framework
Copyright (C) 2019 Bishop Fox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import (
"fmt"
"github.com/bishopfox/sliver/client/assets"
"github.com/bishopfox/sliver/client/command"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/client/transport"
"github.com/bishopfox/sliver/protobuf/rpcpb"
"github.com/spf13/cobra"
"google.golang.org/grpc"
)
// consoleCmd generates the console with required pre/post runners.
func consoleCmd(con *console.SliverClient) *cobra.Command {
consoleCmd := &cobra.Command{
Use: "console",
Short: "Start the sliver client console",
}
consoleCmd.Flags().String(RCFlagName, "", "path to rc script file")
consoleCmd.RunE, consoleCmd.PersistentPostRunE = consoleRunnerCmd(con, true)
return consoleCmd
}
func consoleRunnerCmd(con *console.SliverClient, run bool) (pre, post func(cmd *cobra.Command, args []string) error) {
pre = func(cmd *cobra.Command, _ []string) error {
if err := applyMultiplayerConnectMode(cmd); err != nil {
return err
}
configs := assets.GetConfigs()
if len(configs) == 0 {
fmt.Printf("No config files found at %s (see --help)\n", assets.GetConfigDir())
return nil
}
configKey, config := selectConfig()
if config == nil {
return nil
}
rcScript, err := ReadRCScript(cmd)
if err != nil {
fmt.Printf("Failed to read rc script: %s\n", err)
return nil
}
// Don't clobber output when simply running an implant command from system shell.
if run {
fmt.Printf("Connecting to %s:%d ...\n", config.LHost, config.LPort)
}
var rpc rpcpb.SliverRPCClient
var ln *grpc.ClientConn
rpc, ln, err = transport.MTLSConnect(config)
if err != nil {
fmt.Printf("Connection to server failed %s", err)
return nil
}
return console.StartClient(con, rpc, ln, &console.ConnectionDetails{ConfigKey: configKey, Config: config}, command.ServerCommands(con, nil), command.SliverCommands(con), run, rcScript)
}
// Close the RPC connection once exiting
post = func(_ *cobra.Command, _ []string) error {
return con.CloseConnection()
}
return pre, post
}
+93
View File
@@ -0,0 +1,93 @@
package cli
/*
Sliver Implant Framework
Copyright (C) 2019 Bishop Fox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import (
"errors"
"github.com/bishopfox/sliver/client/command"
"github.com/bishopfox/sliver/client/command/use"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/client/constants"
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
func implantCmd(con *console.SliverClient) *cobra.Command {
con.IsCLI = true
makeCommands := command.SliverCommands(con)
cmd := makeCommands()
cmd.Use = constants.ImplantMenu
// Flags
implantFlags := pflag.NewFlagSet(constants.ImplantMenu, pflag.ContinueOnError)
implantFlags.StringP("use", "s", "", "interact with a session")
cmd.Flags().AddFlagSet(implantFlags)
// Pre-runners (console setup, connection, etc)
cmd.PersistentPreRunE, cmd.PersistentPostRunE = makeRunners(cmd, con)
// Completions
makeCompleters(cmd, con)
return cmd
}
func makeRunners(implantCmd *cobra.Command, con *console.SliverClient) (pre, post func(cmd *cobra.Command, args []string) error) {
startConsole, closeConsole := consoleRunnerCmd(con, false)
// The pre-run function connects to the server and sets up a "fake" console,
// so we can have access to active sessions/beacons, and other stuff needed.
pre = func(_ *cobra.Command, args []string) error {
startConsole(implantCmd, args)
// Set the active target.
target, _ := implantCmd.Flags().GetString("use")
if target == "" {
return errors.New("no target implant to run command on")
}
session := con.GetSession(target)
if session != nil {
con.ActiveTarget.Set(session, nil)
}
return nil
}
return pre, closeConsole
}
func makeCompleters(cmd *cobra.Command, con *console.SliverClient) {
comps := carapace.Gen(cmd)
comps.PreRun(func(cmd *cobra.Command, args []string) {
cmd.PersistentPreRunE(cmd, args)
})
// Bind completers to flags (wrap them to use the same pre-runners)
command.BindFlagCompletions(cmd, func(comp *carapace.ActionMap) {
(*comp)["use"] = carapace.ActionCallback(func(c carapace.Context) carapace.Action {
cmd.PersistentPreRunE(cmd, c.Args)
return use.SessionIDCompleter(con)
})
})
}
+26 -16
View File
@@ -23,25 +23,35 @@ import (
"os"
"github.com/bishopfox/sliver/client/assets"
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)
var cmdImport = &cobra.Command{
Use: "import",
Short: "Import a client configuration file",
Long: `import [config files]`,
Run: func(cmd *cobra.Command, args []string) {
if 0 < len(args) {
for _, arg := range args {
conf, err := assets.ReadConfig(arg)
if err != nil {
fmt.Printf("[!] %s\n", err)
os.Exit(3)
func importCmd() *cobra.Command {
cmdImport := &cobra.Command{
Use: "import",
Short: "Import a client configuration file",
Long: `import [config files]`,
Run: func(cmd *cobra.Command, args []string) {
if 0 < len(args) {
for _, arg := range args {
conf, err := assets.ReadConfig(arg)
if err != nil {
fmt.Printf("[!] %s\n", err)
os.Exit(3)
}
assets.SaveConfig(conf)
}
assets.SaveConfig(conf)
} else {
fmt.Printf("Missing config file path, see --help")
}
} else {
fmt.Printf("Missing config file path, see --help")
}
},
},
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
return []string{}, cobra.ShellCompDirectiveDefault
},
}
carapace.Gen(cmdImport).PositionalCompletion(carapace.ActionFiles().Tag("server configuration"))
return cmdImport
}
+98
View File
@@ -0,0 +1,98 @@
package cli
/*
Sliver Implant Framework
Copyright (C) 2023 Bishop Fox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import (
"fmt"
"os"
"path/filepath"
"github.com/bishopfox/sliver/client/assets"
"github.com/bishopfox/sliver/client/console"
clientmcp "github.com/bishopfox/sliver/client/mcp"
"github.com/bishopfox/sliver/client/transport"
"github.com/spf13/cobra"
)
func mcpCmd(con *console.SliverClient) *cobra.Command {
mcpCmd := &cobra.Command{
Use: "mcp",
Short: "Start the MCP stdio server",
RunE: func(cmd *cobra.Command, args []string) error {
return runMCP(cmd, con)
},
}
mcpCmd.Flags().String("config", "", "path to client config file")
return mcpCmd
}
func runMCP(cmd *cobra.Command, con *console.SliverClient) error {
if err := applyMultiplayerConnectMode(cmd); err != nil {
return err
}
configPath, _ := cmd.Flags().GetString("config")
config, err := loadMCPClientConfig(configPath)
if err != nil {
fmt.Printf("%s\n", err)
return nil
}
rpc, ln, err := transport.MTLSConnect(config)
if err != nil {
fmt.Printf("Connection to server failed %s\n", err)
return nil
}
defer transport.CloseGRPCConnection(ln)
con.Rpc = rpc
go handleConnectionLost(ln)
cfg := clientmcp.DefaultConfig()
if err := clientmcp.ServeStdio(cfg, con.Rpc); err != nil {
fmt.Printf("MCP server error: %s\n", err)
return nil
}
return nil
}
func loadMCPClientConfig(path string) (*assets.ClientConfig, error) {
if path != "" {
configPath := path
if !filepath.IsAbs(configPath) {
if _, err := os.Stat(configPath); err != nil {
configPath = filepath.Join(assets.GetConfigDir(), configPath)
}
}
return assets.ReadConfig(configPath)
}
configs := assets.GetConfigs()
switch len(configs) {
case 0:
return nil, fmt.Errorf("no config files found at %s (use --config)", assets.GetConfigDir())
case 1:
for _, config := range configs {
return config, nil
}
default:
return nil, fmt.Errorf("multiple configs found; use --config to select one")
}
return nil, fmt.Errorf("no config files found")
}
+31
View File
@@ -0,0 +1,31 @@
package cli
import (
"fmt"
"os"
"github.com/spf13/cobra"
)
const RCFlagName = "rc"
func ReadRCScript(cmd *cobra.Command) (string, error) {
if cmd == nil {
return "", nil
}
if cmd.Flags().Lookup(RCFlagName) == nil {
return "", nil
}
rcPath, err := cmd.Flags().GetString(RCFlagName)
if err != nil {
return "", err
}
if rcPath == "" {
return "", nil
}
data, err := os.ReadFile(rcPath)
if err != nil {
return "", fmt.Errorf("read rc script %q: %w", rcPath, err)
}
return string(data), nil
}
+42
View File
@@ -0,0 +1,42 @@
package cli
import (
"fmt"
"github.com/bishopfox/sliver/client/transport"
"github.com/spf13/cobra"
)
const (
requireWGFlag = "require-wg"
disableWGFlag = "disable-wg"
)
func applyMultiplayerConnectMode(cmd *cobra.Command) error {
if cmd == nil {
transport.SetMultiplayerConnectMode(transport.MultiplayerConnectAuto)
return nil
}
requireWG, err := cmd.Flags().GetBool(requireWGFlag)
if err != nil {
return err
}
disableWG, err := cmd.Flags().GetBool(disableWGFlag)
if err != nil {
return err
}
if requireWG && disableWG {
return fmt.Errorf("--%s and --%s cannot be used together", requireWGFlag, disableWGFlag)
}
mode := transport.MultiplayerConnectAuto
switch {
case requireWG:
mode = transport.MultiplayerConnectRequireWG
case disableWG:
mode = transport.MultiplayerConnectDisableWG
}
transport.SetMultiplayerConnectMode(mode)
return nil
}
+65 -11
View File
@@ -1,14 +1,68 @@
Command
=======
# client/command
This package contains all of the client command implementations that are shared between the client and the server console.
## Overview
### Developers
Shared registration glue, scaffolding, and helpers for Sliver client console command groups. Hosts common utilities for binding Cobra commands to RPC-backed actions. Core logic addresses sliver within the command package.
General guidance on the structure of this package:
* One command per file and the name of the file should reflect the command it implements (or there about, trivial commands can go into the same file). This makes it easy to find where a command implementation lives within a package or to search by file name if it is not clear which package implements a given command.
* The root command, and reused code should go into the file named after the command
* For example, code shared between the `generate` and the `regenerate` command should go in `generate.go`, and any `regenerate` specific code should go in `regenerate.go`
* Command entrypoint functions should have the suffix `Cmd` e.g., `GenerateCmd` is the entrypoint for `generate`
* Command entrypoints should always a function signature of `func (ctx *grumble.Context, con *console.SliverConsoleClient)`
* Functions that are only ever exported for other commands to use should go in a `helpers.go`, if the function is used internally and exported follow the guidance above on shared code.
## Go Files
- `command.go` – Provides helpers for binding Cobra commands, flag sets, and visibility filters into the client command tree.
- `server.go` – Defines the server menu composition, wiring each server-side command group onto the root console structure at runtime.
- `main.go` – Builds the implant/Sliver menu, attaching per-target command groups and loading alias/extension manifests before exposure.
## Sub-packages
- `ai/` – Implements the 'ai' Bubble Tea layout preview command for the Sliver client console.
- `alias/` – Implements the 'alias' command group for the Sliver client console.
- `armory/` – Implements the 'armory' command group for the Sliver client console.
- `backdoor/` – Implements the 'backdoor' command group for the Sliver client console.
- `beacons/` – Implements the 'beacons' command group for the Sliver client console.
- `builders/` – Implements the 'builders' command group for the Sliver client console.
- `c2profiles/` – Implements the 'c2profiles' command group for the Sliver client console.
- `certificates/` – Implements the 'certificates' command group for the Sliver client console.
- `clean/` – Implements the 'clean' command group for the Sliver client console.
- `completers/` – Implements the 'completers' command group for the Sliver client console.
- `crack/` – Implements the 'crack' command group for the Sliver client console.
- `creds/` – Implements the 'creds' command group for the Sliver client console.
- `cursed/` – Implements the 'cursed' command group for the Sliver client console.
- `dllhijack/` – Implements the 'dllhijack' command group for the Sliver client console.
- `edit/` – Implements the 'edit' command for the Sliver client console.
- `environment/` – Implements the 'environment' command group for the Sliver client console.
- `exec/` – Implements the 'exec' command group for the Sliver client console.
- `exit/` – Implements the 'exit' command group for the Sliver client console.
- `extensions/` – Implements the 'extensions' command group for the Sliver client console.
- `filesystem/` – Implements the 'filesystem' command group for the Sliver client console.
- `flags/` – Implements the 'flags' command group for the Sliver client console.
- `generate/` – Implements the 'generate' command group for the Sliver client console.
- `help/` – Implements the 'help' command group for the Sliver client console.
- `hosts/` – Implements the 'hosts' command group for the Sliver client console.
- `info/` – Implements the 'info' command group for the Sliver client console.
- `jobs/` – Implements the 'jobs' command group for the Sliver client console.
- `kill/` – Implements the 'kill' command group for the Sliver client console.
- `licenses/` – Implements the 'licenses' command group for the Sliver client console.
- `loot/` – Implements the 'loot' command group for the Sliver client console.
- `monitor/` – Implements the 'monitor' command group for the Sliver client console.
- `mcp/` – Implements the 'mcp' command group for the Sliver client console.
- `network/` – Implements the 'network' command group for the Sliver client console.
- `operators/` – Implements the 'operators' command group for the Sliver client console.
- `pivots/` – Implements the 'pivots' command group for the Sliver client console.
- `portfwd/` – Implements the 'portfwd' command group for the Sliver client console.
- `privilege/` – Implements the 'privilege' command group for the Sliver client console.
- `processes/` – Implements the 'processes' command group for the Sliver client console.
- `reaction/` – Implements the 'reaction' command group for the Sliver client console.
- `reconfig/` – Implements the 'reconfig' command group for the Sliver client console.
- `registry/` – Implements the 'registry' command group for the Sliver client console.
- `rportfwd/` – Implements the 'rportfwd' command group for the Sliver client console.
- `screenshot/` – Implements the 'screenshot' command group for the Sliver client console.
- `sessions/` – Implements the 'sessions' command group for the Sliver client console.
- `settings/` – Implements the 'settings' command group for the Sliver client console.
- `shell/` – Implements the 'shell' command group for the Sliver client console.
- `shikata-ga-nai/` – Implements the 'shikata-ga-nai' command group for the Sliver client console.
- `socks/` – Implements the 'socks' command group for the Sliver client console.
- `taskmany/` – Implements the 'taskmany' command group for the Sliver client console.
- `tasks/` – Implements the 'tasks' command group for the Sliver client console.
- `update/` – Implements the 'update' command group for the Sliver client console.
- `use/` – Implements the 'use' command group for the Sliver client console.
- `wasm/` – Implements the 'wasm' command group for the Sliver client console.
- `websites/` – Implements the 'websites' command group for the Sliver client console.
- `wireguard/` – Implements the 'wireguard' command group for the Sliver client console.
+5
View File
@@ -0,0 +1,5 @@
# client/command/ai
Implements the `ai` command for the Sliver client console.
The TUI loads server-backed AI conversation threads over gRPC, submits prompts to the server, and refreshes when `AIConversationEvent` updates arrive with assistant replies or failure messages.
+150
View File
@@ -0,0 +1,150 @@
package ai
import (
"fmt"
"strings"
"time"
tea "charm.land/bubbletea/v2"
"github.com/bishopfox/sliver/client/console"
"github.com/charmbracelet/colorprofile"
"github.com/spf13/cobra"
"golang.org/x/term"
)
// AICmd launches the AI conversation TUI.
func AICmd(_ *cobra.Command, con *console.SliverClient, _ []string) {
if con == nil || con.Rpc == nil {
if con != nil {
con.PrintErrorf("Connect to a server before using `ai`.\n")
}
return
}
listenerID, listener := con.CreateEventListener()
defer con.RemoveEventListener(listenerID)
model := newAIModel(con, buildAIContext(con), listener)
model.showExperimentalWarningModal()
width, height := 100, 30
if w, h, err := term.GetSize(0); err == nil && w > 0 && h > 0 {
width, height = w, h
}
program := tea.NewProgram(
model,
tea.WithWindowSize(width, height),
tea.WithColorProfile(colorprofile.TrueColor),
)
if _, err := program.Run(); err != nil {
con.PrintErrorf("AI TUI error: %s\n", err)
}
}
type aiContext struct {
target aiTargetSummary
connection aiConnectionSummary
status string
}
type aiTargetSummary struct {
SessionID string
BeaconID string
Label string
Host string
OS string
Arch string
C2 string
Mode string
Details []string
}
type aiConnectionSummary struct {
Profile string
Server string
Operator string
State string
}
func buildAIContext(con *console.SliverClient) aiContext {
ctx := aiContext{
target: aiTargetSummary{
Label: "No active target",
Host: "Select a session or beacon with `use`",
Mode: "offline preview",
C2: "n/a",
OS: "unknown",
Arch: "unknown",
},
connection: aiConnectionSummary{
Profile: "<disconnected>",
Server: "<unknown>",
Operator: "<unknown>",
State: "idle",
},
status: "Loading AI conversations from the server...",
}
if con != nil {
if details, state, ok := con.CurrentConnection(); ok {
ctx.connection.State = strings.ToLower(state.String())
if details != nil && details.Config != nil {
ctx.connection.Profile = fallback(details.ConfigKey, "<profile unavailable>")
ctx.connection.Server = fmt.Sprintf("%s:%d", details.Config.LHost, details.Config.LPort)
ctx.connection.Operator = fallback(details.Config.Operator, "<unknown>")
}
}
session, beacon := con.ActiveTarget.Get()
switch {
case session != nil:
ctx.target = aiTargetSummary{
SessionID: session.ID,
Label: fmt.Sprintf("Session %s", fallback(session.Name, session.ID)),
Host: fallback(session.Hostname, "<unknown host>"),
OS: fallback(session.OS, "unknown"),
Arch: fallback(session.Arch, "unknown"),
C2: fallback(session.ActiveC2, "unknown"),
Mode: "interactive session",
Details: []string{
fmt.Sprintf("User: %s", fallback(session.Username, "<unknown>")),
fmt.Sprintf("PID: %d", session.PID),
fmt.Sprintf("Remote: %s", fallback(session.RemoteAddress, "<unknown>")),
},
}
case beacon != nil:
ctx.target = aiTargetSummary{
BeaconID: beacon.ID,
Label: fmt.Sprintf("Beacon %s", fallback(beacon.Name, beacon.ID)),
Host: fallback(beacon.Hostname, "<unknown host>"),
OS: fallback(beacon.OS, "unknown"),
Arch: fallback(beacon.Arch, "unknown"),
C2: fallback(beacon.ActiveC2, "unknown"),
Mode: "asynchronous beacon",
Details: []string{
fmt.Sprintf("User: %s", fallback(beacon.Username, "<unknown>")),
fmt.Sprintf("Interval: %s", time.Duration(beacon.Interval).String()),
fmt.Sprintf("Next checkin: %s", formatUnix(beacon.NextCheckin)),
},
}
}
}
return ctx
}
func fallback(value, def string) string {
value = strings.TrimSpace(value)
if value == "" {
return def
}
return value
}
func formatUnix(ts int64) string {
if ts <= 0 {
return "<unknown>"
}
return time.Unix(ts, 0).Local().Format("2006-01-02 15:04:05")
}
+31
View File
@@ -0,0 +1,31 @@
package ai
import (
"github.com/bishopfox/sliver/client/command/help"
"github.com/bishopfox/sliver/client/console"
consts "github.com/bishopfox/sliver/client/constants"
"github.com/spf13/cobra"
)
// Commands returns the ai command.
func Commands(con *console.SliverClient) []*cobra.Command {
return []*cobra.Command{newAICommand(consts.SliverCoreHelpGroup, con)}
}
// ServerCommands returns the ai command for the top-level client REPL.
func ServerCommands(con *console.SliverClient) []*cobra.Command {
return []*cobra.Command{newAICommand(consts.GenericHelpGroup, con)}
}
func newAICommand(groupID string, con *console.SliverClient) *cobra.Command {
return &cobra.Command{
Use: consts.AIStr,
Short: "Open the Sliver AI conversation TUI",
Long: help.GetHelpFor([]string{consts.AIStr}),
Args: cobra.NoArgs,
GroupID: groupID,
Run: func(cmd *cobra.Command, args []string) {
AICmd(cmd, con, args)
},
}
}
+519
View File
@@ -0,0 +1,519 @@
package ai
import (
"context"
"net"
"sync"
"testing"
"github.com/bishopfox/sliver/client/console"
consts "github.com/bishopfox/sliver/client/constants"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/bishopfox/sliver/protobuf/commonpb"
"github.com/bishopfox/sliver/protobuf/rpcpb"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/test/bufconn"
"google.golang.org/protobuf/proto"
)
func TestLoadAIStateCmdLoadsConversationOverRPC(t *testing.T) {
server := &aiRPCServer{
providersResp: &clientpb.AIProviderConfigs{
Providers: []*clientpb.AIProviderConfig{{Name: "openai", Configured: true}},
Config: &clientpb.AIConfigSummary{
Provider: "openai",
Model: "gpt-test",
Valid: true,
},
},
conversationsResp: &clientpb.AIConversations{
Conversations: []*clientpb.AIConversation{
{ID: "conv-1", Provider: "openai", Model: "gpt-test", Title: "First"},
{ID: "conv-2", Provider: "openai", Model: "gpt-test", Title: "Second"},
},
},
conversationByID: map[string]*clientpb.AIConversation{
"conv-1": {
ID: "conv-1",
Provider: "openai",
Model: "gpt-test",
Title: "First",
Messages: []*clientpb.AIConversationMessage{
{Role: "user", Content: "Hello"},
},
},
},
}
rpcClient, cleanup := newAITestRPCClient(t, server)
defer cleanup()
cmd := loadAIStateCmd(&console.SliverClient{Rpc: rpcClient}, aiTargetSummary{}, "")
msg := cmd()
loaded, ok := msg.(aiLoadedMsg)
if !ok {
t.Fatalf("expected aiLoadedMsg, got %T", msg)
}
if loaded.selectedID != "conv-1" {
t.Fatalf("unexpected selected conversation id: got=%q want=%q", loaded.selectedID, "conv-1")
}
if loaded.conversation == nil || loaded.conversation.GetID() != "conv-1" {
t.Fatalf("unexpected loaded conversation: %+v", loaded.conversation)
}
if len(loaded.conversations) != 2 {
t.Fatalf("unexpected conversation count: got=%d want=%d", len(loaded.conversations), 2)
}
server.mu.Lock()
defer server.mu.Unlock()
if server.getProvidersCalls != 1 {
t.Fatalf("expected GetAIProviders to be called once, got %d", server.getProvidersCalls)
}
if server.getConversationsCalls != 1 {
t.Fatalf("expected GetAIConversations to be called once, got %d", server.getConversationsCalls)
}
if len(server.getConversationReqs) != 1 {
t.Fatalf("expected GetAIConversation to be called once, got %d", len(server.getConversationReqs))
}
if server.getConversationReqs[0].GetID() != "conv-1" || !server.getConversationReqs[0].GetIncludeMessages() {
t.Fatalf("unexpected GetAIConversation request: %+v", server.getConversationReqs[0])
}
}
func TestLoadAIStateCmdCreatesConversationWhenNoneExist(t *testing.T) {
server := &aiRPCServer{
providersResp: &clientpb.AIProviderConfigs{
Providers: []*clientpb.AIProviderConfig{{Name: "openai", Configured: true}},
Config: &clientpb.AIConfigSummary{
Provider: "openai",
Model: "gpt-test",
Valid: true,
},
},
conversationsResp: &clientpb.AIConversations{},
saveConversationResp: &clientpb.AIConversation{
ID: "conv-created",
Provider: "openai",
Model: "gpt-test",
Title: "New conversation",
},
conversationByID: map[string]*clientpb.AIConversation{
"conv-created": {
ID: "conv-created",
Provider: "openai",
Model: "gpt-test",
Title: "New conversation",
},
},
}
rpcClient, cleanup := newAITestRPCClient(t, server)
defer cleanup()
msg := loadAIStateCmd(&console.SliverClient{Rpc: rpcClient}, aiTargetSummary{}, "")()
loaded, ok := msg.(aiLoadedMsg)
if !ok {
t.Fatalf("expected aiLoadedMsg, got %T", msg)
}
if loaded.status != "Created a new AI conversation." {
t.Fatalf("unexpected status: %q", loaded.status)
}
if loaded.selectedID != "conv-created" {
t.Fatalf("unexpected selected conversation id: %q", loaded.selectedID)
}
server.mu.Lock()
defer server.mu.Unlock()
if len(server.saveConversationReqs) != 1 {
t.Fatalf("expected SaveAIConversation to be called once, got %d", len(server.saveConversationReqs))
}
request := server.saveConversationReqs[0]
if request.GetProvider() != "openai" || request.GetModel() != "gpt-test" || request.GetTitle() != "New conversation" {
t.Fatalf("unexpected SaveAIConversation request: %+v", request)
}
}
func TestSubmitPromptCmdCreatesConversationAndSavesUserMessage(t *testing.T) {
server := &aiRPCServer{
saveConversationResp: &clientpb.AIConversation{
ID: "conv-created",
Provider: "openai",
Model: "gpt-test",
Title: "Explain the workflow.",
},
saveMessageResp: &clientpb.AIConversationMessage{
ID: "msg-1",
ConversationID: "conv-created",
Role: "user",
Content: "Explain the workflow.\n\nWith details.",
},
}
rpcClient, cleanup := newAITestRPCClient(t, server)
defer cleanup()
msg := submitPromptCmd(
&console.SliverClient{Rpc: rpcClient},
aiTargetSummary{SessionID: "session-1"},
nil,
"openai",
"gpt-test",
"Explain the workflow.\n\nWith details.",
)()
submitted, ok := msg.(aiPromptSubmittedMsg)
if !ok {
t.Fatalf("expected aiPromptSubmittedMsg, got %T", msg)
}
if submitted.conversationID != "conv-created" {
t.Fatalf("unexpected conversation id: %q", submitted.conversationID)
}
server.mu.Lock()
defer server.mu.Unlock()
if len(server.saveConversationReqs) != 1 {
t.Fatalf("expected SaveAIConversation to be called once, got %d", len(server.saveConversationReqs))
}
if server.saveConversationReqs[0].GetTitle() != "Explain the workflow." {
t.Fatalf("unexpected conversation title: %q", server.saveConversationReqs[0].GetTitle())
}
if server.saveConversationReqs[0].GetTargetSessionID() != "session-1" {
t.Fatalf("expected target session to be forwarded, got %+v", server.saveConversationReqs[0])
}
if len(server.saveMessageReqs) != 1 {
t.Fatalf("expected SaveAIConversationMessage to be called once, got %d", len(server.saveMessageReqs))
}
request := server.saveMessageReqs[0]
if request.GetConversationID() != "conv-created" || request.GetProvider() != "openai" || request.GetModel() != "gpt-test" || request.GetRole() != "user" {
t.Fatalf("unexpected SaveAIConversationMessage request: %+v", request)
}
if request.GetContent() != "Explain the workflow.\n\nWith details." {
t.Fatalf("unexpected prompt content: %q", request.GetContent())
}
}
func TestSubmitPromptCmdUsesExistingConversationSettings(t *testing.T) {
server := &aiRPCServer{
saveMessageResp: &clientpb.AIConversationMessage{
ID: "msg-1",
ConversationID: "conv-1",
Role: "user",
Content: "hello",
},
}
rpcClient, cleanup := newAITestRPCClient(t, server)
defer cleanup()
msg := submitPromptCmd(
&console.SliverClient{Rpc: rpcClient},
aiTargetSummary{},
&clientpb.AIConversation{ID: "conv-1", Provider: "anthropic", Model: "claude-test", Title: "Thread"},
"openai",
"gpt-test",
"hello",
)()
if _, ok := msg.(aiPromptSubmittedMsg); !ok {
t.Fatalf("expected aiPromptSubmittedMsg, got %T", msg)
}
server.mu.Lock()
defer server.mu.Unlock()
if len(server.saveConversationReqs) != 0 {
t.Fatalf("did not expect SaveAIConversation to be called, got %d calls", len(server.saveConversationReqs))
}
if len(server.saveMessageReqs) != 1 {
t.Fatalf("expected SaveAIConversationMessage to be called once, got %d", len(server.saveMessageReqs))
}
request := server.saveMessageReqs[0]
if request.GetProvider() != "anthropic" || request.GetModel() != "claude-test" {
t.Fatalf("unexpected conversation settings in message request: %+v", request)
}
}
func TestDeleteConversationCmdSendsDeleteRequest(t *testing.T) {
server := &aiRPCServer{}
rpcClient, cleanup := newAITestRPCClient(t, server)
defer cleanup()
msg := deleteConversationCmd(
&console.SliverClient{Rpc: rpcClient},
"conv-1",
"conv-2",
`Deleted "Thread".`,
)()
deleted, ok := msg.(aiConversationDeletedMsg)
if !ok {
t.Fatalf("expected aiConversationDeletedMsg, got %T", msg)
}
if deleted.conversationID != "conv-1" || deleted.selectedID != "conv-2" {
t.Fatalf("unexpected delete message: %+v", deleted)
}
server.mu.Lock()
defer server.mu.Unlock()
if len(server.deleteConversationReqs) != 1 {
t.Fatalf("expected DeleteAIConversation to be called once, got %d", len(server.deleteConversationReqs))
}
if server.deleteConversationReqs[0].GetID() != "conv-1" {
t.Fatalf("unexpected DeleteAIConversation request: %+v", server.deleteConversationReqs[0])
}
}
func TestWaitForAIConversationEventCmdFiltersForAIEvents(t *testing.T) {
eventPayload := &clientpb.AIConversationEvent{
EventType: clientpb.AIConversationEventType_AI_CONVERSATION_EVENT_TYPE_CONVERSATION_UPDATED,
Conversation: &clientpb.AIConversation{
ID: "conv-1",
OperatorName: "alice",
},
}
data, err := proto.Marshal(eventPayload)
if err != nil {
t.Fatalf("marshal conversation event: %v", err)
}
listener := make(chan *clientpb.Event, 2)
listener <- &clientpb.Event{EventType: consts.WatchtowerEvent}
listener <- &clientpb.Event{EventType: consts.AIConversationEvent, Data: data}
msg := waitForAIConversationEventCmd(listener)()
aiEvent, ok := msg.(aiConversationEventMsg)
if !ok {
t.Fatalf("expected aiConversationEventMsg, got %T", msg)
}
if aiEvent.event == nil || aiEvent.event.GetConversation() == nil || aiEvent.event.GetConversation().GetID() != "conv-1" {
t.Fatalf("unexpected AI conversation event payload: %+v", aiEvent.event)
}
}
func TestWaitForAIConversationEventCmdReturnsClosedMessage(t *testing.T) {
listener := make(chan *clientpb.Event)
close(listener)
msg := waitForAIConversationEventCmd(listener)()
if _, ok := msg.(aiListenerClosedMsg); !ok {
t.Fatalf("expected aiListenerClosedMsg, got %T", msg)
}
}
func TestAIModelAppliesSharedConversationEventsWithoutReload(t *testing.T) {
listener := make(chan *clientpb.Event)
close(listener)
model := newAIModel(nil, aiContext{
connection: aiConnectionSummary{Operator: "alice"},
}, listener)
model.loading = false
model.conversations = []*clientpb.AIConversation{{ID: "conv-1", Title: "First"}}
updated, cmd := model.Update(aiConversationEventMsg{event: &clientpb.AIConversationEvent{
EventType: clientpb.AIConversationEventType_AI_CONVERSATION_EVENT_TYPE_CONVERSATION_UPDATED,
Conversation: &clientpb.AIConversation{
ID: "conv-2",
OperatorName: "bob",
Title: "Shared thread",
},
}})
nextModel := updated.(*aiModel)
if nextModel.loading {
t.Fatal("did not expect shared conversation event to trigger a reload")
}
if conversationIndexByID(nextModel.conversations, "conv-2") < 0 {
t.Fatalf("expected shared conversation to be merged locally, got %+v", nextModel.conversations)
}
if cmd == nil {
t.Fatal("expected shared conversation event to continue listening for events")
}
}
func TestAIModelAppliesDeleteEventsWhileAwaitingResponse(t *testing.T) {
listener := make(chan *clientpb.Event)
close(listener)
model := newAIModel(nil, aiContext{
connection: aiConnectionSummary{Operator: "alice"},
}, listener)
model.loading = false
model.awaitingResponse = true
model.currentConversation = &clientpb.AIConversation{
ID: "conv-2",
OperatorName: "alice",
UpdatedAt: 100,
TurnState: clientpb.AIConversationTurnState_AI_TURN_STATE_IN_PROGRESS,
Messages: []*clientpb.AIConversationMessage{
{Role: "user", Content: "still waiting"},
},
}
model.conversations = []*clientpb.AIConversation{
{ID: "conv-2", Title: "Current"},
{ID: "conv-1", Title: "Fallback"},
}
updated, cmd := model.Update(aiConversationEventMsg{event: &clientpb.AIConversationEvent{
EventType: clientpb.AIConversationEventType_AI_CONVERSATION_EVENT_TYPE_CONVERSATION_DELETED,
ConversationID: "conv-2",
Conversation: &clientpb.AIConversation{
ID: "conv-2",
},
}})
nextModel := updated.(*aiModel)
if nextModel.loading {
t.Fatal("did not expect delete tombstone to trigger a reload")
}
if nextModel.currentConversation != nil {
t.Fatalf("expected deleted conversation to be cleared, got %+v", nextModel.currentConversation)
}
if conversationIndexByID(nextModel.conversations, "conv-2") >= 0 {
t.Fatalf("expected deleted conversation to be removed, got %+v", nextModel.conversations)
}
if cmd == nil {
t.Fatal("expected delete tombstone to continue listening for events")
}
}
type aiRPCServer struct {
rpcpb.UnimplementedSliverRPCServer
mu sync.Mutex
providersResp *clientpb.AIProviderConfigs
conversationsResp *clientpb.AIConversations
conversationByID map[string]*clientpb.AIConversation
saveConversationResp *clientpb.AIConversation
saveMessageResp *clientpb.AIConversationMessage
getProvidersCalls int
getConversationsCalls int
getConversationReqs []*clientpb.AIConversationReq
deleteConversationReqs []*clientpb.AIConversationReq
saveConversationReqs []*clientpb.AIConversation
saveMessageReqs []*clientpb.AIConversationMessage
getConversationStart chan struct{}
getConversationWait <-chan struct{}
saveMessageStarted chan struct{}
saveMessageRelease <-chan struct{}
}
func (s *aiRPCServer) GetAIProviders(context.Context, *commonpb.Empty) (*clientpb.AIProviderConfigs, error) {
s.mu.Lock()
defer s.mu.Unlock()
s.getProvidersCalls++
if s.providersResp == nil {
return &clientpb.AIProviderConfigs{}, nil
}
return proto.Clone(s.providersResp).(*clientpb.AIProviderConfigs), nil
}
func (s *aiRPCServer) GetAIConversations(context.Context, *commonpb.Empty) (*clientpb.AIConversations, error) {
s.mu.Lock()
defer s.mu.Unlock()
s.getConversationsCalls++
if s.conversationsResp == nil {
return &clientpb.AIConversations{}, nil
}
return proto.Clone(s.conversationsResp).(*clientpb.AIConversations), nil
}
func (s *aiRPCServer) GetAIConversation(_ context.Context, req *clientpb.AIConversationReq) (*clientpb.AIConversation, error) {
s.mu.Lock()
defer s.mu.Unlock()
s.getConversationReqs = append(s.getConversationReqs, proto.Clone(req).(*clientpb.AIConversationReq))
if s.getConversationStart != nil {
select {
case s.getConversationStart <- struct{}{}:
default:
}
}
if s.getConversationWait != nil {
s.mu.Unlock()
<-s.getConversationWait
s.mu.Lock()
}
if s.conversationByID == nil {
return &clientpb.AIConversation{}, nil
}
conversation := s.conversationByID[req.GetID()]
if conversation == nil {
return &clientpb.AIConversation{}, nil
}
return proto.Clone(conversation).(*clientpb.AIConversation), nil
}
func (s *aiRPCServer) SaveAIConversation(_ context.Context, req *clientpb.AIConversation) (*clientpb.AIConversation, error) {
s.mu.Lock()
defer s.mu.Unlock()
s.saveConversationReqs = append(s.saveConversationReqs, proto.Clone(req).(*clientpb.AIConversation))
if s.saveConversationResp == nil {
return proto.Clone(req).(*clientpb.AIConversation), nil
}
return proto.Clone(s.saveConversationResp).(*clientpb.AIConversation), nil
}
func (s *aiRPCServer) DeleteAIConversation(_ context.Context, req *clientpb.AIConversationReq) (*commonpb.Empty, error) {
s.mu.Lock()
defer s.mu.Unlock()
s.deleteConversationReqs = append(s.deleteConversationReqs, proto.Clone(req).(*clientpb.AIConversationReq))
return &commonpb.Empty{}, nil
}
func (s *aiRPCServer) SaveAIConversationMessage(_ context.Context, req *clientpb.AIConversationMessage) (*clientpb.AIConversationMessage, error) {
s.mu.Lock()
defer s.mu.Unlock()
s.saveMessageReqs = append(s.saveMessageReqs, proto.Clone(req).(*clientpb.AIConversationMessage))
if s.saveMessageStarted != nil {
select {
case s.saveMessageStarted <- struct{}{}:
default:
}
}
if s.saveMessageRelease != nil {
s.mu.Unlock()
<-s.saveMessageRelease
s.mu.Lock()
}
if s.saveMessageResp == nil {
return proto.Clone(req).(*clientpb.AIConversationMessage), nil
}
return proto.Clone(s.saveMessageResp).(*clientpb.AIConversationMessage), nil
}
func newAITestRPCClient(t *testing.T, srv rpcpb.SliverRPCServer) (rpcpb.SliverRPCClient, func()) {
t.Helper()
listener := bufconn.Listen(1024 * 1024)
grpcServer := grpc.NewServer()
rpcpb.RegisterSliverRPCServer(grpcServer, srv)
go func() {
_ = grpcServer.Serve(listener)
}()
dialer := func(context.Context, string) (net.Conn, error) { return listener.Dial() }
conn, err := grpc.DialContext(context.Background(), "bufnet",
grpc.WithContextDialer(dialer),
grpc.WithTransportCredentials(insecure.NewCredentials()),
)
if err != nil {
grpcServer.Stop()
_ = listener.Close()
t.Fatalf("dial bufconn: %v", err)
}
cleanup := func() {
_ = conn.Close()
grpcServer.Stop()
_ = listener.Close()
}
return rpcpb.NewSliverRPCClient(conn), cleanup
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+23
View File
@@ -0,0 +1,23 @@
# client/command/aka
## Overview
Implements the 'aka' command group for the Sliver client console. "Aka"s are
command aliases (like 'alias' in 'bash') that allow operators to specify
shorthand commands and default arguments for commonly used commands.
### Examples:
- `aka create bg background`: Allows an operator to run `bg` from the implant
menu to quickly move back to the server menu
- `aka create execw execute -o "C:\Windows\System32\cmd.exe" /c`: Shorthand for
executing binaries on Windows targets like: `execw arp -a`
## Go Files
- `commands.go` – Wires Cobra commands for listing, creating, and deleting command aliases in the client console.
- `create.go` – Handles creating command aliases to use by the client.
- `delete.go` – Removes command aliases currently tracked by the client.
- `hook.go` – The main hooking logic to intercept commands ran by the client console. The hook will intercept processing before hitting the Cobra tree to transform the command alias to a full command with default arguments from the command alias and user-provided arguments to the alias.
- `list.go` - Lists the current command aliases tracked by the client.
- `storage.go` - Supports the saving of aliases to disk to keep between runs of the client.
+59
View File
@@ -0,0 +1,59 @@
package aka
import (
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/client/constants"
"github.com/spf13/cobra"
)
func ServerCommands(con *console.SliverClient) []*cobra.Command {
return commands(con, constants.GenericHelpGroup)
}
func ImplantCommands(con *console.SliverClient) []*cobra.Command {
return commands(con, constants.SliverCoreHelpGroup)
}
func commands(con *console.SliverClient, group string) []*cobra.Command {
akaCommand := &cobra.Command{
Use: "aka",
Short: "Manage command aliases (aka's)",
Run: func(cmd *cobra.Command, args []string) {
AkaListCmd(cmd, con, args)
},
GroupID: group,
}
createAka := &cobra.Command{
Use: "create <alias> <command> [args...]",
Short: "Create a new command alias (aka)",
Args: cobra.MinimumNArgs(2),
DisableFlagParsing: true, // No flags with aka create so we capture flags to other commands
DisableFlagsInUseLine: true,
Run: func(cmd *cobra.Command, args []string) {
AkaCreateCmd(cmd, con, args)
},
}
createAka.InitDefaultHelpFlag()
createAka.Flags().Lookup("help").Hidden = true
akaCommand.AddCommand(createAka)
deleteAka := &cobra.Command{
Use: "delete <alias>",
Short: "Delete a command alias (aka)",
Args: cobra.MinimumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
AkaDeleteCmd(cmd, con, args)
},
}
akaCommand.AddCommand(deleteAka)
con.App.PreCmdRunLineHooks = append(con.App.PreCmdRunLineHooks, Cmdhook)
err := LoadAkaAliases()
if err != nil {
con.PrintErrorf("Failed to load aka alises: %s\n", err)
}
return []*cobra.Command{akaCommand}
}
+46
View File
@@ -0,0 +1,46 @@
package aka
import (
"fmt"
"strings"
"github.com/bishopfox/sliver/client/console"
"github.com/spf13/cobra"
)
func AkaCreateCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
aliasName := args[0]
command := args[1]
defaultArgs := args[2:] // anything else is going to be the default args to the alias
if _, exists := akaAliases[aliasName]; exists {
con.PrintErrorf("Alias '%s' already exists\n", aliasName)
return
}
var desc string
if len(defaultArgs) == 0 {
desc = fmt.Sprintf("%s", command)
} else {
desc = fmt.Sprintf("%s %s", command, strings.Join(defaultArgs, " "))
}
alias := &AkaAlias{
Name: aliasName,
Command: command,
DefaultArgs: defaultArgs,
Description: desc,
}
akaAliases[aliasName] = alias
// save this new alias to disk
err := SaveAkaAliases()
if err != nil {
con.PrintErrorf("Failed to save alias '%s' to disk: %s\n", aliasName, err)
// we still technically added it to the map, so the alias did get created in
// memory so we should still print the Info message below
}
con.PrintInfof("Create alias for '%s' -> '%v'\n", aliasName, alias.Description)
}
+25
View File
@@ -0,0 +1,25 @@
package aka
import (
"github.com/bishopfox/sliver/client/console"
"github.com/spf13/cobra"
)
func AkaDeleteCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
aliasName := args[0]
if _, exists := akaAliases[aliasName]; !exists {
con.PrintErrorf("Alias '%s' does not exist\n", aliasName)
return
}
delete(akaAliases, aliasName)
// Save updated map to disk
err := SaveAkaAliases()
if err != nil {
con.PrintErrorf("Failed to save aliases to disk: %s\n", err)
return
}
con.PrintInfof("Deleted alias '%s'\n", aliasName)
}
+27
View File
@@ -0,0 +1,27 @@
package aka
import (
"strings"
)
func Cmdhook(args []string) ([]string, error) {
if len(args) == 0 {
return args, nil
}
if aliasArgs, exists := akaAliases[args[0]]; exists {
var expandedArgs []string
expandedArgs = append(expandedArgs, aliasArgs.Command)
expandedArgs = append(expandedArgs, aliasArgs.DefaultArgs...)
// join the user passed args so the shell processes it without flags if
// available
if len(args[1:]) > 0 {
expandedArgs = append(expandedArgs, strings.Join(args[1:], " "))
}
return expandedArgs, nil
}
return args, nil
}
+31
View File
@@ -0,0 +1,31 @@
package aka
import (
"github.com/bishopfox/sliver/client/command/settings"
"github.com/bishopfox/sliver/client/console"
"github.com/jedib0t/go-pretty/v6/table"
"github.com/spf13/cobra"
)
func AkaListCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
if len(akaAliases) == 0 {
con.PrintInfof("No command aliases created. Use `aka create` to create one.\n")
return
}
tw := table.NewWriter()
tw.SetStyle(settings.GetTableStyle(con))
tw.AppendHeader(table.Row{
"Alias",
"Command",
})
for alias, cmd := range akaAliases {
tw.AppendRow(table.Row{
alias,
cmd.Description,
})
}
con.Printf("%s\n", tw.Render())
}
+68
View File
@@ -0,0 +1,68 @@
package aka
import (
"encoding/json"
"os"
"path/filepath"
"github.com/bishopfox/sliver/client/assets"
)
type AkaAlias struct {
Name string `json:"name"` // alias Name
Command string `json:"command"` // command being aliased
DefaultArgs []string `json:"default_args"` // args passed by the user
Description string `json:"description"`
}
var akaAliases = make(map[string]*AkaAlias)
const (
akaAliasFileName = "aka-aliases.json"
)
func GetAkaAliasesFilePath() string {
return filepath.Join(assets.GetRootAppDir(), akaAliasFileName)
}
func LoadAkaAliases() error {
filepath := GetAkaAliasesFilePath()
data, err := os.ReadFile(filepath)
if err != nil {
// if file hasn't been created yet, we fail gracefully
if os.IsNotExist(err) {
return nil
}
// otherwise, return the actual error; something else went wrong
return err
}
aliases := []AkaAlias{}
err = json.Unmarshal(data, &aliases)
if err != nil {
return err
}
akaAliases = make(map[string]*AkaAlias)
for _, alias := range aliases {
akaAliases[alias.Name] = &alias
}
return nil
}
func SaveAkaAliases() error {
filepath := GetAkaAliasesFilePath()
aliases := make([]*AkaAlias, 0, len(akaAliases))
for _, alias := range akaAliases {
aliases = append(aliases, alias)
}
data, err := json.MarshalIndent(aliases, "", " ")
if err != nil {
return err
}
return os.WriteFile(filepath, data, 0o600)
}
+10 -7
View File
@@ -1,11 +1,14 @@
Alias
===========
# client/command/alias
Wraps external DLLs/tool in Sliver console commands.
## Overview
Implements the 'alias' command group for the Sliver client console. Handlers map Cobra invocations to alias workflows such as install, load, and remove.
## Go Files
### Format
* `alias-dir/`
* * `manifest.json` -
- `alias.go` – Implements runtime alias management, printing installed aliases and exposing tab-completion helpers.
- `alias_test.go` *(tests)* – Exercises manifest parsing logic to ensure alias metadata is interpreted correctly.
- `commands.go` – Wires Cobra commands for listing, installing, loading, and removing aliases into the client console.
- `install.go` – Handles installing alias bundles from directories or archives, writing manifests and payload artifacts to disk.
- `load.go` – Loads alias manifests, validates target compatibility, and registers commands against the active console.
- `remove.go` – Removes installed aliases, prompting for confirmation and deleting associated on-disk assets.
+23 -9
View File
@@ -21,28 +21,31 @@ package alias
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"strings"
"github.com/bishopfox/sliver/client/assets"
"github.com/bishopfox/sliver/client/command/settings"
"github.com/bishopfox/sliver/client/console"
"github.com/desertbit/grumble"
"github.com/jedib0t/go-pretty/v6/table"
"github.com/jedib0t/go-pretty/v6/text"
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)
// AliasesCmd - The alias command
func AliasesCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
// AliasesCmd - The alias command.
func AliasesCmd(cmd *cobra.Command, con *console.SliverClient, args []string) error {
if 0 < len(loadedAliases) {
PrintAliases(con)
} else {
con.PrintInfof("No aliases installed, use the 'armory' command to automatically install some\n")
}
return nil
}
// PrintAliases - Print a list of loaded aliases
func PrintAliases(con *console.SliverConsoleClient) {
// PrintAliases - Print a list of loaded aliases.
func PrintAliases(con *console.SliverClient) {
tw := table.NewWriter()
tw.SetStyle(settings.GetTableStyle(con))
tw.AppendHeader(table.Row{
@@ -84,8 +87,8 @@ func PrintAliases(con *console.SliverConsoleClient) {
con.Println(tw.Render())
}
// AliasCommandNameCompleter - Completer for installed extensions command names
func AliasCommandNameCompleter(prefix string, args []string, con *console.SliverConsoleClient) []string {
// AliasCommandNameCompleter - Completer for installed extensions command names.
func AliasCommandNameCompleter(prefix string, args []string, con *console.SliverClient) []string {
results := []string{}
for name := range loadedAliases {
if strings.HasPrefix(name, prefix) {
@@ -111,7 +114,7 @@ func getInstalledManifests() map[string]*AliasManifest {
manifestPaths := assets.GetInstalledAliasManifests()
installedManifests := map[string]*AliasManifest{}
for _, manifestPath := range manifestPaths {
data, err := ioutil.ReadFile(manifestPath)
data, err := os.ReadFile(manifestPath)
if err != nil {
continue
}
@@ -124,3 +127,14 @@ func getInstalledManifests() map[string]*AliasManifest {
}
return installedManifests
}
// AliasCommandNameCompleter - Completer for installed extensions command names.
func AliasCompleter() carapace.Action {
return carapace.ActionCallback(func(c carapace.Context) carapace.Action {
results := []string{}
for name := range loadedAliases {
results = append(results, name)
}
return carapace.ActionValues(results...).Tag("aliases")
})
}
+64
View File
@@ -0,0 +1,64 @@
package alias
import (
"github.com/bishopfox/sliver/client/command/completers"
"github.com/bishopfox/sliver/client/command/flags"
"github.com/bishopfox/sliver/client/command/help"
"github.com/bishopfox/sliver/client/console"
consts "github.com/bishopfox/sliver/client/constants"
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)
// Commands returns the `alias` command and its child commands.
func Commands(con *console.SliverClient) []*cobra.Command {
aliasCmd := &cobra.Command{
Use: consts.AliasesStr,
Short: "List current aliases",
Long: help.GetHelpFor([]string{consts.AliasesStr}),
Run: func(cmd *cobra.Command, args []string) {
AliasesCmd(cmd, con, args)
},
GroupID: consts.GenericHelpGroup,
}
aliasLoadCmd := &cobra.Command{
Use: consts.LoadStr + " [ALIAS]",
Short: "Load a command alias",
Long: help.GetHelpFor([]string{consts.AliasesStr, consts.LoadStr}),
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
AliasesLoadCmd(cmd, con, args)
},
}
aliasCmd.AddCommand(aliasLoadCmd)
flags.NewCompletions(aliasLoadCmd).PositionalCompletion(carapace.ActionDirectories().Tag("alias directory").Usage("path to the alias directory"))
completers.RegisterLocalFilePathPositionalCompletion(aliasLoadCmd, 0)
aliasInstallCmd := &cobra.Command{
Use: consts.InstallStr + " [ALIAS]",
Short: "Install a command alias",
Long: help.GetHelpFor([]string{consts.AliasesStr, consts.InstallStr}),
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
AliasesInstallCmd(cmd, con, args)
},
}
aliasCmd.AddCommand(aliasInstallCmd)
flags.NewCompletions(aliasInstallCmd).PositionalCompletion(carapace.ActionFiles().Tag("alias file"))
completers.RegisterLocalFilePathPositionalCompletion(aliasInstallCmd, 0)
aliasRemove := &cobra.Command{
Use: consts.RmStr + " [ALIAS]",
Short: "Remove an alias",
Long: help.GetHelpFor([]string{consts.RmStr}),
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
AliasesRemoveCmd(cmd, con, args)
},
}
flags.NewCompletions(aliasRemove).PositionalCompletion(AliasCompleter())
aliasCmd.AddCommand(aliasRemove)
return []*cobra.Command{aliasCmd}
}
+34 -31
View File
@@ -20,36 +20,35 @@ package alias
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
"github.com/AlecAivazis/survey/v2"
"github.com/bishopfox/sliver/client/assets"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/client/forms"
"github.com/bishopfox/sliver/util"
"github.com/desertbit/grumble"
"github.com/spf13/cobra"
)
// AliasesInstallCmd - Install an alias
func AliasesInstallCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
aliasLocalPath := ctx.Args.String("path")
// AliasesInstallCmd - Install an alias.
func AliasesInstallCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
aliasLocalPath := args[0]
fi, err := os.Stat(aliasLocalPath)
if os.IsNotExist(err) {
con.PrintErrorf("Extension path '%s' does not exist", aliasLocalPath)
con.PrintErrorf("Alias path '%s' does not exist", aliasLocalPath)
return
}
if !fi.IsDir() {
InstallFromFile(aliasLocalPath, false, con)
InstallFromFile(aliasLocalPath, "", false, con)
} else {
installFromDir(aliasLocalPath, con)
}
}
// Install an extension from a directory
func installFromDir(aliasLocalPath string, con *console.SliverConsoleClient) {
manifestData, err := ioutil.ReadFile(filepath.Join(aliasLocalPath, ManifestFileName))
// Install an extension from a directory.
func installFromDir(aliasLocalPath string, con *console.SliverClient) {
manifestData, err := os.ReadFile(filepath.Join(aliasLocalPath, ManifestFileName))
if err != nil {
con.PrintErrorf("Error reading %s: %s", ManifestFileName, err)
return
@@ -63,8 +62,7 @@ func installFromDir(aliasLocalPath string, con *console.SliverConsoleClient) {
if _, err := os.Stat(installPath); !os.IsNotExist(err) {
con.PrintInfof("Alias '%s' already exists", manifest.CommandName)
confirm := false
prompt := &survey.Confirm{Message: "Overwrite current install?"}
survey.AskOne(prompt, &confirm)
_ = forms.Confirm("Overwrite current install?", &confirm)
if !confirm {
return
}
@@ -74,12 +72,12 @@ func installFromDir(aliasLocalPath string, con *console.SliverConsoleClient) {
con.PrintInfof("Installing alias '%s' (%s) ... ", manifest.Name, manifest.Version)
err = os.MkdirAll(installPath, 0o700)
if err != nil {
con.PrintErrorf("\nError creating alias directory: %s\n", err)
con.PrintErrorf("Error creating alias directory: %s\n", err)
return
}
err = ioutil.WriteFile(filepath.Join(installPath, ManifestFileName), manifestData, 0o600)
err = os.WriteFile(filepath.Join(installPath, ManifestFileName), manifestData, 0o600)
if err != nil {
con.PrintErrorf("\nFailed to write %s: %s\n", ManifestFileName, err)
con.PrintErrorf("Failed to write %s: %s\n", ManifestFileName, err)
forceRemoveAll(installPath)
return
}
@@ -90,7 +88,7 @@ func installFromDir(aliasLocalPath string, con *console.SliverConsoleClient) {
dst := filepath.Join(installPath, util.ResolvePath(cmdFile.Path))
err := util.CopyFile(src, dst)
if err != nil {
con.PrintErrorf("\nError copying file '%s' -> '%s': %s\n", src, dst, err)
con.PrintErrorf("Error copying file '%s' -> '%s': %s\n", src, dst, err)
forceRemoveAll(installPath)
return
}
@@ -100,8 +98,8 @@ func installFromDir(aliasLocalPath string, con *console.SliverConsoleClient) {
con.Printf("done!\n")
}
// Install an extension from a .tar.gz file
func InstallFromFile(aliasGzFilePath string, autoOverwrite bool, con *console.SliverConsoleClient) *string {
// Install an extension from a .tar.gz file.
func InstallFromFile(aliasGzFilePath string, aliasName string, promptToOverwrite bool, con *console.SliverClient) *string {
manifestData, err := util.ReadFileFromTarGz(aliasGzFilePath, fmt.Sprintf("./%s", ManifestFileName))
if err != nil {
con.PrintErrorf("Failed to read %s from '%s': %s\n", ManifestFileName, aliasGzFilePath, err)
@@ -109,16 +107,21 @@ func InstallFromFile(aliasGzFilePath string, autoOverwrite bool, con *console.Sl
}
manifest, err := ParseAliasManifest(manifestData)
if err != nil {
con.PrintErrorf("Failed to parse %s: %s\n", ManifestFileName, err)
errorMsg := ""
if aliasName != "" {
errorMsg = fmt.Sprintf("Error processing manifest for alias %s - failed to parse %s: %s\n", aliasName, ManifestFileName, err)
} else {
errorMsg = fmt.Sprintf("Failed to parse %s: %s\n", ManifestFileName, err)
}
con.PrintErrorf("%s", errorMsg)
return nil
}
installPath := filepath.Join(assets.GetAliasesDir(), filepath.Base(manifest.CommandName))
if _, err := os.Stat(installPath); !os.IsNotExist(err) {
if !autoOverwrite {
if promptToOverwrite {
con.PrintInfof("Alias '%s' already exists\n", manifest.CommandName)
confirm := false
prompt := &survey.Confirm{Message: "Overwrite current install?"}
survey.AskOne(prompt, &confirm)
_ = forms.Confirm("Overwrite current install?", &confirm)
if !confirm {
return nil
}
@@ -129,20 +132,20 @@ func InstallFromFile(aliasGzFilePath string, autoOverwrite bool, con *console.Sl
con.PrintInfof("Installing alias '%s' (%s) ... ", manifest.Name, manifest.Version)
err = os.MkdirAll(installPath, 0o700)
if err != nil {
con.PrintErrorf("\nFailed to create alias directory: %s\n", err)
con.PrintErrorf("Failed to create alias directory: %s\n", err)
return nil
}
err = ioutil.WriteFile(filepath.Join(installPath, ManifestFileName), manifestData, 0o600)
err = os.WriteFile(filepath.Join(installPath, ManifestFileName), manifestData, 0o600)
if err != nil {
con.PrintErrorf("\nFailed to write %s: %s\n", ManifestFileName, err)
con.PrintErrorf("Failed to write %s: %s\n", ManifestFileName, err)
forceRemoveAll(installPath)
return nil
}
for _, aliasFile := range manifest.Files {
if aliasFile.Path != "" {
err := installArtifact(aliasGzFilePath, installPath, aliasFile.Path, con)
err := installArtifact(aliasGzFilePath, installPath, aliasFile.Path)
if err != nil {
con.PrintErrorf("\nFailed to install file: %s\n", err)
con.PrintErrorf("Failed to install file: %s\n", err)
forceRemoveAll(installPath)
return nil
}
@@ -152,8 +155,8 @@ func InstallFromFile(aliasGzFilePath string, autoOverwrite bool, con *console.Sl
return &installPath
}
func installArtifact(aliasGzFilePath string, installPath, artifactPath string, con *console.SliverConsoleClient) error {
data, err := util.ReadFileFromTarGz(aliasGzFilePath, fmt.Sprintf("./%s", strings.TrimPrefix(artifactPath, "/")))
func installArtifact(aliasGzFilePath string, installPath, artifactPath string) error {
data, err := util.ReadFileFromTarGz(aliasGzFilePath, fmt.Sprintf("./%s", strings.TrimPrefix(artifactPath, string(os.PathSeparator))))
if err != nil {
return err
}
@@ -165,7 +168,7 @@ func installArtifact(aliasGzFilePath string, installPath, artifactPath string, c
if _, err := os.Stat(artifactDir); os.IsNotExist(err) {
os.MkdirAll(artifactDir, 0o700)
}
err = ioutil.WriteFile(localArtifactPath, data, 0o600)
err = os.WriteFile(localArtifactPath, data, 0o600)
if err != nil {
return err
}
+410 -126
View File
@@ -22,21 +22,24 @@ import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path"
"path/filepath"
"strings"
"github.com/AlecAivazis/survey/v2"
"github.com/bishopfox/sliver/client/assets"
"github.com/bishopfox/sliver/client/command/help"
"github.com/bishopfox/sliver/client/console"
consts "github.com/bishopfox/sliver/client/constants"
"github.com/bishopfox/sliver/client/forms"
"github.com/bishopfox/sliver/client/packages"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/bishopfox/sliver/protobuf/sliverpb"
"github.com/bishopfox/sliver/util"
"github.com/desertbit/grumble"
"github.com/carapace-sh/carapace"
app "github.com/reeflective/console"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"google.golang.org/protobuf/proto"
)
@@ -51,30 +54,40 @@ const (
)
var (
// alias name -> manifest/command
// alias name -> manifest/command.
loadedAliases = map[string]*loadedAlias{}
defaultHostProc = map[string]string{
"windows": windowsDefaultHostProc,
"linux": windowsDefaultHostProc,
"linux": linuxDefaultHostProc,
"darwin": macosDefaultHostProc,
}
)
// Ties the manifest struct to the command struct
// Ties the manifest struct to the command struct.
type loadedAlias struct {
Manifest *AliasManifest
Command *grumble.Command
Command *cobra.Command
}
// AliasFile - An OS/Arch specific file
// AliasFile - An OS/Arch specific file.
type AliasFile struct {
OS string `json:"os"`
Arch string `json:"arch"`
Path string `json:"path"`
}
// AliasManifest - The manifest for an alias, contains metadata
// AliasArgument - An argument for an alias command.
type AliasArgument struct {
Name string `json:"name"`
Type string `json:"type"`
Desc string `json:"desc"`
Optional bool `json:"optional"`
Default interface{} `json:"default,omitempty"`
Choices []string `json:"choices,omitempty"`
}
// AliasManifest - The manifest for an alias, contains metadata.
type AliasManifest struct {
Name string `json:"name"`
Version string `json:"version"`
@@ -84,14 +97,18 @@ type AliasManifest struct {
Help string `json:"help"`
LongHelp string `json:"long_help"`
Entrypoint string `json:"entrypoint"`
AllowArgs bool `json:"allow_args"`
DefaultArgs string `json:"default_args"`
Files []*AliasFile `json:"files"`
IsReflective bool `json:"is_reflective"`
IsAssembly bool `json:"is_assembly"`
Entrypoint string `json:"entrypoint"`
AllowArgs bool `json:"allow_args"`
DefaultArgs string `json:"default_args"`
Arguments []*AliasArgument `json:"arguments"`
Files []*AliasFile `json:"files"`
IsReflective bool `json:"is_reflective"`
IsAssembly bool `json:"is_assembly"`
Schema *packages.OutputSchema `json:"schema"`
RootPath string `json:"-"`
RootPath string `json:"-"`
ArmoryName string `json:"-"`
ArmoryPK string `json:"-"`
}
func (ec *AliasManifest) getDefaultProcess(targetOS string) (proc string, err error) {
@@ -102,7 +119,7 @@ func (ec *AliasManifest) getDefaultProcess(targetOS string) (proc string, err er
return
}
func (a *AliasManifest) getFileForTarget(cmdName string, targetOS string, targetArch string) (string, error) {
func (a *AliasManifest) getFileForTarget(_ string, targetOS string, targetArch string) (string, error) {
filePath := ""
for _, extFile := range a.Files {
if targetOS == extFile.OS && targetArch == extFile.Arch {
@@ -122,9 +139,10 @@ func (a *AliasManifest) getFileForTarget(cmdName string, targetOS string, target
}
// AliasesLoadCmd - Locally load a alias into the Sliver shell.
func AliasesLoadCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
dirPath := ctx.Args.String("dir-path")
alias, err := LoadAlias(dirPath, con)
func AliasesLoadCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
dirPath := args[0]
// dirPath := ctx.Args.String("dir-path")
alias, err := LoadAlias(dirPath, cmd.Root(), con)
if err != nil {
con.PrintErrorf("Failed to load alias: %s\n", err)
} else {
@@ -132,8 +150,8 @@ func AliasesLoadCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
}
}
// LoadAlias - Load an alias into the Sliver shell from a given directory
func LoadAlias(manifestPath string, con *console.SliverConsoleClient) (*AliasManifest, error) {
// LoadAlias - Load an alias into the Sliver shell from a given directory.
func LoadAlias(manifestPath string, cmd *cobra.Command, con *console.SliverClient) (*AliasManifest, error) {
// retrieve alias manifest
var err error
manifestPath, err = filepath.Abs(manifestPath)
@@ -142,7 +160,7 @@ func LoadAlias(manifestPath string, con *console.SliverConsoleClient) (*AliasMan
}
// parse it
data, err := ioutil.ReadFile(manifestPath)
data, err := os.ReadFile(manifestPath)
if err != nil {
return nil, err
}
@@ -151,52 +169,95 @@ func LoadAlias(manifestPath string, con *console.SliverConsoleClient) (*AliasMan
return nil, err
}
aliasManifest.RootPath = filepath.Dir(manifestPath)
// for each alias command, add a new app command
// do not add if the command already exists
if cmdExists(aliasManifest.CommandName, con.App) {
return nil, fmt.Errorf("'%s' command already exists", aliasManifest.CommandName)
// Build usage string including arguments
usage := strings.Builder{}
usage.WriteString(aliasManifest.CommandName)
for _, arg := range aliasManifest.Arguments {
usage.WriteString(" ")
if arg.Optional {
usage.WriteString("[")
}
usage.WriteString(strings.ToUpper(arg.Name))
if arg.Optional {
usage.WriteString("]")
}
}
helpMsg := fmt.Sprintf("[%s] %s", aliasManifest.Name, aliasManifest.Help)
longHelpMsg := help.FormatHelpTmpl(aliasManifest.LongHelp)
longHelpMsg += "\n\n⚠️ If you're having issues passing arguments to the alias please read:\n"
longHelpMsg += "https://github.com/BishopFox/sliver/wiki/Aliases-&-Extensions#aliases-command-parsing"
addAliasCmd := &grumble.Command{
Name: aliasManifest.CommandName,
Help: helpMsg,
LongHelp: longHelpMsg,
Run: func(extCtx *grumble.Context) error {
con.Println()
runAliasCommand(extCtx, con)
con.Println()
return nil
},
Flags: func(f *grumble.Flags) {
if aliasManifest.IsAssembly {
f.String("m", "method", "", "Optional method (a method is required for a .NET DLL)")
f.String("c", "class", "", "Optional class name (required for .NET DLL)")
f.String("d", "app-domain", "", "AppDomain name to create for .NET assembly. Generated randomly if not set.")
f.String("a", "arch", "x84", "Assembly target architecture: x86, x64, x84 (x86+x64)")
f.Bool("i", "in-process", false, "Run in the current sliver process")
f.String("r", "runtime", "", "Runtime to use for running the assembly (only supported when used with --in-process)")
f.Bool("M", "amsi-bypass", false, "Bypass AMSI on Windows (only supported when used with --in-process)")
f.Bool("E", "etw-bypass", false, "Bypass ETW on Windows (only supported when used with --in-process)")
// Build long help message
longHelp := strings.Builder{}
longHelp.WriteString("[[.Bold]]Command:[[.Normal]]")
longHelp.WriteString(usage.String())
longHelp.WriteString("\n")
if len(aliasManifest.Help) > 0 || len(aliasManifest.LongHelp) > 0 {
longHelp.WriteString("[[.Bold]]About:[[.Normal]]")
if len(aliasManifest.Help) > 0 {
longHelp.WriteString(aliasManifest.Help)
longHelp.WriteString("\n")
}
if len(aliasManifest.LongHelp) > 0 {
longHelp.WriteString(aliasManifest.LongHelp)
longHelp.WriteString("\n")
}
}
if len(aliasManifest.Arguments) > 0 {
longHelp.WriteString("[[.Bold]]Arguments:[[.Normal]]")
for _, arg := range aliasManifest.Arguments {
longHelp.WriteString("\n\t")
optStr := ""
if arg.Optional {
optStr = "[OPTIONAL]"
}
f.String("p", "process", "", "Path to process to host the shared object")
f.String("A", "process-arguments", "", "arguments to pass to the hosting process")
f.Uint("P", "ppid", 0, "parent process ID to use when creating the hosting process (Windows only)")
f.Bool("s", "save", false, "Save output to disk")
f.Int("t", "timeout", defaultTimeout, "command timeout in seconds")
},
Args: func(a *grumble.Args) {
a.StringList("arguments", "arguments", grumble.Default([]string{}))
},
HelpGroup: consts.AliasHelpGroup,
aType := arg.Type
if aType == "wstring" {
aType = "string"
}
longHelp.WriteString(fmt.Sprintf("%s (%s):\t%s%s", strings.ToUpper(arg.Name), aType, optStr, arg.Desc))
}
}
con.App.AddCommand(addAliasCmd)
longHelp.WriteString("\n\n⚠️ If you're having issues passing arguments to the alias please read:\n")
longHelp.WriteString("https://github.com/BishopFox/sliver/wiki/Aliases-&-Extensions#aliases-command-parsing")
// for each alias command, add a new app command
helpMsg := fmt.Sprintf("[%s] %s", aliasManifest.Name, aliasManifest.Help)
addAliasCmd := &cobra.Command{
Use: usage.String(),
Short: helpMsg,
Long: help.FormatHelpTmpl(longHelp.String()),
Run: func(cmd *cobra.Command, args []string) {
runAliasCommand(cmd, con, args)
},
Args: cobra.ArbitraryArgs, // a.StringList("arguments", "arguments", grumble.Default([]string{}))
GroupID: consts.AliasHelpGroup,
Annotations: makeAliasPlatformFilters(aliasManifest),
}
if aliasManifest.IsAssembly {
f := pflag.NewFlagSet("assembly", pflag.ContinueOnError)
f.StringP("method", "m", "", "Optional method (a method is required for a .NET DLL)")
f.StringP("class", "c", "", "Optional class name (required for .NET DLL)")
f.StringP("app-domain", "d", "", "AppDomain name to create for .NET assembly. Generated randomly if not set.")
f.StringP("arch", "a", "x84", "Assembly target architecture: x86, x64, x84 (x86+x64)")
f.BoolP("in-process", "i", false, "Run in the current sliver process")
f.StringP("runtime", "r", "v4.0.30319", "Runtime to use for running the assembly")
f.BoolP("amsi-bypass", "M", false, "Bypass AMSI on Windows")
f.BoolP("etw-bypass", "E", false, "Bypass ETW on Windows")
addAliasCmd.Flags().AddFlagSet(f)
}
f := pflag.NewFlagSet(aliasManifest.Name, pflag.ContinueOnError)
f.StringP("process", "p", "", "Path to process to host the shared object")
f.StringP("process-arguments", "A", "", "arguments to pass to the hosting process")
f.Uint32P("ppid", "P", 0, "parent process ID to use when creating the hosting process (Windows only)")
f.BoolP("save", "s", false, "Save output to disk")
f.Int64P("timeout", "t", defaultTimeout, "command timeout in seconds")
addAliasCmd.Flags().AddFlagSet(f)
// Setup completions for alias arguments
comps := carapace.Gen(addAliasCmd)
makeAliasArgCompleter(aliasManifest, comps)
cmd.AddCommand(addAliasCmd)
// Have to use a global map here, as passing the aliasCmd
// either by value or by ref fucks things up
@@ -208,7 +269,7 @@ func LoadAlias(manifestPath string, con *console.SliverConsoleClient) (*AliasMan
return aliasManifest, nil
}
// ParseAliasManifest - Parse an alias manifest
// ParseAliasManifest - Parse an alias manifest.
func ParseAliasManifest(data []byte) (*AliasManifest, error) {
// parse it
alias := &AliasManifest{}
@@ -241,10 +302,17 @@ func ParseAliasManifest(data []byte) (*AliasManifest, error) {
}
}
if alias.Schema != nil {
if !packages.IsValidSchemaType(alias.Schema.Name) {
return nil, fmt.Errorf("%s is not a valid schema type", alias.Schema.Name)
}
alias.Schema.IngestColumns()
}
return alias, nil
}
func runAliasCommand(ctx *grumble.Context, con *console.SliverConsoleClient) {
func runAliasCommand(cmd *cobra.Command, con *console.SliverClient, args []string) {
session, beacon := con.ActiveTarget.GetInteractive()
if session == nil && beacon == nil {
return
@@ -259,39 +327,60 @@ func runAliasCommand(ctx *grumble.Context, con *console.SliverConsoleClient) {
goarch = beacon.Arch
}
loadedAlias, ok := loadedAliases[ctx.Command.Name]
loadedAlias, ok := loadedAliases[cmd.Name()]
if !ok {
con.PrintErrorf("No alias found for `%s` command\n", ctx.Command.Name)
con.PrintErrorf("No alias found for `%s` command\n", cmd.Name())
return
}
aliasManifest := loadedAlias.Manifest
binPath, err := aliasManifest.getFileForTarget(ctx.Command.Name, goos, goarch)
binPath, err := aliasManifest.getFileForTarget(cmd.Name(), goos, goarch)
if err != nil {
con.PrintErrorf("Fail to find alias file: %s\n", err)
return
}
args := ctx.Args.StringList("arguments")
var extArgs string
// args := ctx.Args.StringList("arguments")
var extArgsStr string
if len(aliasManifest.DefaultArgs) != 0 && len(args) == 0 {
extArgs = aliasManifest.DefaultArgs
extArgsStr = aliasManifest.DefaultArgs
} else {
extArgs = strings.Join(args, " ")
extArgsStr = strings.Join(args, " ")
}
extArgs = strings.TrimSpace(extArgs)
extArgsStr = strings.TrimSpace(extArgsStr)
entryPoint := aliasManifest.Entrypoint
processArgsStr := ctx.Flags.String("process-arguments")
if len(extArgs) > 256 && (aliasManifest.IsAssembly || !aliasManifest.IsReflective) {
con.PrintWarnf(" Arguments are limited to 256 characters when using the default fork/exec model for .NET assemblies and non-reflective PE files.\nConsider using the --in-process flag to execute .NET assemblies in-process and work around this limitation.\n")
processArgsStr, _ := cmd.Flags().GetString("process-arguments")
// Special case for payloads with pass to Donut (.NET assemblies and sideloaded payloads):
// The Donut loader has a hard limit of 256 characters for the command line arguments, so
// we're alerting the user that the arguments will be truncated.
if len(extArgsStr) > 256 && (aliasManifest.IsAssembly || !aliasManifest.IsReflective) {
msgStr := ""
// The --in-process flag only exists for .NET assemblies (aliasManifest.IsAssembly == true).
// Groupping the two conditions together could crash the client since ctx.Flags.Type panics
// if the flag is not registered.
if aliasManifest.IsAssembly {
inProcess, _ := cmd.Flags().GetBool("in-process")
runtime, _ := cmd.Flags().GetString("runtime")
amsiBypass, _ := cmd.Flags().GetBool("amsi-bypass")
etwBypass, _ := cmd.Flags().GetBool("etw-bypass")
if !inProcess {
msgStr = " Arguments are limited to 256 characters when using the default fork/exec model for .NET assemblies.\nConsider using the --in-process flag to execute .NET assemblies in-process and work around this limitation.\n"
}
if !inProcess && (runtime != "" || etwBypass || amsiBypass) {
con.PrintErrorf("The --runtime, --etw-bypass, and --amsi-bypass flags can only be used with the --in-process flag\n")
return
}
} else if !aliasManifest.IsReflective {
msgStr = " Arguments are limited to 256 characters when using the default fork/exec model for non-reflective PE payloads.\n"
}
con.PrintWarnf("%s", msgStr)
confirm := false
prompt := &survey.Confirm{Message: "Do you want to continue?"}
survey.AskOne(prompt, &confirm, nil)
forms.Confirm("Do you want to continue?", &confirm)
if !confirm {
return
}
}
processArgs := strings.Split(processArgsStr, " ")
processName := ctx.Flags.String("process")
processName, _ := cmd.Flags().GetString("process")
if processName == "" {
processName, err = aliasManifest.getDefaultProcess(goos)
if err != nil {
@@ -303,15 +392,22 @@ func runAliasCommand(ctx *grumble.Context, con *console.SliverConsoleClient) {
if strings.ToLower(filepath.Ext(binPath)) == ".dll" {
isDLL = true
}
binData, err := ioutil.ReadFile(binPath)
binData, err := os.ReadFile(binPath)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
var outFilePath *os.File
if ctx.Flags.Bool("save") {
outFile := filepath.Base(fmt.Sprintf("%s_%s*.log", filepath.Base(ctx.Command.Name), filepath.Base(session.GetHostname())))
outFilePath, err = ioutil.TempFile("", outFile)
if save, _ := cmd.Flags().GetBool("save"); save {
hostname := ""
if session != nil {
hostname = session.GetHostname()
} else if beacon != nil {
hostname = beacon.GetHostname()
}
outFile := filepath.Base(fmt.Sprintf("%s_%s*.log", filepath.Base(cmd.Name()), filepath.Base(hostname)))
outFilePath, err = os.CreateTemp("", outFile)
if err != nil {
con.PrintErrorf("%s\n", err)
return
@@ -320,26 +416,37 @@ func runAliasCommand(ctx *grumble.Context, con *console.SliverConsoleClient) {
if aliasManifest.IsAssembly {
// Flags
arch, _ := cmd.Flags().GetString("arch")
method, _ := cmd.Flags().GetString("method")
className, _ := cmd.Flags().GetString("class")
appDomain, _ := cmd.Flags().GetString("app-domain")
pPid, _ := cmd.Flags().GetUint32("ppid")
inProcess, _ := cmd.Flags().GetBool("in-process")
runtime, _ := cmd.Flags().GetString("runtime")
amsiBypass, _ := cmd.Flags().GetBool("amsi-bypass")
etwBypass, _ := cmd.Flags().GetBool("etw-bypass")
// Execute Assembly
ctrl := make(chan bool)
msg := fmt.Sprintf("Executing %s %s ...", ctx.Command.Name, extArgs)
msg := fmt.Sprintf("Executing %s %s ...", cmd.Name(), extArgsStr)
con.SpinUntil(msg, ctrl)
executeAssemblyResp, err := con.Rpc.ExecuteAssembly(context.Background(), &sliverpb.ExecuteAssemblyReq{
Request: con.ActiveTarget.Request(ctx),
Request: con.ActiveTarget.Request(cmd),
IsDLL: isDLL,
Process: processName,
Arguments: extArgs,
Arguments: args,
Assembly: binData,
Arch: ctx.Flags.String("arch"),
Method: ctx.Flags.String("method"),
ClassName: ctx.Flags.String("class"),
AppDomain: ctx.Flags.String("app-domain"),
Arch: arch,
Method: method,
ClassName: className,
AppDomain: appDomain,
ProcessArgs: processArgs,
PPid: uint32(ctx.Flags.Uint("ppid")),
InProcess: ctx.Flags.Bool("in-process"),
Runtime: ctx.Flags.String("runtime"),
AmsiBypass: ctx.Flags.Bool("amsi-bypass"),
EtwBypass: ctx.Flags.Bool("etw-bypass"),
PPid: pPid,
InProcess: inProcess,
Runtime: runtime,
AmsiBypass: amsiBypass,
EtwBypass: etwBypass,
})
ctrl <- true
<-ctrl
@@ -355,28 +462,30 @@ func runAliasCommand(ctx *grumble.Context, con *console.SliverConsoleClient) {
con.PrintErrorf("Failed to decode call ext response %s\n", err)
return
}
PrintAssemblyOutput(ctx.Command.Name, executeAssemblyResp, outFilePath, con)
PrintAssemblyOutput(cmd.Name(), aliasManifest.Schema, executeAssemblyResp, outFilePath, con)
})
con.PrintAsyncResponse(executeAssemblyResp.Response)
} else {
PrintAssemblyOutput(ctx.Command.Name, executeAssemblyResp, outFilePath, con)
PrintAssemblyOutput(cmd.Name(), aliasManifest.Schema, executeAssemblyResp, outFilePath, con)
}
} else if aliasManifest.IsReflective {
// Flags
pPid, _ := cmd.Flags().GetUint32("ppid")
// Spawn DLL
ctrl := make(chan bool)
msg := fmt.Sprintf("Executing %s %s ...", ctx.Command.Name, extArgs)
msg := fmt.Sprintf("Executing %s %s ...", cmd.Name(), extArgsStr)
con.SpinUntil(msg, ctrl)
spawnDllResp, err := con.Rpc.SpawnDll(context.Background(), &sliverpb.InvokeSpawnDllReq{
Request: con.ActiveTarget.Request(ctx),
Args: strings.Trim(extArgs, " "),
Request: con.ActiveTarget.Request(cmd),
Args: args,
Data: binData,
ProcessName: processName,
EntryPoint: aliasManifest.Entrypoint,
Kill: true,
ProcessArgs: processArgs,
PPid: uint32(ctx.Flags.Uint("ppid")),
PPid: pPid,
})
ctrl <- true
<-ctrl
@@ -392,29 +501,31 @@ func runAliasCommand(ctx *grumble.Context, con *console.SliverConsoleClient) {
con.PrintErrorf("Failed to decode call ext response %s\n", err)
return
}
PrintSpawnDLLOutput(ctx.Command.Name, spawnDllResp, outFilePath, con)
PrintSpawnDLLOutput(cmd.Name(), aliasManifest.Schema, spawnDllResp, outFilePath, con)
})
con.PrintAsyncResponse(spawnDllResp.Response)
} else {
PrintSpawnDLLOutput(ctx.Command.Name, spawnDllResp, outFilePath, con)
PrintSpawnDLLOutput(cmd.Name(), aliasManifest.Schema, spawnDllResp, outFilePath, con)
}
} else {
// Flags
pPid, _ := cmd.Flags().GetUint32("ppid")
// Sideload
ctrl := make(chan bool)
msg := fmt.Sprintf("Executing %s %s ...", ctx.Command.Name, extArgs)
msg := fmt.Sprintf("Executing %s %s ...", cmd.Name(), extArgsStr)
con.SpinUntil(msg, ctrl)
sideloadResp, err := con.Rpc.Sideload(context.Background(), &sliverpb.SideloadReq{
Request: con.ActiveTarget.Request(ctx),
Args: extArgs,
Request: con.ActiveTarget.Request(cmd),
Args: args,
Data: binData,
EntryPoint: entryPoint,
ProcessName: processName,
Kill: true,
IsDLL: isDLL,
ProcessArgs: processArgs,
PPid: uint32(ctx.Flags.Uint("ppid")),
PPid: pPid,
})
ctrl <- true
<-ctrl
@@ -430,47 +541,220 @@ func runAliasCommand(ctx *grumble.Context, con *console.SliverConsoleClient) {
con.PrintErrorf("Failed to decode call ext response %s\n", err)
return
}
PrintSideloadOutput(ctx.Command.Name, sideloadResp, outFilePath, con)
PrintSideloadOutput(cmd.Name(), aliasManifest.Schema, sideloadResp, outFilePath, con)
})
con.PrintAsyncResponse(sideloadResp.Response)
} else {
PrintSideloadOutput(ctx.Command.Name, sideloadResp, outFilePath, con)
PrintSideloadOutput(cmd.Name(), aliasManifest.Schema, sideloadResp, outFilePath, con)
}
}
}
// PrintSpawnDLLOutput - Prints the output of a spawn dll command
func PrintSpawnDLLOutput(cmdName string, spawnDllResp *sliverpb.SpawnDll, outFilePath *os.File, con *console.SliverConsoleClient) {
con.PrintInfof("%s output:\n%s", cmdName, spawnDllResp.GetResult())
func getOutputWithSchema(schema *packages.OutputSchema, result string) string {
if schema == nil {
return result
}
outputSchema := packages.GetNewPackageOutput(schema.Name)
if outputSchema == nil {
return result
}
err := outputSchema.IngestData([]byte(result), schema.Columns(), schema.GroupBy)
if err != nil {
return result
}
return outputSchema.CreateTable()
}
// PrintSpawnDLLOutput - Prints the output of a spawn dll command.
func PrintSpawnDLLOutput(cmdName string, schema *packages.OutputSchema, spawnDllResp *sliverpb.SpawnDll, outFilePath *os.File, con *console.SliverClient) {
var result string
if schema != nil {
result = getOutputWithSchema(schema, spawnDllResp.GetResult())
} else {
result = spawnDllResp.GetResult()
}
con.PrintInfof("%s output:\n%s", cmdName, result)
// Output the raw result to the file
if outFilePath != nil {
outFilePath.Write([]byte(spawnDllResp.GetResult()))
outFilePath.WriteString(spawnDllResp.GetResult())
con.PrintInfof("Output saved to %s\n", outFilePath.Name())
}
}
// PrintSideloadOutput - Prints the output of a sideload command
func PrintSideloadOutput(cmdName string, sideloadResp *sliverpb.Sideload, outFilePath *os.File, con *console.SliverConsoleClient) {
con.PrintInfof("%s output:\n%s", cmdName, sideloadResp.GetResult())
// PrintSideloadOutput - Prints the output of a sideload command.
func PrintSideloadOutput(cmdName string, schema *packages.OutputSchema, sideloadResp *sliverpb.Sideload, outFilePath *os.File, con *console.SliverClient) {
var result string
if schema != nil {
result = getOutputWithSchema(schema, sideloadResp.GetResult())
} else {
result = sideloadResp.GetResult()
}
con.PrintInfof("%s output:\n%s", cmdName, result)
// Output the raw result to the file
if outFilePath != nil {
outFilePath.Write([]byte(sideloadResp.GetResult()))
outFilePath.WriteString(sideloadResp.GetResult())
con.PrintInfof("Output saved to %s\n", outFilePath.Name())
}
}
// PrintAssemblyOutput - Prints the output of an execute-assembly command
func PrintAssemblyOutput(cmdName string, execAsmResp *sliverpb.ExecuteAssembly, outFilePath *os.File, con *console.SliverConsoleClient) {
con.PrintInfof("%s output:\n%s", cmdName, string(execAsmResp.GetOutput()))
// PrintAssemblyOutput - Prints the output of an execute-assembly command.
func PrintAssemblyOutput(cmdName string, schema *packages.OutputSchema, execAsmResp *sliverpb.ExecuteAssembly, outFilePath *os.File, con *console.SliverClient) {
var result string
if schema != nil {
result = getOutputWithSchema(schema, string(execAsmResp.GetOutput()))
} else {
result = string(execAsmResp.GetOutput())
}
con.PrintInfof("%s output:\n%s", cmdName, result)
// Output the raw result to the file
if outFilePath != nil {
outFilePath.Write(execAsmResp.GetOutput())
con.PrintInfof("Output saved to %s\n", outFilePath.Name())
}
}
func cmdExists(name string, app *grumble.App) bool {
for _, c := range app.Commands().All() {
if name == c.Name {
return true
func makeAliasPlatformFilters(alias *AliasManifest) map[string]string {
filtersOS := make(map[string]bool)
filtersArch := make(map[string]bool)
var all []string
// Only add filters for architectures when there OS matters.
for _, file := range alias.Files {
filtersOS[file.OS] = true
if filtersOS[file.OS] {
filtersArch[file.Arch] = true
}
}
return false
for os, enabled := range filtersOS {
if enabled {
all = append(all, os)
}
}
for arch, enabled := range filtersArch {
if enabled {
all = append(all, arch)
}
}
if len(all) == 0 {
return map[string]string{}
}
return map[string]string{
app.CommandFilterKey: strings.Join(all, ","),
}
}
// makeAliasArgCompleter builds the positional and dash arguments completer for the alias.
// It provides completion for:
// 1. Positional arguments (before --)
// 2. Flag-style arguments after -- (e.g., --target, --port)
func makeAliasArgCompleter(alias *AliasManifest, comps *carapace.Carapace) {
if len(alias.Arguments) == 0 {
return
}
var actions []carapace.Action
for _, arg := range alias.Arguments {
var action carapace.Action
// If choices are defined, use them for completion
if len(arg.Choices) > 0 {
action = carapace.ActionValues(arg.Choices...).Tag("choices")
} else {
// Fall back to type-based completion
switch arg.Type {
case "file":
action = carapace.ActionFiles().Tag("alias data")
default:
action = carapace.ActionValues()
}
}
usage := fmt.Sprintf("(%s) %s", arg.Type, arg.Desc)
if arg.Optional {
usage += " (optional)"
}
actions = append(actions, action.Usage("%s", usage))
}
comps.PositionalCompletion(actions...)
// Add dash completion for flag-style arguments after --
// Pre-build the flag completions at registration time (not in a callback)
flagCompletion := makeAliasFlagNameCompletion(alias)
// Build value completions for each argument type
valueCompletions := make(map[string]carapace.Action)
for _, arg := range alias.Arguments {
// If choices are defined, use them for completion
if len(arg.Choices) > 0 {
valueCompletions[arg.Name] = carapace.ActionValues(arg.Choices...).Tag("choices")
} else {
// Fall back to type-based completion
switch arg.Type {
case "file":
valueCompletions[arg.Name] = carapace.ActionFiles().Tag("file path")
case "bool":
valueCompletions[arg.Name] = carapace.ActionValues("true", "false").Tag("boolean")
default:
valueCompletions[arg.Name] = carapace.ActionValues()
}
}
}
// Use DashAnyCompletion with a smart action that determines context
comps.DashAnyCompletion(
carapace.ActionCallback(func(c carapace.Context) carapace.Action {
// If typing a flag (starts with -)
if strings.HasPrefix(c.Value, "-") {
return flagCompletion
}
// If previous arg was a flag, complete its value
if len(c.Args) > 0 {
lastArg := c.Args[len(c.Args)-1]
if strings.HasPrefix(lastArg, "-") {
flagName := strings.TrimLeft(lastArg, "-")
if action, ok := valueCompletions[flagName]; ok {
return action
}
}
}
// Default: show flag names
return flagCompletion
}),
)
}
// makeAliasFlagNameCompletion creates completion for flag names
func makeAliasFlagNameCompletion(alias *AliasManifest) carapace.Action {
var results []string
for _, arg := range alias.Arguments {
flagName := fmt.Sprintf("--%s", arg.Name)
desc := arg.Desc
if arg.Optional {
desc = fmt.Sprintf("[optional] %s", desc)
}
desc = fmt.Sprintf("(%s) %s", arg.Type, desc)
results = append(results, flagName, desc)
}
return carapace.ActionValuesDescribed(results...).Tag("alias arguments")
}
+9 -9
View File
@@ -24,22 +24,22 @@ import (
"os"
"path/filepath"
"github.com/AlecAivazis/survey/v2"
"github.com/bishopfox/sliver/client/assets"
"github.com/bishopfox/sliver/client/console"
"github.com/desertbit/grumble"
"github.com/bishopfox/sliver/client/forms"
"github.com/spf13/cobra"
)
// AliasesRemoveCmd - Locally load a alias into the Sliver shell.
func AliasesRemoveCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
name := ctx.Args.String("name")
func AliasesRemoveCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
name := args[0]
// name := ctx.Args.String("name")
if name == "" {
con.PrintErrorf("Extension name is required\n")
return
}
confirm := false
prompt := &survey.Confirm{Message: fmt.Sprintf("Remove '%s' alias?", name)}
survey.AskOne(prompt, &confirm)
_ = forms.Confirm(fmt.Sprintf("Remove '%s' alias?", name), &confirm)
if !confirm {
return
}
@@ -52,8 +52,8 @@ func AliasesRemoveCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
}
}
// RemoveAliasByCommandName - Remove an alias by command name
func RemoveAliasByCommandName(commandName string, con *console.SliverConsoleClient) error {
// RemoveAliasByCommandName - Remove an alias by command name.
func RemoveAliasByCommandName(commandName string, con *console.SliverClient) error {
if commandName == "" {
return errors.New("command name is required")
}
@@ -61,7 +61,7 @@ func RemoveAliasByCommandName(commandName string, con *console.SliverConsoleClie
return errors.New("alias not loaded")
}
delete(loadedAliases, commandName)
con.App.Commands().Remove(commandName)
// con.App.Commands().Remove(commandName)
extPath := filepath.Join(assets.GetAliasesDir(), filepath.Base(commandName))
if _, err := os.Stat(extPath); os.IsNotExist(err) {
return nil
+16
View File
@@ -0,0 +1,16 @@
# client/command/armory
## Overview
Implements the 'armory' command group for the Sliver client console. Handlers map Cobra invocations to armory workflows such as install, manage, parsers, and search.
## Go Files
- `armory.go` – Maintains the armory cache lifecycle, fetching package metadata, verifying signatures, and presenting bundle listings.
- `armory_test.go` *(tests)* – Placeholder for armory command tests; currently used to keep the package's test harness wired up.
- `commands.go` – Declares the Cobra command hierarchy for armory actions and binds shared flag/completion plumbing.
- `install.go` – Resolves dependencies and installs aliases or extensions from cached metadata, prompting when overwriting existing packages.
- `manage.go` – Implements management helpers for viewing, adding, verifying, and persisting armory configurations.
- `parsers.go` – Provides parsers and HTTP helpers for retrieving armory indexes and packages, including Minisign verification.
- `search.go` – Implements the regex-driven search command that filters cached armory packages.
- `update.go` – Calculates available package updates, presents options to the user, and orchestrates update installation.
+445 -128
View File
@@ -23,19 +23,21 @@ import (
"errors"
"fmt"
"net/url"
"strings"
"slices"
"sync"
"time"
"github.com/jedib0t/go-pretty/v6/table"
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
"golang.org/x/term"
"github.com/bishopfox/sliver/client/assets"
"github.com/bishopfox/sliver/client/command/alias"
"github.com/bishopfox/sliver/client/command/extensions"
"github.com/bishopfox/sliver/client/command/settings"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/server/cryptography/minisign"
"github.com/desertbit/grumble"
"github.com/jedib0t/go-pretty/v6/table"
"golang.org/x/term"
"github.com/bishopfox/sliver/util/minisign"
)
// ArmoryIndex - Index JSON containing alias/extension/bundle information
@@ -53,13 +55,24 @@ type ArmoryPackage struct {
RepoURL string `json:"repo_url"`
PublicKey string `json:"public_key"`
IsAlias bool `json:"-"`
IsAlias bool `json:"-"`
ArmoryName string `json:"-"`
/*
With support for multiple armories, the command name of a package
is not unique anymore, so we need something that is unique
to be able to keep track of packages.
This ID will be a hash calculated from properties of the package.
*/
ID string `json:"-"`
ArmoryPK string `json:"-"`
}
// ArmoryBundle - A list of packages
type ArmoryBundle struct {
Name string `json:"name"`
Packages []string `json:"packages"`
Name string `json:"name"`
Packages []string `json:"packages"`
ArmoryName string `json:"-"`
}
// ArmoryHTTPConfig - Configuration for armory HTTP client
@@ -88,48 +101,75 @@ type pkgCacheEntry struct {
Alias *alias.AliasManifest
Extension *extensions.ExtensionManifest
LastErr error
// This corresponds to Pkg.ID
ID string
}
var (
// public key -> armoryCacheEntry
indexCache = sync.Map{}
// public key -> armoryPkgCacheEntry
// package ID -> armoryPkgCacheEntry
pkgCache = sync.Map{}
// public key -> assets.ArmoryConfig
currentArmories = sync.Map{}
// cacheTime - How long to cache the index/pkg manifests
cacheTime = time.Hour
//cacheTime = time.Hour
cacheTime = 2 * time.Minute
// This will kill a download if exceeded so needs to be large
defaultTimeout = 15 * time.Minute
// Track whether armories have been initialized so that we know if we need to pull from the config
armoriesInitialized = false
// Track whether the default armory has been removed by the user (this is needed to prevent it from being readded in if they have removed it)
defaultArmoryRemoved = false
)
// ArmoryCmd - The main armory command
func ArmoryCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
armoriesConfig := assets.GetArmoriesConfig()
con.PrintInfof("Fetching %d armory index(es) ... ", len(armoriesConfig))
clientConfig := parseArmoryHTTPConfig(ctx)
indexes := fetchIndexes(armoriesConfig, clientConfig)
func ArmoryCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
armoriesConfig := getCurrentArmoryConfiguration()
if len(armoriesConfig) == 1 {
con.Printf("Reading armory index ... ")
} else {
con.PrintInfof("Reading %d armory indexes ... ", len(armoriesConfig))
}
clientConfig := parseArmoryHTTPConfig(cmd)
indexes := fetchIndexes(clientConfig)
if len(indexes) != len(armoriesConfig) {
con.Printf("errors!\n")
indexCache.Range(func(key, value interface{}) bool {
cacheEntry := value.(indexCacheEntry)
if cacheEntry.LastErr != nil {
con.PrintErrorf("%s - %s\n", cacheEntry.RepoURL, cacheEntry.LastErr)
con.PrintErrorf("%s (%s) - %s\n", cacheEntry.ArmoryConfig.Name, cacheEntry.RepoURL, cacheEntry.LastErr)
}
return true
})
} else {
con.Printf("done!\n")
}
armoriesInitialized = true
if len(indexes) == 0 {
con.PrintInfof("No indexes found\n")
return
}
aliases := []*alias.AliasManifest{}
exts := []*extensions.ExtensionManifest{}
if 0 < len(indexes) {
con.PrintInfof("Fetching package information ... ")
fetchPackageSignatures(indexes, clientConfig)
for _, index := range indexes {
errorCount := 0
aliases := []*alias.AliasManifest{}
exts := []*extensions.ExtensionManifest{}
con.PrintInfof("Reading package information for armory %s ... ", index.ArmoryConfig.Name)
fetchPackageSignatures(index, clientConfig)
pkgCache.Range(func(key, value interface{}) bool {
cacheEntry := value.(pkgCacheEntry)
cacheEntry, ok := value.(pkgCacheEntry)
if !ok {
// Something is wrong with this entry
pkgCache.Delete(value)
return true
}
if cacheEntry.ArmoryConfig.PublicKey != index.ArmoryConfig.PublicKey {
return true
}
if cacheEntry.LastErr != nil {
errorCount++
if errorCount == 0 {
@@ -140,7 +180,7 @@ func ArmoryCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
if cacheEntry.Pkg.IsAlias {
aliases = append(aliases, cacheEntry.Alias)
} else {
exts = append(exts, cacheEntry.Extension)
exts = append(exts, cacheEntry.Extension) //todo: check this isn't a bug
}
}
return true
@@ -148,32 +188,52 @@ func ArmoryCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
if errorCount == 0 {
con.Printf("done!\n")
}
if 0 < len(aliases) || 0 < len(exts) {
con.Println()
PrintArmoryPackages(aliases, exts, con)
} else {
con.PrintInfof("No packages found\n")
}
}
if 0 < len(aliases) || 0 < len(exts) {
con.Println()
bundles := bundlesInCache()
if 0 < len(bundles) {
PrintArmoryBundles(bundles, con)
} else {
con.PrintInfof("No bundles found\n")
}
PrintArmoryPackages(aliases, exts, con)
} else {
con.PrintInfof("No indexes found\n")
con.PrintInfof("No packages found\n")
}
con.Println()
bundles := bundlesInCache()
if 0 < len(bundles) {
PrintArmoryBundles(bundles, con)
} else {
con.PrintInfof("No bundles found\n")
}
}
func refresh(clientConfig ArmoryHTTPConfig) {
armoriesConfig := assets.GetArmoriesConfig()
indexes := fetchIndexes(armoriesConfig, clientConfig)
fetchPackageSignatures(indexes, clientConfig)
getCurrentArmoryConfiguration()
indexes := fetchIndexes(clientConfig)
for _, index := range indexes {
fetchPackageSignatures(index, clientConfig)
}
}
func packagesInCache() ([]*alias.AliasManifest, []*extensions.ExtensionManifest) {
func countUniqueCommandsFromManifests(aliases []*alias.AliasManifest, exts []*extensions.ExtensionManifest) (int, int) {
uniqueAliasNames := []string{}
uniqueExtensionNames := []string{}
for _, alias := range aliases {
if !slices.Contains(uniqueAliasNames, alias.CommandName) {
uniqueAliasNames = append(uniqueAliasNames, alias.CommandName)
}
}
for _, ext := range exts {
for _, cmd := range ext.ExtCommand {
if !slices.Contains(uniqueExtensionNames, cmd.CommandName) {
uniqueExtensionNames = append(uniqueExtensionNames, cmd.CommandName)
}
}
}
return len(uniqueAliasNames), len(uniqueExtensionNames)
}
func packageManifestsInCache() ([]*alias.AliasManifest, []*extensions.ExtensionManifest) {
aliases := []*alias.AliasManifest{}
exts := []*extensions.ExtensionManifest{}
pkgCache.Range(func(key, value interface{}) bool {
@@ -182,7 +242,7 @@ func packagesInCache() ([]*alias.AliasManifest, []*extensions.ExtensionManifest)
if cacheEntry.Pkg.IsAlias {
aliases = append(aliases, cacheEntry.Alias)
} else {
exts = append(exts, cacheEntry.Extension)
exts = append(exts, cacheEntry.Extension) //todo: check this isn't a bug
}
}
return true
@@ -190,6 +250,125 @@ func packagesInCache() ([]*alias.AliasManifest, []*extensions.ExtensionManifest)
return aliases, exts
}
func armoryLookupByName(name string) *assets.ArmoryConfig {
var result *assets.ArmoryConfig
indexCache.Range(func(key, value interface{}) bool {
indexEntry, ok := value.(indexCacheEntry)
if !ok {
// Keep going
return true
}
if indexEntry.ArmoryConfig.Name == name {
result = indexEntry.ArmoryConfig
return false
}
return true
})
return result
}
// Returns the packages in the cache with a given name
func packageCacheLookupByName(name string) []*pkgCacheEntry {
var result []*pkgCacheEntry = make([]*pkgCacheEntry, 0)
pkgCache.Range(func(key, value interface{}) bool {
cacheEntry, ok := value.(pkgCacheEntry)
if !ok {
// Keep going
return true
}
if cacheEntry.Pkg.Name == name {
result = append(result, &cacheEntry)
}
return true
})
return result
}
// Returns the packages in the cache for a given command name
func packageCacheLookupByCmd(commandName string) []*pkgCacheEntry {
var result []*pkgCacheEntry = make([]*pkgCacheEntry, 0)
pkgCache.Range(func(key, value interface{}) bool {
cacheEntry, ok := value.(pkgCacheEntry)
if !ok {
// Keep going
return true
}
if cacheEntry.Pkg.CommandName == commandName {
result = append(result, &cacheEntry)
}
return true
})
return result
}
// Returns the package in the cache for a given command name and armory
func packageCacheLookupByCmdAndArmory(commandName string, armoryPublicKey string) *pkgCacheEntry {
var result *pkgCacheEntry
pkgCache.Range(func(key, value interface{}) bool {
cacheEntry, ok := value.(pkgCacheEntry)
if !ok {
// Keep going
return true
}
if cacheEntry.ArmoryConfig.PublicKey == armoryPublicKey && cacheEntry.Pkg.CommandName == commandName {
result = &cacheEntry
// Stop iterating
return false
}
return true
})
return result
}
// Returns the package hashes in the cache for a given armory
func packageHashLookupByArmory(armoryPublicKey string) []string {
result := []string{}
pkgCache.Range(func(key, value interface{}) bool {
cacheEntry, ok := value.(pkgCacheEntry)
if !ok {
// Keep going
return true
}
if cacheEntry.ArmoryConfig.PublicKey == armoryPublicKey {
result = append(result, cacheEntry.ID)
}
return true
})
return result
}
func packageCacheLookupByID(packageID string) *pkgCacheEntry {
var packageEntry *pkgCacheEntry
pkgCache.Range(func(key, value interface{}) bool {
cacheEntry, ok := value.(pkgCacheEntry)
if !ok {
// Keep going
return true
}
if cacheEntry.LastErr == nil {
if cacheEntry.ID == packageID {
packageEntry = &cacheEntry
// Stop iterating
return false
}
}
return true
})
return packageEntry
}
func bundlesInCache() []*ArmoryBundle {
bundles := []*ArmoryBundle{}
indexCache.Range(func(key, value interface{}) bool {
@@ -201,41 +380,61 @@ func bundlesInCache() []*ArmoryBundle {
}
// AliasExtensionOrBundleCompleter - Completer for alias, extension, and bundle names
func AliasExtensionOrBundleCompleter(prefix string, args []string, con *console.SliverConsoleClient) []string {
results := []string{}
aliases, exts := packagesInCache()
bundles := bundlesInCache()
for _, aliasPkg := range aliases {
if strings.HasPrefix(aliasPkg.CommandName, prefix) {
func AliasExtensionOrBundleCompleter() carapace.Action {
comps := func(ctx carapace.Context) carapace.Action {
var action carapace.Action
results := []string{}
aliases, exts := packageManifestsInCache()
bundles := bundlesInCache()
for _, aliasPkg := range aliases {
results = append(results, aliasPkg.CommandName)
results = append(results, aliasPkg.Help)
}
}
for _, extensionPkg := range exts {
if strings.HasPrefix(extensionPkg.CommandName, prefix) {
results = append(results, extensionPkg.CommandName)
aliasesComps := carapace.ActionValuesDescribed(results...).Tag("aliases").Invoke(ctx)
results = make([]string, 0)
for _, extension := range exts {
for _, extensionPkg := range extension.ExtCommand {
results = append(results, extensionPkg.CommandName)
results = append(results, extensionPkg.Help)
}
}
}
for _, bundle := range bundles {
if strings.HasPrefix(bundle.Name, prefix) {
extentionComps := carapace.ActionValuesDescribed(results...).Tag("extensions").Invoke(ctx)
results = make([]string, 0)
for _, bundle := range bundles {
results = append(results, bundle.Name)
}
bundleComps := carapace.ActionValues(results...).Tag("bundles").Invoke(ctx)
return action.Invoke(ctx).Merge(
aliasesComps,
extentionComps,
bundleComps,
).ToA()
}
return results
return carapace.ActionCallback(comps)
}
// PrintArmoryPackages - Prints the armory packages
func PrintArmoryPackages(aliases []*alias.AliasManifest, exts []*extensions.ExtensionManifest, con *console.SliverConsoleClient) {
func PrintArmoryPackages(aliases []*alias.AliasManifest, exts []*extensions.ExtensionManifest, con *console.SliverClient) {
width, _, err := term.GetSize(0)
if err != nil {
width = 999
width = 1
}
tw := table.NewWriter()
tw.SetStyle(settings.GetTableStyle(con))
tw.SetTitle(console.Bold + "Packages" + console.Normal)
tw.SetTitle(console.StyleBold.Render("Packages"))
if con.Settings.SmallTermWidth < width {
urlMargin := 150 // Extra margin needed to show URL column
if con.Settings.SmallTermWidth+urlMargin < width {
tw.AppendHeader(table.Row{
"Armory",
"Command Name",
"Version",
"Type",
@@ -244,6 +443,7 @@ func PrintArmoryPackages(aliases []*alias.AliasManifest, exts []*extensions.Exte
})
} else {
tw.AppendHeader(table.Row{
"Armory",
"Command Name",
"Version",
"Type",
@@ -253,10 +453,11 @@ func PrintArmoryPackages(aliases []*alias.AliasManifest, exts []*extensions.Exte
// Columns start at 1 for some dumb reason
tw.SortBy([]table.SortBy{
{Number: 1, Mode: table.Asc},
{Number: 2, Mode: table.Asc},
})
type pkgInfo struct {
ArmoryName string
CommandName string
Version string
Type string
@@ -264,8 +465,10 @@ func PrintArmoryPackages(aliases []*alias.AliasManifest, exts []*extensions.Exte
URL string
}
entries := []pkgInfo{}
for _, aliasPkg := range aliases {
entries = append(entries, pkgInfo{
ArmoryName: aliasPkg.ArmoryName,
CommandName: aliasPkg.CommandName,
Version: aliasPkg.Version,
Type: "Alias",
@@ -273,36 +476,43 @@ func PrintArmoryPackages(aliases []*alias.AliasManifest, exts []*extensions.Exte
URL: aliasPkg.RepoURL,
})
}
for _, extension := range exts {
entries = append(entries, pkgInfo{
CommandName: extension.CommandName,
Version: extension.Version,
Type: "Extension",
Help: extension.Help,
URL: extension.RepoURL,
})
for _, extm := range exts {
for _, extension := range extm.ExtCommand {
entries = append(entries, pkgInfo{
ArmoryName: extm.ArmoryName,
CommandName: extension.CommandName,
Version: extension.Manifest.Version,
Type: "Extension",
Help: extension.Help,
URL: extension.Manifest.RepoURL,
})
}
}
sliverMenu := con.App.Menu("implant")
rows := []table.Row{}
for _, pkg := range entries {
color := console.Normal
if extensions.CmdExists(pkg.CommandName, con.App) {
color = console.Green
style := console.StyleNormal
if extensions.CmdExists(pkg.CommandName, sliverMenu.Command) {
style = console.StyleGreen
}
if con.Settings.SmallTermWidth < width {
if con.Settings.SmallTermWidth+urlMargin < width {
rows = append(rows, table.Row{
fmt.Sprintf(color+"%s"+console.Normal, pkg.CommandName),
fmt.Sprintf(color+"%s"+console.Normal, pkg.Version),
fmt.Sprintf(color+"%s"+console.Normal, pkg.Type),
fmt.Sprintf(color+"%s"+console.Normal, pkg.Help),
fmt.Sprintf(color+"%s"+console.Normal, pkg.URL),
style.Render(pkg.ArmoryName),
style.Render(pkg.CommandName),
style.Render(pkg.Version),
style.Render(pkg.Type),
style.Render(pkg.Help),
style.Render(pkg.URL),
})
} else {
rows = append(rows, table.Row{
fmt.Sprintf(color+"%s"+console.Normal, pkg.CommandName),
fmt.Sprintf(color+"%s"+console.Normal, pkg.Version),
fmt.Sprintf(color+"%s"+console.Normal, pkg.Type),
fmt.Sprintf(color+"%s"+console.Normal, pkg.Help),
style.Render(pkg.ArmoryName),
style.Render(pkg.CommandName),
style.Render(pkg.Version),
style.Render(pkg.Type),
style.Render(pkg.Help),
})
}
}
@@ -311,11 +521,12 @@ func PrintArmoryPackages(aliases []*alias.AliasManifest, exts []*extensions.Exte
}
// PrintArmoryBundles - Prints the armory bundles
func PrintArmoryBundles(bundles []*ArmoryBundle, con *console.SliverConsoleClient) {
func PrintArmoryBundles(bundles []*ArmoryBundle, con *console.SliverClient) {
tw := table.NewWriter()
tw.SetStyle(settings.GetTableStyle(con))
tw.SetTitle(console.Bold + "Bundles" + console.Normal)
tw.SetTitle(console.StyleBold.Render("Bundles"))
tw.AppendHeader(table.Row{
"Armory Name",
"Name",
"Contains",
})
@@ -341,6 +552,7 @@ func PrintArmoryBundles(bundles []*ArmoryBundle, con *console.SliverConsoleClien
}
}
tw.AppendRow(table.Row{
bundle.ArmoryName,
bundle.Name,
packages,
})
@@ -348,15 +560,15 @@ func PrintArmoryBundles(bundles []*ArmoryBundle, con *console.SliverConsoleClien
con.Printf("%s\n", tw.Render())
}
func parseArmoryHTTPConfig(ctx *grumble.Context) ArmoryHTTPConfig {
func parseArmoryHTTPConfig(cmd *cobra.Command) ArmoryHTTPConfig {
var proxyURL *url.URL
rawProxyURL := ctx.Flags.String("proxy")
rawProxyURL, _ := cmd.Flags().GetString("proxy")
if rawProxyURL != "" {
proxyURL, _ = url.Parse(rawProxyURL)
}
timeout := defaultTimeout
rawTimeout := ctx.Flags.String("timeout")
rawTimeout, _ := cmd.Flags().GetString("timeout")
if rawTimeout != "" {
var err error
timeout, err = time.ParseDuration(rawTimeout)
@@ -365,22 +577,32 @@ func parseArmoryHTTPConfig(ctx *grumble.Context) ArmoryHTTPConfig {
}
}
ignoreCache, _ := cmd.Flags().GetBool("ignore-cache")
disableTLSValidation, _ := cmd.Flags().GetBool("insecure")
return ArmoryHTTPConfig{
IgnoreCache: ctx.Flags.Bool("ignore-cache"),
IgnoreCache: ignoreCache,
ProxyURL: proxyURL,
Timeout: timeout,
DisableTLSValidation: ctx.Flags.Bool("insecure"),
DisableTLSValidation: disableTLSValidation,
}
}
// fetch armory indexes, only returns indexes that were fetched successfully
// errors are still in the cache objects however and can be checked
func fetchIndexes(armoryConfigs []*assets.ArmoryConfig, clientConfig ArmoryHTTPConfig) []ArmoryIndex {
func fetchIndexes(clientConfig ArmoryHTTPConfig) []ArmoryIndex {
wg := &sync.WaitGroup{}
for _, armoryConfig := range armoryConfigs {
wg.Add(1)
go fetchIndex(armoryConfig, clientConfig, wg)
}
// Try to get a max of 10 indexes at a time
currentRequests := make(chan struct{}, 10)
currentArmories.Range(func(key, value interface{}) bool {
armoryEntry := value.(assets.ArmoryConfig)
if armoryEntry.Enabled {
wg.Add(1)
currentRequests <- struct{}{}
go fetchIndex(&armoryEntry, currentRequests, clientConfig, wg)
}
return true
})
wg.Wait()
indexes := []ArmoryIndex{}
indexCache.Range(func(key, value interface{}) bool {
@@ -393,13 +615,19 @@ func fetchIndexes(armoryConfigs []*assets.ArmoryConfig, clientConfig ArmoryHTTPC
return indexes
}
func fetchIndex(armoryConfig *assets.ArmoryConfig, clientConfig ArmoryHTTPConfig, wg *sync.WaitGroup) {
func fetchIndex(armoryConfig *assets.ArmoryConfig, requestChannel chan struct{}, clientConfig ArmoryHTTPConfig, wg *sync.WaitGroup) {
defer wg.Done()
defer func() {
<-requestChannel
}()
cacheEntry, ok := indexCache.Load(armoryConfig.PublicKey)
if ok {
cached := cacheEntry.(indexCacheEntry)
if time.Since(cached.Fetched) < cacheTime && cached.LastErr == nil && !clientConfig.IgnoreCache {
return
} else if time.Since(cached.Fetched) >= cacheTime {
// If an index has gone stale, remove it from the index cache
indexCache.Delete(armoryConfig.PublicKey)
}
}
@@ -436,40 +664,95 @@ func fetchIndex(armoryConfig *assets.ArmoryConfig, clientConfig ArmoryHTTPConfig
}
}
func fetchPackageSignatures(indexes []ArmoryIndex, clientConfig ArmoryHTTPConfig) {
wg := &sync.WaitGroup{}
for _, index := range indexes {
for _, armoryPkg := range index.Extensions {
wg.Add(1)
armoryPkg.IsAlias = false
go fetchPackageSignature(wg, index.ArmoryConfig, armoryPkg, clientConfig)
}
for _, armoryPkg := range index.Aliases {
wg.Add(1)
armoryPkg.IsAlias = true
go fetchPackageSignature(wg, index.ArmoryConfig, armoryPkg, clientConfig)
}
func calculateHashesForIndex(index ArmoryIndex) []string {
result := []string{}
for _, pkg := range index.Aliases {
result = append(result, calculatePackageHash(pkg))
}
wg.Wait()
for _, pkg := range index.Extensions {
result = append(result, calculatePackageHash(pkg))
}
return result
}
func fetchPackageSignature(wg *sync.WaitGroup, armoryConfig *assets.ArmoryConfig, armoryPkg *ArmoryPackage, clientConfig ArmoryHTTPConfig) {
func makePackageCacheConsistent(index ArmoryIndex) {
packagesToRemove := []string{}
// Get the packages for the armory out of the cache
cacheHashesForArmory := packageHashLookupByArmory(index.ArmoryConfig.PublicKey)
indexHashesForArmory := calculateHashesForIndex(index)
if len(cacheHashesForArmory) > len(indexHashesForArmory) {
// Then there are packages in the cache that do not exist in the armory
if len(indexHashesForArmory) == 0 {
packagesToRemove = cacheHashesForArmory
} else {
for _, packageHash := range indexHashesForArmory {
if !slices.Contains(cacheHashesForArmory, packageHash) {
packagesToRemove = append(packagesToRemove, packageHash)
}
}
}
}
// The remaining case of there being packages in the armory that do not exist in the cache
// will have to be solved with fetchPackageSignatures, and that function calls this one
// after fetching signatures and storing them in the cache, so that case should not apply
for _, packageHash := range packagesToRemove {
pkgCache.Delete(packageHash)
}
}
func fetchPackageSignatures(index ArmoryIndex, clientConfig ArmoryHTTPConfig) {
wg := &sync.WaitGroup{}
// Be kind to armories and limit concurrent requests to 10
// This is an arbritrary number and we may have to tweak it if it causes problems
currentRequests := make(chan struct{}, 10)
for _, armoryPkg := range index.Extensions {
wg.Add(1)
currentRequests <- struct{}{}
armoryPkg.IsAlias = false
go fetchPackageSignature(wg, currentRequests, index.ArmoryConfig, armoryPkg, clientConfig)
}
for _, armoryPkg := range index.Aliases {
wg.Add(1)
currentRequests <- struct{}{}
armoryPkg.IsAlias = true
go fetchPackageSignature(wg, currentRequests, index.ArmoryConfig, armoryPkg, clientConfig)
}
wg.Wait()
// If packages were deleted from the index, make sure the cache is consistent
makePackageCacheConsistent(index)
}
func fetchPackageSignature(wg *sync.WaitGroup, requestChannel chan struct{}, armoryConfig *assets.ArmoryConfig, armoryPkg *ArmoryPackage, clientConfig ArmoryHTTPConfig) {
defer wg.Done()
cacheEntry, ok := pkgCache.Load(armoryPkg.CommandName)
defer func() {
<-requestChannel
}()
cacheEntry, ok := pkgCache.Load(armoryPkg.ID)
if ok {
cached := cacheEntry.(pkgCacheEntry)
if time.Since(cached.Fetched) < cacheTime && cached.LastErr == nil && !clientConfig.IgnoreCache {
return
} else if time.Since(cached.Fetched) >= cacheTime {
// If a package has gone stale, remove it from the package cache
pkgCache.Delete(armoryPkg.ID)
}
}
pkgCacheEntry := &pkgCacheEntry{
ArmoryConfig: armoryConfig,
RepoURL: armoryPkg.RepoURL,
ID: armoryPkg.ID,
}
defer func() {
pkgCacheEntry.Fetched = time.Now()
pkgCache.Store(armoryPkg.CommandName, *pkgCacheEntry)
pkgCache.Store(armoryPkg.ID, *pkgCacheEntry)
}()
repoURL, err := url.Parse(armoryPkg.RepoURL)
@@ -484,7 +767,7 @@ func fetchPackageSignature(wg *sync.WaitGroup, armoryConfig *assets.ArmoryConfig
var sig *minisign.Signature
if pkgParser, ok := pkgParsers[repoURL.Hostname()]; ok {
sig, _, err = pkgParser(armoryPkg, true, clientConfig)
sig, _, err = pkgParser(armoryConfig, armoryPkg, true, clientConfig)
} else {
sig, _, err = DefaultArmoryPkgParser(armoryConfig, armoryPkg, true, clientConfig)
}
@@ -501,19 +784,53 @@ func fetchPackageSignature(wg *sync.WaitGroup, armoryConfig *assets.ArmoryConfig
if armoryPkg != nil {
pkgCacheEntry.Pkg = *armoryPkg
}
if err == nil {
manifestData, err := base64.StdEncoding.DecodeString(sig.TrustedComment)
if err != nil {
pkgCacheEntry.LastErr = fmt.Errorf("failed to b64 decode trusted comment: %s", err)
return
}
if armoryPkg.IsAlias {
pkgCacheEntry.Alias, err = alias.ParseAliasManifest(manifestData)
} else {
pkgCacheEntry.Extension, err = extensions.ParseExtensionManifest(manifestData)
}
if err != nil {
pkgCacheEntry.LastErr = fmt.Errorf("failed to parse trusted manifest in pkg signature: %s", err)
}
manifestData, err := base64.StdEncoding.DecodeString(sig.TrustedComment)
if err != nil {
pkgCacheEntry.LastErr = fmt.Errorf("failed to b64 decode trusted comment: %s", err)
return
}
if armoryPkg.IsAlias {
pkgCacheEntry.Alias, err = alias.ParseAliasManifest(manifestData)
pkgCacheEntry.Alias.ArmoryName = armoryConfig.Name
pkgCacheEntry.Alias.ArmoryPK = armoryConfig.PublicKey
} else {
pkgCacheEntry.Extension, err = extensions.ParseExtensionManifest(manifestData)
pkgCacheEntry.Extension.ArmoryName = armoryConfig.Name
pkgCacheEntry.Extension.ArmoryPK = armoryConfig.PublicKey
}
if err != nil {
pkgCacheEntry.LastErr = fmt.Errorf("failed to parse trusted manifest in pkg signature: %s", err)
}
}
func clearAllCaches() {
currentArmories.Range(func(key, value any) bool {
currentArmories.Delete(key)
return true
})
indexCache.Range(func(key, value any) bool {
indexCache.Delete(key)
return true
})
pkgCache.Range(func(key, value any) bool {
pkgCache.Delete(key)
return true
})
}
func getArmoryPublicKey(armoryName string) string {
// Find PK for the armory name
armoryPK := ""
currentArmories.Range(func(key, value any) bool {
armoryEntry := value.(assets.ArmoryConfig)
if armoryEntry.Name == armoryName {
armoryPK = armoryEntry.PublicKey
return false
}
return true
})
return armoryPK
}
+211
View File
@@ -0,0 +1,211 @@
package armory
import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/bishopfox/sliver/client/command/completers"
"github.com/bishopfox/sliver/client/command/flags"
"github.com/bishopfox/sliver/client/command/help"
"github.com/bishopfox/sliver/client/console"
consts "github.com/bishopfox/sliver/client/constants"
)
// Commands returns the `armory` command and its subcommands.
func Commands(con *console.SliverClient) []*cobra.Command {
armoryCmd := &cobra.Command{
Use: consts.ArmoryStr,
Short: "Automatically download and install extensions/aliases",
Long: help.GetHelpFor([]string{consts.ArmoryStr}),
Run: func(cmd *cobra.Command, args []string) {
ArmoryCmd(cmd, con, args)
},
GroupID: consts.GenericHelpGroup,
}
flags.Bind("connection", true, armoryCmd, func(f *pflag.FlagSet) {
f.BoolP("insecure", "I", false, "skip tls certificate validation")
f.StringP("proxy", "p", "", "specify a proxy url (e.g. http://localhost:8080)")
f.BoolP("ignore-cache", "c", false, "ignore metadata cache, force refresh")
f.StringP("timeout", "t", "15m", "download timeout")
})
flags.BindFlagCompletions(armoryCmd, func(comp *carapace.ActionMap) {
(*comp)["proxy"] = completers.LocalProxyCompleter()
})
armoryInstallCmd := &cobra.Command{
Use: consts.InstallStr,
Short: "Install an alias or extension",
Long: help.GetHelpFor([]string{consts.ArmoryStr, consts.InstallStr}),
Args: cobra.RangeArgs(0, 1),
Run: func(cmd *cobra.Command, args []string) {
ArmoryInstallCmd(cmd, con, args)
},
}
flags.Bind("", false, armoryInstallCmd, func(f *pflag.FlagSet) {
f.BoolP("force", "f", false, "force installation of package, overwriting the package if it exists")
f.StringP("armory", "a", "", "name of armory to install package from")
})
armoryCmd.AddCommand(armoryInstallCmd)
flags.NewCompletions(armoryInstallCmd).PositionalCompletion(
AliasExtensionOrBundleCompleter().Usage("name of the extension or alias to install"),
)
armoryUpdateCmd := &cobra.Command{
Use: consts.UpdateStr,
Short: "Update installed aliases and extensions",
Long: help.GetHelpFor([]string{consts.ArmoryStr, consts.UpdateStr}),
Run: func(cmd *cobra.Command, args []string) {
ArmoryUpdateCmd(cmd, con, args)
},
}
flags.Bind("", false, armoryUpdateCmd, func(f *pflag.FlagSet) {
f.StringP("armory", "a", "", "name of armory to get updates from")
})
armoryCmd.AddCommand(armoryUpdateCmd)
armorySearchCmd := &cobra.Command{
Use: consts.SearchStr,
Short: "Search for aliases and extensions by name (regex)",
Long: help.GetHelpFor([]string{consts.ArmoryStr, consts.SearchStr}),
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
ArmorySearchCmd(cmd, con, args)
},
}
armoryCmd.AddCommand(armorySearchCmd)
flags.NewCompletions(armorySearchCmd).PositionalCompletion(carapace.ActionValues().Usage("a name regular expression"))
armoryInfoCmd := &cobra.Command{
Use: consts.InfoStr,
Short: "View configured armories or details about a specific armory or package",
Args: cobra.RangeArgs(0, 1),
Long: help.GetHelpFor([]string{consts.ArmoryStr, consts.InfoStr}),
Run: func(cmd *cobra.Command, args []string) {
ArmoryInfoCommand(cmd, con, args)
},
}
armoryCmd.AddCommand(armoryInfoCmd)
carapace.Gen(armoryInfoCmd).PositionalCompletion(
carapace.ActionValues().Usage("armory or package name"),
)
armoryAddCmd := &cobra.Command{
Use: consts.AddStr,
Short: "Add a new armory",
Long: help.GetHelpFor([]string{consts.ArmoryStr, consts.AddStr}),
Args: cobra.ExactArgs(1), // the name of the armory
Run: func(cmd *cobra.Command, args []string) {
AddArmoryCmd(cmd, con, args)
},
}
flags.Bind("", false, armoryAddCmd, func(f *pflag.FlagSet) {
f.StringP("url", "u", "", "The URL of the armory index (required)")
f.StringP("pubkey", "k", "", "The public key for the armory (required)")
f.StringP("auth", "a", "", "Authorization details / credentials for the armory")
f.StringP("authcmd", "x", "", "Local command to run for authorization to the armory")
f.BoolP("no-save", "e", false, "Do not save this armory configuration to disk")
})
armoryAddCmd.MarkFlagRequired("url")
armoryAddCmd.MarkFlagRequired("pubkey")
carapace.Gen(armoryAddCmd).PositionalCompletion(
carapace.ActionValues().Usage("name of the armory"),
)
armoryCmd.AddCommand(armoryAddCmd)
armoryRemoveCmd := &cobra.Command{
Use: consts.RmStr,
Short: "Remove an armory",
Long: help.GetHelpFor([]string{consts.ArmoryStr, consts.RmStr}),
Args: cobra.ExactArgs(1), // the name of the armory
Run: func(cmd *cobra.Command, args []string) {
RemoveArmoryCmd(cmd, con, args)
},
}
carapace.Gen(armoryAddCmd).PositionalCompletion(
carapace.ActionValues().Usage("name of the armory"),
)
armoryCmd.AddCommand(armoryRemoveCmd)
armorySaveCmd := &cobra.Command{
Use: consts.SaveStr,
Short: "Save the armory configuration to disk",
Long: help.GetHelpFor([]string{consts.ArmoryStr, consts.SaveStr}),
Run: func(cmd *cobra.Command, args []string) {
SaveArmories(con)
},
}
armoryCmd.AddCommand(armorySaveCmd)
armoryEnableCmd := &cobra.Command{
Use: consts.EnableStr,
Short: "Enable an armory",
Long: help.GetHelpFor([]string{consts.ArmoryStr, consts.EnableStr}),
Args: cobra.ExactArgs(1), // The name of the armory
Run: func(cmd *cobra.Command, args []string) {
ChangeArmoryEnabledState(cmd, con, args, true)
},
}
carapace.Gen(armoryEnableCmd).PositionalCompletion(
carapace.ActionValues().Usage("name of the armory"),
)
armoryCmd.AddCommand(armoryEnableCmd)
armoryDisableCmd := &cobra.Command{
Use: consts.DisableStr,
Short: "Disable an armory",
Long: help.GetHelpFor([]string{consts.ArmoryStr, consts.DisableStr}),
Args: cobra.ExactArgs(1), // The name of the armory
Run: func(cmd *cobra.Command, args []string) {
ChangeArmoryEnabledState(cmd, con, args, false)
},
}
carapace.Gen(armoryDisableCmd).PositionalCompletion(
carapace.ActionValues().Usage("name of the armory"),
)
armoryCmd.AddCommand(armoryDisableCmd)
armoryModifyCmd := &cobra.Command{
Use: consts.ModifyStr,
Short: "Modify an armory configuration",
Long: help.GetHelpFor([]string{consts.ArmoryStr, consts.ModifyStr}),
Args: cobra.ExactArgs(1), // The name of the armory
Run: func(cmd *cobra.Command, args []string) {
ModifyArmoryCmd(cmd, con, args)
},
}
flags.Bind("", false, armoryModifyCmd, func(f *pflag.FlagSet) {
f.StringP("name", "n", "", "new name for the armory")
f.StringP("pubkey", "k", "", "new public key for the armory")
f.StringP("url", "u", "", "new URL for the armory")
f.StringP("auth", "a", "", "new authorization details / credentials for the armory")
f.StringP("authcmd", "x", "", "new local command to run for authorization to the armory")
f.BoolP("no-save", "e", false, "do not save armory configuration to armory configuration file")
})
carapace.Gen(armoryModifyCmd).PositionalCompletion(
carapace.ActionValues().Usage("name of the armory"),
)
armoryCmd.AddCommand(armoryModifyCmd)
armoryRefreshCmd := &cobra.Command{
Use: consts.RefreshStr,
Short: "Refresh armory indexes",
Long: help.GetHelpFor([]string{consts.ArmoryStr, consts.RefreshStr}),
Run: func(cmd *cobra.Command, args []string) {
RefreshArmories(cmd, con)
},
}
armoryCmd.AddCommand(armoryRefreshCmd)
armoryResetCmd := &cobra.Command{
Use: consts.ResetStr,
Short: "Reset armory configuration",
Long: help.GetHelpFor([]string{consts.ArmoryStr, consts.ResetStr}),
Run: func(cmd *cobra.Command, args []string) {
ResetArmoryConfig(cmd, con)
},
}
armoryCmd.AddCommand(armoryResetCmd)
return []*cobra.Command{armoryCmd}
}
+620 -161
View File
@@ -19,120 +19,596 @@ package armory
*/
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net/url"
"os"
"path/filepath"
"slices"
"sort"
"strings"
"github.com/AlecAivazis/survey/v2"
"github.com/spf13/cobra"
"github.com/bishopfox/sliver/client/assets"
"github.com/bishopfox/sliver/client/command/alias"
"github.com/bishopfox/sliver/client/command/extensions"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/server/cryptography/minisign"
"github.com/desertbit/grumble"
"github.com/bishopfox/sliver/client/constants"
"github.com/bishopfox/sliver/client/forms"
"github.com/bishopfox/sliver/util"
"github.com/bishopfox/sliver/util/minisign"
)
var (
// ErrPackageNotFound - The package was not found
ErrPackageNotFound = errors.New("package not found")
// ErrPackageNotFound - The package was not found
var ErrPackageNotFound = errors.New("package not found")
var ErrPackageAlreadyInstalled = errors.New("package is already installed")
const (
doNotInstallOption = "Do not install this package"
doNotInstallPackageName = "do not install"
)
// ArmoryInstallCmd - The armory install command
func ArmoryInstallCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
name := ctx.Args.String("name")
if name == "" {
func ArmoryInstallCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
var promptToOverwrite bool
names := []string{}
if len(args) > 0 {
names = []string{args[0]}
}
forceInstallation, err := cmd.Flags().GetBool("force")
if err != nil {
con.PrintErrorf("Could not parse %q flag: %s\n", "force", err)
return
}
if forceInstallation {
promptToOverwrite = false
} else {
promptToOverwrite = true
}
armoryName, err := cmd.Flags().GetString("armory")
if err != nil {
con.PrintErrorf("Could not parse %q flag: %s\n", "armory", err)
return
}
// Find PK for the armory name
armoryPK := getArmoryPublicKey(armoryName)
// If the armory with the name is not found, print a warning
if cmd.Flags().Changed("armory") && armoryPK == "" {
con.PrintWarnf("Could not find a configured armory named %q - searching all configured armories\n\n", armoryName)
}
clientConfig := parseArmoryHTTPConfig(cmd)
refresh(clientConfig)
if len(names) == 0 {
armoryFilterName := ""
if armoryPK != "" {
armoryFilterName = armoryName
}
options := armoryInstallOptions(armoryPK, armoryFilterName)
if len(options) == 0 {
con.PrintInfof("No packages or bundles found\n")
return
}
result, err := forms.ArmoryInstallForm(options)
if err != nil {
if errors.Is(err, forms.ErrUserAborted) {
return
}
con.PrintErrorf("Armory install form failed: %s\n", err)
return
}
if len(result.SelectedNames) == 0 {
return
}
names = result.SelectedNames
}
if len(names) == 0 {
con.PrintErrorf("A package or bundle name is required")
return
}
clientConfig := parseArmoryHTTPConfig(ctx)
refresh(clientConfig)
if name == "all" {
aliases, extensions := packagesInCache()
confirm := false
prompt := &survey.Confirm{
Message: fmt.Sprintf("Install %d aliases and %d extensions?",
len(aliases), len(extensions),
),
if slices.Contains(names, "all") {
names = []string{"all"}
}
for _, name := range names {
if name == "" {
continue
}
survey.AskOne(prompt, &confirm)
if !confirm {
promptOverwrite := promptToOverwrite
if name == "all" {
aliases, extensions := packageManifestsInCache()
aliasCount, extCount := countUniqueCommandsFromManifests(aliases, extensions)
confirm := false
pluralAliases := "es"
if aliasCount == 1 {
pluralAliases = ""
}
pluralExtensions := "s"
if extCount == 1 {
pluralExtensions = ""
}
forms.Confirm(fmt.Sprintf("Install %d alias%s and %d extension%s?",
aliasCount, pluralAliases, extCount, pluralExtensions,
), &confirm)
if !confirm {
return
}
promptOverwrite = false
}
err = installPackageByName(name, armoryPK, forceInstallation, promptOverwrite, clientConfig, con)
if err == nil {
continue
}
if errors.Is(err, ErrPackageNotFound) {
bundles := bundlesInCache()
for _, bundle := range bundles {
if bundle.Name == name {
installBundle(bundle, armoryPK, forceInstallation, clientConfig, con)
err = nil
break
}
}
if err == nil {
continue
}
// If we have made it here, then there was not a bundle or package that matched the provided name
if armoryPK == "" {
con.PrintErrorf("No package or bundle named %q was found\n", name)
} else {
con.PrintErrorf("No package or bundle named %q was found in armory %s\n", name, armoryName)
}
} else if errors.Is(err, ErrPackageAlreadyInstalled) {
con.PrintErrorf("Package %q is already installed - use the force option to overwrite it\n", name)
} else {
con.PrintErrorf("Could not install package: %s\n", err)
}
}
}
func installBundle(bundle *ArmoryBundle, armoryPK string, forceInstallation bool, clientConfig ArmoryHTTPConfig, con *console.SliverClient) {
installList := []string{}
pendingPackages := make(map[string]string)
for _, bundlePkgName := range bundle.Packages {
packageInstallList, err := buildInstallList(bundlePkgName, armoryPK, forceInstallation, pendingPackages)
if err != nil {
if errors.Is(err, ErrPackageAlreadyInstalled) {
con.PrintInfof("Package %s is already installed. Skipping...\n", bundlePkgName)
continue
} else {
con.PrintErrorf("Error for package %s: %s\n", bundlePkgName, err)
return
}
}
for _, pkgID := range packageInstallList {
if !slices.Contains(installList, pkgID) {
installList = append(installList, pkgID)
}
}
}
for _, packageID := range installList {
packageEntry := packageCacheLookupByID(packageID)
if packageEntry == nil {
con.PrintErrorf("The package cache is out of date. Please run armory refresh and try again.\n")
return
}
}
err := installPackageByName(name, clientConfig, con)
if err == nil {
return
}
if err == ErrPackageNotFound {
bundles := bundlesInCache()
for _, bundle := range bundles {
if bundle.Name == name {
installBundle(bundle, clientConfig, con)
if packageEntry.Pkg.IsAlias {
err := installAliasPackage(packageEntry, false, clientConfig, con)
if err != nil {
con.PrintErrorf("Failed to install alias '%s': %s", packageEntry.Alias.CommandName, err)
return
}
} else {
err := installExtensionPackage(packageEntry, false, clientConfig, con)
if err != nil {
con.PrintErrorf("Failed to install extension '%s': %s", packageEntry.Extension.Name, err)
return
}
}
}
con.PrintErrorf("No package or bundle named '%s' was found", name)
}
func installBundle(bundle *ArmoryBundle, clientConfig ArmoryHTTPConfig, con *console.SliverConsoleClient) {
for _, pkgName := range bundle.Packages {
err := installPackageByName(pkgName, clientConfig, con)
func getInstalledPackageNames() []string {
packageNames := []string{}
installedAliases := assets.GetInstalledAliasManifests()
installedExtensions := assets.GetInstalledExtensionManifests()
for _, aliasFileName := range installedAliases {
alias := &alias.AliasManifest{}
manifestData, err := os.ReadFile(aliasFileName)
if err != nil {
con.PrintErrorf("Failed to install '%s': %s", pkgName, err)
continue
}
err = json.Unmarshal(manifestData, alias)
if err != nil {
continue
}
if !slices.Contains(packageNames, alias.CommandName) {
packageNames = append(packageNames, alias.CommandName)
}
}
}
func installPackageByName(name string, clientConfig ArmoryHTTPConfig, con *console.SliverConsoleClient) error {
aliases, extensions := packagesInCache()
for _, alias := range aliases {
if alias.CommandName == name || name == "all" {
installAlias(alias, clientConfig, con)
if name != "all" {
return nil
for _, extensionFileName := range installedExtensions {
extension := &extensions.ExtensionManifest{}
manifestData, err := os.ReadFile(extensionFileName)
if err != nil {
continue
}
err = json.Unmarshal(manifestData, extension)
if err != nil {
continue
}
if len(extension.ExtCommand) == 0 {
extensionOld := &extensions.ExtensionManifest_{}
// Some extension manifests are using an older version
// To maintain compatibility with those extensions, we will
// re-unmarshal the data as the older version
err = json.Unmarshal(manifestData, extensionOld)
if err != nil {
continue
}
if !slices.Contains(packageNames, extensionOld.CommandName) {
packageNames = append(packageNames, extensionOld.CommandName)
}
} else {
for _, command := range extension.ExtCommand {
if !slices.Contains(packageNames, command.CommandName) {
packageNames = append(packageNames, command.CommandName)
}
}
}
}
for _, ext := range extensions {
if ext.CommandName == name || name == "all" {
installExtension(ext, clientConfig, con)
if name != "all" {
return nil
}
}
}
if name == "all" {
con.Printf("\n")
con.PrintInfof("All packages installed\n")
return nil
}
return ErrPackageNotFound
return packageNames
}
func installAlias(alias *alias.AliasManifest, clientConfig ArmoryHTTPConfig, con *console.SliverConsoleClient) {
err := installAliasPackageByName(alias.CommandName, clientConfig, con)
if err != nil {
con.PrintErrorf("Failed to install alias '%s': %s", alias.CommandName, err)
return
}
}
// This is a convenience function to get the names of the commands in the cache
func getCommandsInCache(armoryPK string) []string {
commandNames := []string{}
func installAliasPackageByName(name string, clientConfig ArmoryHTTPConfig, con *console.SliverConsoleClient) error {
var entry *pkgCacheEntry
pkgCache.Range(func(key, value interface{}) bool {
cacheEntry := value.(pkgCacheEntry)
if cacheEntry.Pkg.CommandName == name {
entry = &cacheEntry
return false
if cacheEntry.LastErr == nil {
if armoryPK != "" && cacheEntry.ArmoryConfig.PublicKey != armoryPK {
return true
}
if cacheEntry.Pkg.IsAlias {
if cacheEntry.Alias.CommandName != "" && !slices.Contains(commandNames, cacheEntry.Alias.CommandName) {
commandNames = append(commandNames, cacheEntry.Alias.CommandName)
}
} else {
for _, command := range cacheEntry.Extension.ExtCommand {
if command.CommandName != "" && !slices.Contains(commandNames, command.CommandName) {
commandNames = append(commandNames, command.CommandName)
}
}
}
}
return true
})
return commandNames
}
func getPackagesWithCommandName(name, armoryPK, minimumVersion string) []*pkgCacheEntry {
packages := []*pkgCacheEntry{}
pkgCache.Range(func(key, value interface{}) bool {
cacheEntry := value.(pkgCacheEntry)
if cacheEntry.LastErr == nil {
if cacheEntry.Pkg.IsAlias {
if cacheEntry.Alias.CommandName == name {
if minimumVersion == "" || (minimumVersion != "" && cacheEntry.Alias.Version >= minimumVersion) {
if armoryPK == "" || (armoryPK != "" && cacheEntry.ArmoryConfig.PublicKey == armoryPK) {
packages = append(packages, &cacheEntry)
}
}
}
} else {
for _, command := range cacheEntry.Extension.ExtCommand {
if command.CommandName == name {
if minimumVersion == "" || (minimumVersion != "" && cacheEntry.Extension.Version >= minimumVersion) {
if armoryPK == "" || (armoryPK != "" && cacheEntry.ArmoryConfig.PublicKey == armoryPK) {
packages = append(packages, &cacheEntry)
}
break
}
}
}
}
}
return true
})
return packages
}
func getPackageIDFromUser(name string, options map[string]string) string {
selectedPackageKey := ""
optionKeys := util.Keys(options)
slices.Sort(optionKeys)
// Add a cancel option
optionKeys = append(optionKeys, doNotInstallOption)
options[doNotInstallOption] = doNotInstallPackageName
forms.Select(fmt.Sprintf("More than one package contains the command %s. Please choose an option from the list below:", name), optionKeys, &selectedPackageKey)
selectedPackageID := options[selectedPackageKey]
return selectedPackageID
}
func getPackageForCommand(name, armoryPK, minimumVersion string) (*pkgCacheEntry, error) {
packagesWithCommand := getPackagesWithCommandName(name, armoryPK, minimumVersion)
if len(packagesWithCommand) > 1 {
// Build an option map for the user to choose from (option -> pkgID)
optionMap := make(map[string]string)
for _, packageEntry := range packagesWithCommand {
var optionName string
if packageEntry.Pkg.IsAlias {
optionName = fmt.Sprintf("Alias %s %s from armory %s (%s)",
name,
packageEntry.Alias.Version,
packageEntry.ArmoryConfig.Name,
packageEntry.Pkg.RepoURL,
)
} else {
optionName = fmt.Sprintf("Extension %s %s from armory %s with command %s (%s)",
packageEntry.Pkg.Name,
packageEntry.Extension.Version,
packageEntry.ArmoryConfig.Name,
name,
packageEntry.Pkg.RepoURL,
)
}
optionMap[optionName] = packageEntry.ID
}
selectedPackageID := getPackageIDFromUser(name, optionMap)
if selectedPackageID == doNotInstallPackageName {
return nil, fmt.Errorf("user cancelled installation")
}
for _, packageEntry := range packagesWithCommand {
if packageEntry.ID == selectedPackageID {
return packageEntry, nil
}
}
} else if len(packagesWithCommand) == 1 {
return packagesWithCommand[0], nil
}
return nil, ErrPackageNotFound
}
func buildInstallList(name, armoryPK string, forceInstallation bool, pendingPackages map[string]string) ([]string, error) {
packageInstallList := []string{}
installedPackages := getInstalledPackageNames()
/*
Gather information about what we are working with
Find all conflicts within aliases for a given name (or all names), same thing with extensions
Then if there are aliases and extensions with a given name, make sure to note that for when we ask the user what to do
*/
var requestedPackageList []string
if name == "all" {
requestedPackageList = []string{}
allCommands := getCommandsInCache(armoryPK)
for _, cmdName := range allCommands {
if !slices.Contains(installedPackages, cmdName) || forceInstallation {
// Check to see if there is a package pending with that name
if _, ok := pendingPackages[cmdName]; !ok {
requestedPackageList = append(requestedPackageList, cmdName)
}
}
}
} else {
if !slices.Contains(installedPackages, name) || forceInstallation {
// Check to see if there is a package pending with that name
if _, ok := pendingPackages[name]; !ok {
requestedPackageList = []string{name}
}
} else {
return nil, ErrPackageAlreadyInstalled
}
}
for _, packageName := range requestedPackageList {
if _, ok := pendingPackages[packageName]; ok {
// We are already going to install a package with this name, so do not try to resolve it
continue
}
packageEntry, err := getPackageForCommand(packageName, armoryPK, "")
if err != nil {
return nil, err
}
if !slices.Contains(packageInstallList, packageEntry.ID) {
packageInstallList = append(packageInstallList, packageEntry.ID)
pendingPackages[packageName] = packageEntry.ID
}
if !packageEntry.Pkg.IsAlias {
dependencies := make(map[string]*pkgCacheEntry)
err = resolveExtensionPackageDependencies(packageEntry, dependencies, pendingPackages)
if err != nil {
return nil, err
}
for pkgName, packageEntry := range dependencies {
if !slices.Contains(packageInstallList, packageEntry.ID) {
packageInstallList = append(packageInstallList, packageEntry.ID)
}
if _, ok := pendingPackages[pkgName]; !ok {
pendingPackages[pkgName] = packageEntry.ID
}
}
}
}
return packageInstallList, nil
}
func installPackageByName(name, armoryPK string, forceInstallation, promptToOverwrite bool, clientConfig ArmoryHTTPConfig, con *console.SliverClient) error {
pendingPackages := make(map[string]string)
packageInstallList, err := buildInstallList(name, armoryPK, forceInstallation, pendingPackages)
if err != nil {
return err
}
if len(packageInstallList) == 0 && name == "all" {
availableCommands := getCommandsInCache(armoryPK)
if len(availableCommands) == 0 {
con.PrintInfof("No packages or bundles found\n")
} else {
con.PrintInfof("All available packages are already installed\n")
}
return nil
}
if len(packageInstallList) > 0 {
for _, packageID := range packageInstallList {
entry := packageCacheLookupByID(packageID)
if entry == nil {
return errors.New("cache consistency error - please refresh the cache and try again")
}
if entry.Pkg.IsAlias {
err := installAliasPackage(entry, promptToOverwrite, clientConfig, con)
if err != nil {
return fmt.Errorf("failed to install alias '%s': %s", entry.Alias.CommandName, err)
}
} else {
err := installExtensionPackage(entry, promptToOverwrite, clientConfig, con)
if err != nil {
return fmt.Errorf("failed to install extension '%s': %s", entry.Extension.Name, err)
}
}
}
} else {
return ErrPackageNotFound
}
if name == "all" {
con.Printf("\n")
con.PrintSuccessf("Operation complete\n")
}
return nil
}
func armoryInstallOptions(armoryPK, armoryName string) []forms.ArmoryInstallOption {
options := []forms.ArmoryInstallOption{}
seen := make(map[string]bool)
packageCount := 0
pkgCache.Range(func(key, value interface{}) bool {
cacheEntry, ok := value.(pkgCacheEntry)
if !ok {
return true
}
if cacheEntry.LastErr != nil {
return true
}
if armoryPK != "" && cacheEntry.ArmoryConfig.PublicKey != armoryPK {
return true
}
if cacheEntry.Pkg.IsAlias {
name := cacheEntry.Alias.CommandName
if name == "" {
return true
}
if seen[name] {
return true
}
label := formatArmoryInstallLabel("alias", name, cacheEntry.Alias.Help)
options = append(options, forms.ArmoryInstallOption{
Value: name,
Label: label,
})
seen[name] = true
packageCount++
return true
}
for _, command := range cacheEntry.Extension.ExtCommand {
name := command.CommandName
if name == "" {
continue
}
if seen[name] {
continue
}
label := formatArmoryInstallLabel("extension", name, command.Help)
options = append(options, forms.ArmoryInstallOption{
Value: name,
Label: label,
})
seen[name] = true
packageCount++
}
return true
})
for _, bundle := range bundlesInCache() {
if bundle.Name == "" {
continue
}
if armoryName != "" && bundle.ArmoryName != armoryName {
continue
}
if seen[bundle.Name] {
continue
}
label := fmt.Sprintf("bundle: %s (%d packages)", bundle.Name, len(bundle.Packages))
options = append(options, forms.ArmoryInstallOption{
Value: bundle.Name,
Label: label,
})
seen[bundle.Name] = true
}
if len(options) == 0 {
return options
}
sort.Slice(options, func(i, j int) bool {
return options[i].Label < options[j].Label
})
if packageCount > 0 {
options = append([]forms.ArmoryInstallOption{
{
Value: "all",
Label: "all packages (aliases + extensions)",
},
}, options...)
}
return options
}
func formatArmoryInstallLabel(kind, name, help string) string {
help = strings.TrimSpace(help)
if help == "" {
return fmt.Sprintf("%s: %s", kind, name)
}
help = strings.Join(strings.Fields(help), " ")
return fmt.Sprintf("%s: %s - %s", kind, name, help)
}
func installAliasPackage(entry *pkgCacheEntry, promptToOverwrite bool, clientConfig ArmoryHTTPConfig, con *console.SliverClient) error {
if entry == nil {
return errors.New("package not found")
}
if !entry.Pkg.IsAlias {
return errors.New("package is not an alias")
}
repoURL, err := url.Parse(entry.RepoURL)
if err != nil {
return err
@@ -143,7 +619,7 @@ func installAliasPackageByName(name string, clientConfig ArmoryHTTPConfig, con *
var sig *minisign.Signature
var tarGz []byte
if pkgParser, ok := pkgParsers[repoURL.Hostname()]; ok {
sig, tarGz, err = pkgParser(&entry.Pkg, false, clientConfig)
sig, tarGz, err = pkgParser(entry.ArmoryConfig, &entry.Pkg, false, clientConfig)
} else {
sig, tarGz, err = DefaultArmoryPkgParser(entry.ArmoryConfig, &entry.Pkg, false, clientConfig)
}
@@ -159,95 +635,66 @@ func installAliasPackageByName(name string, clientConfig ArmoryHTTPConfig, con *
return errors.New("signature verification failed")
}
tmpFile, err := ioutil.TempFile("", "sliver-armory-")
tmpFileName, err := writeArmoryTempFile(tarGz)
if err != nil {
return err
}
defer os.Remove(tmpFile.Name())
_, err = tmpFile.Write(tarGz)
if err != nil {
return err
}
tmpFile.Close()
defer os.Remove(tmpFileName)
con.Printf(console.Clearln + "\r") // Clear the line
installPath := alias.InstallFromFile(tmpFile.Name(), true, con)
installPath := alias.InstallFromFile(tmpFileName, entry.Alias.CommandName, promptToOverwrite, con)
if installPath == nil {
return errors.New("failed to install alias")
}
_, err = alias.LoadAlias(filepath.Join(*installPath, alias.ManifestFileName), con)
menuCmd := con.App.Menu(constants.ImplantMenu).Root()
_, err = alias.LoadAlias(filepath.Join(*installPath, alias.ManifestFileName), menuCmd, con)
if err != nil {
return err
}
return nil
}
func installExtension(ext *extensions.ExtensionManifest, clientConfig ArmoryHTTPConfig, con *console.SliverConsoleClient) {
deps := make(map[string]struct{})
resolveExtensionPackageDependencies(ext.CommandName, deps, clientConfig, con)
for dep := range deps {
if extensions.CmdExists(dep, con.App) {
continue // Dependency is already installed
}
err := installExtensionPackageByName(dep, clientConfig, con)
if err != nil {
con.PrintErrorf("Failed to install extension dependency '%s': %s", dep, err)
return
}
}
err := installExtensionPackageByName(ext.CommandName, clientConfig, con)
if err != nil {
con.PrintErrorf("Failed to install extension '%s': %s", ext.CommandName, err)
return
}
}
const maxDepDepth = 10 // Arbitrary recursive limit for dependencies
func resolveExtensionPackageDependencies(name string, deps map[string]struct{}, clientConfig ArmoryHTTPConfig, con *console.SliverConsoleClient) {
var entry *pkgCacheEntry
pkgCache.Range(func(key, value interface{}) bool {
cacheEntry := value.(pkgCacheEntry)
if cacheEntry.Pkg.CommandName == name {
entry = &cacheEntry
return false
func resolveExtensionPackageDependencies(pkg *pkgCacheEntry, deps map[string]*pkgCacheEntry, pendingPackages map[string]string) error {
for _, multiExt := range pkg.Extension.ExtCommand {
if multiExt.DependsOn == "" {
continue // Avoid adding empty dependency
}
return true
})
if entry == nil {
return
}
if entry.Extension.DependsOn == "" {
return // Avoid adding empty dependency
if multiExt.DependsOn == pkg.Extension.Name {
continue // Avoid infinite loop of something that depends on itself
}
// We also need to look out for circular dependencies, so if we've already
// seen this dependency, we stop resolving
if _, ok := deps[multiExt.DependsOn]; ok {
continue // Already resolved
}
// Check to make sure we are not already going to install a package with this name
if _, ok := pendingPackages[multiExt.DependsOn]; ok {
continue
}
if maxDepDepth < len(deps) {
continue
}
// Figure out what package we need for the dependency
dependencyEntry, err := getPackageForCommand(multiExt.DependsOn, "", "")
if err != nil {
return fmt.Errorf("could not resolve dependency %s for %s: %s", multiExt.DependsOn, pkg.Extension.Name, err)
}
deps[multiExt.DependsOn] = dependencyEntry
err = resolveExtensionPackageDependencies(dependencyEntry, deps, pendingPackages)
if err != nil {
return err
}
}
if entry.Extension.DependsOn == name {
return // Avoid infinite loop of something that depends on itself
}
// We also need to look out for circular dependencies, so if we've already
// seen this dependency, we stop resolving
if _, ok := deps[entry.Extension.DependsOn]; ok {
return // Already resolved
}
if maxDepDepth < len(deps) {
return
}
deps[entry.Extension.DependsOn] = struct{}{}
resolveExtensionPackageDependencies(entry.Extension.DependsOn, deps, clientConfig, con)
return nil
}
func installExtensionPackageByName(name string, clientConfig ArmoryHTTPConfig, con *console.SliverConsoleClient) error {
var entry *pkgCacheEntry
pkgCache.Range(func(key, value interface{}) bool {
cacheEntry := value.(pkgCacheEntry)
if cacheEntry.Pkg.CommandName == name {
entry = &cacheEntry
return false
}
return true
})
func installExtensionPackage(entry *pkgCacheEntry, promptToOverwrite bool, clientConfig ArmoryHTTPConfig, con *console.SliverClient) error {
if entry == nil {
return errors.New("package not found")
}
@@ -261,7 +708,7 @@ func installExtensionPackageByName(name string, clientConfig ArmoryHTTPConfig, c
var sig *minisign.Signature
var tarGz []byte
if pkgParser, ok := pkgParsers[repoURL.Hostname()]; ok {
sig, tarGz, err = pkgParser(&entry.Pkg, false, clientConfig)
sig, tarGz, err = pkgParser(entry.ArmoryConfig, &entry.Pkg, false, clientConfig)
} else {
sig, tarGz, err = DefaultArmoryPkgParser(entry.ArmoryConfig, &entry.Pkg, false, clientConfig)
}
@@ -277,33 +724,45 @@ func installExtensionPackageByName(name string, clientConfig ArmoryHTTPConfig, c
return errors.New("signature verification failed")
}
tmpFile, err := ioutil.TempFile("", "sliver-armory-")
if err != nil {
return err
}
defer os.Remove(tmpFile.Name())
_, err = tmpFile.Write(tarGz)
if err != nil {
return err
}
err = tmpFile.Sync()
tmpFileName, err := writeArmoryTempFile(tarGz)
if err != nil {
return err
}
defer os.Remove(tmpFileName)
con.Printf(console.Clearln + "\r") // Clear download message
installPath := extensions.InstallFromFilePath(tmpFile.Name(), true, con)
if installPath == nil {
return errors.New("failed to install extension")
}
extCmd, err := extensions.LoadExtensionManifest(filepath.Join(*installPath, extensions.ManifestFileName))
if err != nil {
return err
}
if extensions.CmdExists(extCmd.Name, con.App) {
con.App.Commands().Remove(extCmd.Name)
}
extensions.ExtensionRegisterCommand(extCmd, con)
extensions.InstallFromDir(tmpFileName, promptToOverwrite, con, true)
return nil
}
func writeArmoryTempFile(data []byte) (string, error) {
if len(data) == 0 {
return "", errors.New("downloaded archive is empty")
}
tmpFile, err := os.CreateTemp("", "sliver-armory-")
if err != nil {
return "", err
}
tmpFileName := tmpFile.Name()
for len(data) > 0 {
n, err := tmpFile.Write(data)
if err != nil {
tmpFile.Close()
os.Remove(tmpFileName)
return "", err
}
data = data[n:]
}
if err := tmpFile.Sync(); err != nil {
tmpFile.Close()
os.Remove(tmpFileName)
return "", err
}
if err := tmpFile.Close(); err != nil {
os.Remove(tmpFileName)
return "", err
}
return tmpFileName, nil
}
+652
View File
@@ -0,0 +1,652 @@
package armory
import (
"fmt"
"os"
"path/filepath"
"slices"
"strings"
"sync"
"github.com/bishopfox/sliver/client/assets"
"github.com/bishopfox/sliver/client/command/settings"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/client/forms"
"github.com/jedib0t/go-pretty/v6/table"
"github.com/spf13/cobra"
)
func printArmories(con *console.SliverClient) {
tw := table.NewWriter()
tw.SetStyle(settings.GetTableStyle(con))
tw.AppendHeader(table.Row{
"Armory Name",
"Authorization Required",
"Enabled",
"URL",
})
configuredArmories := getCurrentArmoryConfiguration()
for _, armory := range configuredArmories {
var authRequired string
var enabled string
if armory.Authorization != "" {
authRequired = "yes"
} else {
authRequired = "no"
}
if armory.Enabled {
enabled = "yes"
} else {
enabled = "no"
}
tw.AppendRow(table.Row{
armory.Name,
authRequired,
enabled,
armory.RepoURL,
})
}
con.Printf("%s\n", tw.Render())
}
func generateRowsForArmory(armoryInfo *assets.ArmoryConfig) []table.Row {
rows := make([]table.Row, 0)
rows = append(rows, table.Row{
"Name",
armoryInfo.Name,
})
rows = append(rows, table.Row{
"Public Key",
armoryInfo.PublicKey,
})
enabled := "yes"
if !armoryInfo.Enabled {
enabled = "no"
}
rows = append(rows, table.Row{
"Enabled",
enabled,
})
authorizationRequired := "no"
if armoryInfo.Authorization != "" {
authorizationRequired = fmt.Sprintf("yes; current authorization: %s", armoryInfo.Authorization)
}
rows = append(rows, table.Row{
"Authorization required?",
authorizationRequired,
})
if authorizationRequired != "no" {
authCmd := armoryInfo.AuthorizationCmd
if authCmd == "" {
authCmd = "not configured"
}
rows = append(rows, table.Row{
"Authorization Command",
authCmd,
})
}
rows = append(rows, table.Row{
"URL",
armoryInfo.RepoURL,
})
return rows
}
func generateRowsForPackage(packageInfo *pkgCacheEntry) []table.Row {
rows := make([]table.Row, 0)
rows = append(rows, table.Row{
"Name",
packageInfo.Pkg.Name,
})
rows = append(rows, table.Row{
"Command Name",
packageInfo.Pkg.CommandName,
})
rows = append(rows, table.Row{
"Armory Name",
packageInfo.Pkg.ArmoryName,
})
packageType := "alias"
if !packageInfo.Pkg.IsAlias {
packageType = "extension"
}
rows = append(rows, table.Row{
"Package Type",
packageType,
})
if packageType == "alias" {
rows = append(rows, table.Row{
"Version",
packageInfo.Alias.Version,
})
rows = append(rows, table.Row{
"Author",
packageInfo.Alias.OriginalAuthor,
})
rows = append(rows, table.Row{
"Repo URL",
packageInfo.Alias.RepoURL,
})
rows = append(rows, table.Row{
"Help",
packageInfo.Alias.Help,
})
} else {
rows = append(rows, table.Row{
"Version",
packageInfo.Extension.Version,
})
rows = append(rows, table.Row{
"Original Author",
packageInfo.Extension.OriginalAuthor,
})
rows = append(rows, table.Row{
"Extension Author",
packageInfo.Extension.ExtensionAuthor,
})
rows = append(rows, table.Row{
"URL",
packageInfo.Extension.RepoURL,
})
extCommands := []string{}
for _, cmd := range packageInfo.Extension.ExtCommand {
extCommands = append(extCommands, cmd.CommandName)
}
rows = append(rows, table.Row{
"Contains commands",
strings.Join(extCommands, ", "),
})
rows = append(rows, table.Row{"", ""})
rows = append(rows, table.Row{"Command Info", ""})
for _, extCmd := range packageInfo.Extension.ExtCommand {
rows = append(rows, table.Row{
"Command Name",
extCmd.CommandName,
})
rows = append(rows, table.Row{
"Dependencies",
extCmd.DependsOn,
})
rows = append(rows, table.Row{
"Help",
extCmd.Help,
})
rows = append(rows, table.Row{"", ""})
}
}
rows = append(rows, table.Row{"", ""})
return rows
}
func viewDetailedInformation(con *console.SliverClient, entity string) {
tw := table.NewWriter()
tw.SetStyle(settings.GetTableStyle(con))
tw.AppendHeader(table.Row{
"Property",
"Value",
})
// See where this name exists in the armory and package indexes
armoryResult := armoryLookupByName(entity)
if armoryResult != nil {
tw.AppendRows(generateRowsForArmory(armoryResult))
con.Printf("Armory information for %s\n\n", entity)
con.Printf("%s\n", tw.Render())
tw.ResetRows()
con.Printf("\n")
}
// Get packages with this name
packageResult := packageCacheLookupByName(entity)
if len(packageResult) > 0 {
con.Printf("Packages named %s\n\n", entity)
for _, pkg := range packageResult {
tw.AppendRows(generateRowsForPackage(pkg))
con.Printf("%s\n", tw.Render())
tw.ResetRows()
con.Printf("\n")
}
}
// Get extensions containing commands with this name
commandResult := packageCacheLookupByCmd(entity)
commandResultFiltered := make([]*pkgCacheEntry, 0)
for _, cmd := range commandResult {
if !cmd.Pkg.IsAlias {
commandResultFiltered = append(commandResultFiltered, cmd)
}
}
if len(commandResultFiltered) > 0 {
con.Printf("Packages containing commands named %s\n\n", entity)
for _, cmd := range commandResultFiltered {
tw.AppendRows(generateRowsForPackage(cmd))
con.Printf("%s\n", tw.Render())
tw.ResetRows()
}
}
}
func ArmoryInfoCommand(cmd *cobra.Command, con *console.SliverClient, args []string) {
if len(args) == 0 {
printArmories(con)
return
}
// If the user wants info on something specific, make sure the caches are up to date
refresh(parseArmoryHTTPConfig(cmd))
viewDetailedInformation(con, args[0])
}
func verifyArmory(armoryInfo *assets.ArmoryConfig, clientConfig ArmoryHTTPConfig) error {
wg := &sync.WaitGroup{}
// Only making one request, so we can limit ourselves to one concurrent request
requestChannel := make(chan struct{}, 1)
wg.Add(1)
requestChannel <- struct{}{}
go fetchIndex(armoryInfo, requestChannel, clientConfig, wg)
wg.Wait()
result, ok := indexCache.Load(armoryInfo.PublicKey)
if !ok {
return fmt.Errorf("failed to retrieve armory index")
}
cacheResult := result.(indexCacheEntry)
return cacheResult.LastErr
}
func getCurrentArmoryConfiguration() []*assets.ArmoryConfig {
configs := []*assets.ArmoryConfig{}
armoryNames := []string{}
// If the default armory is in the configuration, force it to be last
var defaultConfig *assets.ArmoryConfig
currentArmories.Range(func(key, value interface{}) bool {
armoryEntry := value.(assets.ArmoryConfig)
// Skip over the default armory for now
if armoryEntry.Name != assets.DefaultArmoryName {
configs = append(configs, &armoryEntry)
armoryNames = append(armoryNames, armoryEntry.Name)
} else {
defaultConfig = &armoryEntry
}
return true
})
if !armoriesInitialized {
/*
Armories are initialized on the first call to the armory command
If armories are added or removed before the first call, we want
to make sure we still load in the ones from the configuration
file.
*/
persistentConfigs := assets.GetArmoriesConfig()
for _, config := range persistentConfigs {
if !slices.Contains(armoryNames, config.Name) {
if config.Name == assets.DefaultArmoryName {
if defaultArmoryRemoved {
continue
} else if defaultConfig != nil {
// The user potentially changed something about the default config
configs = append(configs, defaultConfig)
currentArmories.Store(config.PublicKey, *defaultConfig)
continue
}
}
configs = append(configs, config)
currentArmories.Store(config.PublicKey, *config)
}
}
return configs
}
if !defaultArmoryRemoved {
if defaultConfig != nil {
configs = append(configs, defaultConfig)
} else {
configs = append(configs, assets.DefaultArmoryConfig)
}
}
assets.RefreshArmoryAuthorization(configs)
return configs
}
func armoryNameExists(name string) bool {
currentArmoriesConfigured := getCurrentArmoryConfiguration()
for _, armory := range currentArmoriesConfigured {
if armory.Name == name {
return true
}
}
return false
}
func armoryKeyExists(pubKey string) bool {
currentArmoriesConfigured := getCurrentArmoryConfiguration()
for _, armory := range currentArmoriesConfigured {
if armory.PublicKey == pubKey {
return true
}
}
return false
}
func AddArmoryCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
// Get necessary information
url, _ := cmd.Flags().GetString("url")
pubKey, _ := cmd.Flags().GetString("pubkey")
auth, _ := cmd.Flags().GetString("auth")
authCmd, _ := cmd.Flags().GetString("authcmd")
noSave, _ := cmd.Flags().GetBool("no-save")
name := args[0]
if name == "" {
con.PrintErrorf("an armory name is required\n")
return
}
// Make sure we do not already have an armory config with the supplied name
if armoryNameExists(name) {
con.PrintErrorf("armory %s already exists\n", name)
return
}
clientConfig := parseArmoryHTTPConfig(cmd)
armoryConfig := assets.ArmoryConfig{
PublicKey: pubKey,
RepoURL: url,
Authorization: auth,
AuthorizationCmd: authCmd,
Name: name,
Enabled: true,
}
// verifyArmory will add the armory index to the cache on success, so we do not have to force a refresh
err := verifyArmory(&armoryConfig, clientConfig)
if err != nil {
con.PrintErrorf("could not add armory: %s\n", err)
return
}
currentArmories.Store(armoryConfig.PublicKey, armoryConfig)
if !noSave {
configs := getCurrentArmoryConfiguration()
err = assets.SaveArmoriesConfig(configs)
if err != nil {
con.PrintErrorf("Could not save armory configuration: %s\n", err)
} else {
con.PrintSuccessf("Armory configuration saved\n")
}
}
con.PrintSuccessf("Added armory %s\n", name)
}
// Get a list of package IDs for an armory by its public key
func getPackageIDsForArmory(armoryPublicKey string) []string {
packageIDs := []string{}
pkgCache.Range(func(key, value interface{}) bool {
pkgEntry := value.(pkgCacheEntry)
if pkgEntry.ArmoryConfig.PublicKey == armoryPublicKey {
packageIDs = append(packageIDs, pkgEntry.ID)
}
return true
})
return packageIDs
}
func RemoveArmoryCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
name := args[0]
if name == "" {
con.PrintErrorf("an armory name is required\n")
return
}
armories := getCurrentArmoryConfiguration()
deleted := false
newConfiguration := []*assets.ArmoryConfig{}
for _, armory := range armories {
if armory.Name != name {
newConfiguration = append(newConfiguration, armory)
} else {
currentArmories.Delete(armory.PublicKey)
indexCache.Delete(armory.PublicKey)
/*
To delete from the package cache, we will have
to gather a list of package IDs for the
armory then delete them from the cache.
*/
armoryPackageIDs := getPackageIDsForArmory(armory.PublicKey)
for _, id := range armoryPackageIDs {
pkgCache.Delete(id)
}
deleted = true
}
}
if deleted {
con.PrintSuccessf("Armory %s successfully deleted, saving configuration...\n", name)
if name == assets.DefaultArmoryName {
defaultArmoryRemoved = true
}
} else {
con.PrintErrorf("Armory %s is not a configured armory\n", name)
return
}
err := assets.SaveArmoriesConfig(newConfiguration)
if err != nil {
con.PrintErrorf("Could not save new armory configuration: %s\n", err)
} else {
con.PrintSuccessf("Saved armory configuration\n")
}
}
func SaveArmories(con *console.SliverClient) {
configs := getCurrentArmoryConfiguration()
err := assets.SaveArmoriesConfig(configs)
if err != nil {
con.PrintErrorf("Could not save armory configuration: %s\n", err)
} else {
con.PrintSuccessf("Successfully saved armory configuration\n")
}
}
func getArmoryConfig(name string) (assets.ArmoryConfig, error) {
armories := getCurrentArmoryConfiguration()
var armoryPublicKey string
armoryConfig := assets.ArmoryConfig{}
for _, armory := range armories {
if armory.Name == name {
armoryPublicKey = armory.PublicKey
break
}
}
if armoryPublicKey == "" {
return armoryConfig, fmt.Errorf("could not retrieve armory configuration for armory %s. Try running the armory command to refresh indexes", name)
}
value, ok := currentArmories.Load(armoryPublicKey)
if !ok {
return armoryConfig, fmt.Errorf("could not retrieve armory configuration for armory %s. Try running the armory command to refresh indexes", name)
}
armoryConfig = value.(assets.ArmoryConfig)
return armoryConfig, nil
}
func ChangeArmoryEnabledState(cmd *cobra.Command, con *console.SliverClient, args []string, enabled bool) {
// Get the armory's public key, change its state, then update the cache to remove packages from the armory
var name string
if len(args) > 0 && args[0] != "" {
name = args[0]
} else {
con.PrintErrorf("an armory name is required")
return
}
armoryConfig, err := getArmoryConfig(name)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
armoryPublicKey := armoryConfig.PublicKey
armoryConfig.Enabled = enabled
currentArmories.Store(armoryPublicKey, armoryConfig)
if !enabled {
// Remove cached info for the armory if it is disabled
armoryPackageIDs := getPackageIDsForArmory(armoryPublicKey)
for _, id := range armoryPackageIDs {
pkgCache.Delete(id)
}
indexCache.Delete(armoryPublicKey)
}
// Force a refresh
clientConfig := parseArmoryHTTPConfig(cmd)
con.PrintInfof("Refreshing armory information...\n")
refresh(clientConfig)
SaveArmories(con)
con.PrintSuccessf("Done\n")
}
func ModifyArmoryCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
// Quick check to make sure we were provided with a name
var name string
if len(args) > 0 && args[0] != "" {
name = args[0]
}
if name == "" {
con.PrintErrorf("an armory name is required\n")
return
}
// Get the record for the armory
armoryConfig, err := getArmoryConfig(name)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
// Save the old config so we can delete the existing config
// and revert if needed
previousConfig := assets.ArmoryConfig{
PublicKey: armoryConfig.PublicKey,
RepoURL: armoryConfig.RepoURL,
Authorization: armoryConfig.Authorization,
AuthorizationCmd: armoryConfig.AuthorizationCmd,
Name: armoryConfig.Name,
Enabled: armoryConfig.Enabled,
}
if cmd.Flags().Changed("name") {
newName, _ := cmd.Flags().GetString("name")
// Make sure the name does not already exist
if armoryNameExists(newName) {
con.PrintErrorf("armory with name %s already exists\n", name)
return
}
armoryConfig.Name = newName
}
if cmd.Flags().Changed("pubkey") {
newPubKey, _ := cmd.Flags().GetString("pubkey")
/*
Since public keys are used as the key for the index cache,
make sure we have not been given a key that already exists
*/
if armoryKeyExists(newPubKey) {
con.PrintErrorf("armory provided public key already exists\n")
return
}
armoryConfig.PublicKey = newPubKey
}
if cmd.Flags().Changed("url") {
newUrl, _ := cmd.Flags().GetString("url")
armoryConfig.RepoURL = newUrl
}
if cmd.Flags().Changed("auth") {
newAuth, _ := cmd.Flags().GetString("auth")
armoryConfig.Authorization = newAuth
}
if cmd.Flags().Changed("authcmd") {
newAuthCmd, _ := cmd.Flags().GetString("authcmd")
armoryConfig.AuthorizationCmd = newAuthCmd
}
// We will remove the old armory and add a new one with the changed properties to force a refresh
currentArmories.Delete(previousConfig.PublicKey)
indexCache.Delete(previousConfig.PublicKey)
armoryPackageIDs := getPackageIDsForArmory(previousConfig.PublicKey)
for _, id := range armoryPackageIDs {
pkgCache.Delete(id)
}
clientConfig := parseArmoryHTTPConfig(cmd)
err = verifyArmory(&armoryConfig, clientConfig)
if err != nil {
con.PrintErrorf("could not modify armory: %s\n", err)
confirm := false
_ = forms.Confirm("Would you like to revert the properties of the armory back to their previous values?", &confirm)
if !confirm {
return
} else {
err = verifyArmory(&previousConfig, clientConfig)
if err != nil {
con.PrintErrorf("could not re-add armory %s: %s\n", name, err)
return
}
armoryConfig = previousConfig
con.PrintSuccessf("Re-added armory with previous values")
}
}
currentArmories.Store(armoryConfig.PublicKey, armoryConfig)
if !cmd.Flags().Changed("no-save") {
SaveArmories(con)
}
// Force a refresh
con.PrintInfof("Refreshing armory information...\n")
refresh(clientConfig)
con.PrintSuccessf("Done\n")
}
func RefreshArmories(cmd *cobra.Command, con *console.SliverClient) {
clientConfig := parseArmoryHTTPConfig(cmd)
// Since this being called from the refresh command, force the refresh
clientConfig.IgnoreCache = true
clearAllCaches()
armoriesInitialized = false
con.PrintInfof("Refreshing armory information...")
refresh(clientConfig)
con.PrintSuccessf("Refreshed armory information\n")
}
func ResetArmoryConfig(cmd *cobra.Command, con *console.SliverClient) {
armoryConfigPath := filepath.Join(assets.GetRootAppDir(), assets.ArmoryConfigFileName)
con.PrintInfof("Removing armory configuration file %s...", armoryConfigPath)
err := os.Remove(armoryConfigPath)
if err != nil {
con.PrintErrorf("Could not delete armory configuration file %s: %s", armoryConfigPath, err)
return
}
con.PrintSuccessf("Removed armory configuration file %s\n", armoryConfigPath)
// Force a refresh
RefreshArmories(cmd, con)
con.PrintSuccessf("Successfully reset armory configuration\n")
}
+143 -122
View File
@@ -19,12 +19,14 @@ package armory
*/
import (
"bytes"
"crypto/sha256"
"crypto/tls"
"encoding/base64"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"io"
"net"
"net/http"
"net/url"
@@ -33,14 +35,14 @@ import (
"time"
"github.com/bishopfox/sliver/client/assets"
"github.com/bishopfox/sliver/server/cryptography/minisign"
"github.com/bishopfox/sliver/util/minisign"
)
// ArmoryIndexParser - Generic interface to fetch armory indexes
type ArmoryIndexParser func(*assets.ArmoryConfig, ArmoryHTTPConfig) (*ArmoryIndex, error)
// ArmoryPackageParser - Generic interface to fetch armory package manifests
type ArmoryPackageParser func(*ArmoryPackage, bool, ArmoryHTTPConfig) (*minisign.Signature, []byte, error)
type ArmoryPackageParser func(*assets.ArmoryConfig, *ArmoryPackage, bool, ArmoryHTTPConfig) (*minisign.Signature, []byte, error)
var (
indexParsers = map[string]ArmoryIndexParser{
@@ -67,6 +69,18 @@ type armoryPkgResponse struct {
TarGzURL string `json:"tar_gz_url"` // Raw tar.gz url
}
func calculatePackageHash(pkg *ArmoryPackage) string {
if pkg == nil {
return ""
}
hasher := sha256.New()
// Hash some of the things that make the package unique
packageIdentifier := []byte(pkg.RepoURL + pkg.PublicKey + pkg.ArmoryName + pkg.CommandName)
hasher.Write(packageIdentifier)
return fmt.Sprintf("%x", hasher.Sum(nil))
}
//
// Default Parsers for Self-Hosted Armories
//
@@ -79,25 +93,7 @@ func DefaultArmoryIndexParser(armoryConfig *assets.ArmoryConfig, clientConfig Ar
return nil, err
}
client := httpClient(clientConfig)
repoURL, err := url.Parse(armoryConfig.RepoURL)
if err != nil {
return nil, err
}
req := &http.Request{
Method: http.MethodGet,
URL: repoURL,
Header: map[string][]string{},
}
if armoryConfig.Authorization != "" {
req.Header.Set("Authorization", armoryConfig.Authorization)
}
resp, err := client.Do(req)
if err != nil {
return nil, err
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
resp, body, err := httpRequest(clientConfig, armoryConfig.RepoURL, armoryConfig, http.Header{})
if err != nil {
return nil, err
}
@@ -125,17 +121,52 @@ func DefaultArmoryIndexParser(armoryConfig *assets.ArmoryConfig, clientConfig Ar
return nil, errors.New("index has invalid signature")
}
armoryIndex := &ArmoryIndex{ArmoryConfig: armoryConfig}
if err != nil {
return nil, err
armoryIndex := &ArmoryIndex{
ArmoryConfig: armoryConfig,
}
err = json.Unmarshal(armoryIndexData, armoryIndex)
if err != nil {
return nil, err
}
// Populate armory name and ID information for assets
for _, bundle := range armoryIndex.Bundles {
bundle.ArmoryName = armoryIndex.ArmoryConfig.Name
}
for _, alias := range armoryIndex.Aliases {
alias.ArmoryName = armoryIndex.ArmoryConfig.Name
alias.ArmoryPK = armoryIndex.ArmoryConfig.PublicKey
if cached := packageCacheLookupByCmdAndArmory(alias.CommandName, armoryIndex.ArmoryConfig.PublicKey); cached != nil {
// A package with this name is in the cache, so we will remove it here so that the latest version is added
// when the index is parsed
pkgCache.Delete(cached.ID)
}
alias.ID = calculatePackageHash(alias)
}
for _, extension := range armoryIndex.Extensions {
extension.ArmoryName = armoryIndex.ArmoryConfig.Name
extension.ArmoryPK = armoryIndex.ArmoryConfig.PublicKey
if cached := packageCacheLookupByCmdAndArmory(extension.CommandName, armoryIndex.ArmoryConfig.PublicKey); cached != nil {
// A package with this name is in the cache, so we will remove it here so that the latest version is added
// when the index is parsed
pkgCache.Delete(cached.ID)
}
extension.ID = calculatePackageHash(extension)
}
return armoryIndex, nil
}
func decodePackageSignature(sigString string) ([]byte, error) {
// Base64 decode the signature
decodedData := make([]byte, base64.StdEncoding.DecodedLen(len(sigString)))
_, err := base64.StdEncoding.Decode(decodedData, []byte(sigString))
if err != nil {
return nil, err
}
// If decodedData does not end up being base64.StdEncoding.DecodedLen(len(data)) bytes long, trim the null bytes
decodedData = bytes.Trim(decodedData, "\x00")
return decodedData, nil
}
// DefaultArmoryPkgParser - Parse the armory package manifest directly from the url
func DefaultArmoryPkgParser(armoryConfig *assets.ArmoryConfig, armoryPkg *ArmoryPackage, sigOnly bool, clientConfig ArmoryHTTPConfig) (*minisign.Signature, []byte, error) {
var publicKey minisign.PublicKey
@@ -144,61 +175,39 @@ func DefaultArmoryPkgParser(armoryConfig *assets.ArmoryConfig, armoryPkg *Armory
return nil, nil, err
}
client := httpClient(clientConfig)
repoURL, err := url.Parse(armoryConfig.RepoURL)
if err != nil {
return nil, nil, err
}
req := &http.Request{
Method: http.MethodGet,
URL: repoURL,
Header: map[string][]string{},
}
if armoryConfig.Authorization != "" {
req.Header.Set("Authorization", armoryConfig.Authorization)
}
resp, err := client.Do(req)
if err != nil {
return nil, nil, err
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
resp, body, err := httpRequest(clientConfig, armoryPkg.RepoURL, armoryConfig, http.Header{})
if err != nil {
return nil, nil, err
}
if resp.StatusCode != http.StatusOK {
return nil, nil, errors.New("api returned non-200 status code")
return nil, nil, fmt.Errorf("api returned non-200 status code (%d)", resp.StatusCode)
}
pkgResp := &armoryPkgResponse{}
err = json.Unmarshal(body, pkgResp)
if err != nil {
return nil, nil, err
}
sig, err := parsePkgMinsig([]byte(pkgResp.Minisig))
decodedSig, err := decodePackageSignature(pkgResp.Minisig)
if err != nil {
return nil, nil, err
}
sig, err := parsePkgMinsig(decodedSig)
if err != nil {
return nil, nil, err
}
var tarGz []byte
if !sigOnly {
tarGzURL, err := url.Parse(armoryPkg.RepoURL)
tarGzURL, err := url.Parse(pkgResp.TarGzURL)
if err != nil {
return nil, nil, err
}
if tarGzURL.Scheme != "https" && tarGzURL.Scheme != "http" {
return nil, nil, errors.New("invalid url scheme")
}
resp, err := client.Get(tarGzURL.String())
tarGz, err = downloadRequest(clientConfig, tarGzURL.String(), armoryConfig)
if err != nil {
return nil, nil, err
}
defer resp.Body.Close()
tarGz, err = ioutil.ReadAll(resp.Body)
if err != nil {
return nil, nil, err
}
if resp.StatusCode != http.StatusOK {
return nil, nil, errors.New("api returned non-200 status code")
}
}
return sig, tarGz, nil
}
@@ -239,13 +248,7 @@ func GithubAPIArmoryIndexParser(armoryConfig *assets.ArmoryConfig, clientConfig
return nil, err
}
client := httpClient(clientConfig)
resp, err := client.Get(armoryConfig.RepoURL)
if err != nil {
return nil, err
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
resp, body, err := httpRequest(clientConfig, armoryConfig.RepoURL, armoryConfig, http.Header{})
if err != nil {
return nil, err
}
@@ -253,7 +256,7 @@ func GithubAPIArmoryIndexParser(armoryConfig *assets.ArmoryConfig, clientConfig
if resp.StatusCode == http.StatusForbidden {
return nil, errors.New("you hit the github api rate limit (60 req/hr), try later")
}
return nil, errors.New("api returned non-200 status code")
return nil, fmt.Errorf("api returned non-200 status code: %d", resp.StatusCode)
}
releases := []GithubRelease{}
@@ -270,23 +273,13 @@ func GithubAPIArmoryIndexParser(armoryConfig *assets.ArmoryConfig, clientConfig
var sigData []byte
for _, asset := range release.Assets {
if asset.Name == armoryIndexFileName {
resp, err := client.Get(asset.BrowserDownloadURL)
if err != nil {
return nil, err
}
defer resp.Body.Close()
armoryIndexData, err = ioutil.ReadAll(resp.Body)
armoryIndexData, err = downloadRequest(clientConfig, asset.URL, armoryConfig)
if err != nil {
return nil, err
}
}
if asset.Name == armoryIndexSigFileName {
resp, err := client.Get(asset.BrowserDownloadURL)
if err != nil {
return nil, err
}
defer resp.Body.Close()
sigData, err = ioutil.ReadAll(resp.Body)
sigData, err = downloadRequest(clientConfig, asset.URL, armoryConfig)
if err != nil {
return nil, err
}
@@ -299,29 +292,39 @@ func GithubAPIArmoryIndexParser(armoryConfig *assets.ArmoryConfig, clientConfig
return nil, errors.New("invalid signature")
}
armoryIndex := &ArmoryIndex{}
armoryIndex := &ArmoryIndex{
ArmoryConfig: armoryConfig,
}
err = json.Unmarshal(armoryIndexData, armoryIndex)
if err != nil {
return nil, err
}
// Populate armory name and ID information for assets
for _, bundle := range armoryIndex.Bundles {
bundle.ArmoryName = armoryIndex.ArmoryConfig.Name
}
for _, alias := range armoryIndex.Aliases {
alias.ArmoryName = armoryIndex.ArmoryConfig.Name
alias.ArmoryPK = armoryIndex.ArmoryConfig.PublicKey
alias.ID = calculatePackageHash(alias)
}
for _, extension := range armoryIndex.Extensions {
extension.ArmoryName = armoryIndex.ArmoryConfig.Name
extension.ArmoryPK = armoryIndex.ArmoryConfig.PublicKey
extension.ID = calculatePackageHash(extension)
}
return armoryIndex, nil
}
// GithubAPIArmoryPackageParser - Retrieve the minisig and tar.gz for an armory package from a GitHub release
func GithubAPIArmoryPackageParser(armoryPkg *ArmoryPackage, sigOnly bool, clientConfig ArmoryHTTPConfig) (*minisign.Signature, []byte, error) {
func GithubAPIArmoryPackageParser(armoryConfig *assets.ArmoryConfig, armoryPkg *ArmoryPackage, sigOnly bool, clientConfig ArmoryHTTPConfig) (*minisign.Signature, []byte, error) {
var publicKey minisign.PublicKey
err := publicKey.UnmarshalText([]byte(armoryPkg.PublicKey))
if err != nil {
return nil, nil, err
}
client := httpClient(clientConfig)
resp, err := client.Get(armoryPkg.RepoURL)
if err != nil {
return nil, nil, err
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
resp, body, err := httpRequest(clientConfig, armoryPkg.RepoURL, armoryConfig, http.Header{})
if err != nil {
return nil, nil, err
}
@@ -329,7 +332,7 @@ func GithubAPIArmoryPackageParser(armoryPkg *ArmoryPackage, sigOnly bool, client
if resp.StatusCode == http.StatusForbidden {
return nil, nil, errors.New("you hit the github api rate limit (60 req/hr), try later")
}
return nil, nil, errors.New("api returned non-200 status code")
return nil, nil, fmt.Errorf("api returned non-200 status code: %d", resp.StatusCode)
}
releases := []GithubRelease{}
@@ -343,14 +346,7 @@ func GithubAPIArmoryPackageParser(armoryPkg *ArmoryPackage, sigOnly bool, client
var tarGz []byte
for _, asset := range release.Assets {
if asset.Name == fmt.Sprintf("%s.minisig", armoryPkg.CommandName) {
var resp *http.Response
resp, err = client.Get(asset.BrowserDownloadURL)
if err != nil {
break
}
defer resp.Body.Close()
var body []byte
body, err = ioutil.ReadAll(resp.Body)
body, err := downloadRequest(clientConfig, asset.URL, armoryConfig)
if err != nil {
break
}
@@ -360,13 +356,7 @@ func GithubAPIArmoryPackageParser(armoryPkg *ArmoryPackage, sigOnly bool, client
}
}
if asset.Name == fmt.Sprintf("%s.tar.gz", armoryPkg.CommandName) && !sigOnly {
var resp *http.Response
resp, err = client.Get(asset.BrowserDownloadURL)
if err != nil {
break
}
defer resp.Body.Close()
tarGz, err = ioutil.ReadAll(resp.Body)
tarGz, err = downloadRequest(clientConfig, asset.URL, armoryConfig)
if err != nil {
break
}
@@ -380,31 +370,27 @@ func GithubAPIArmoryPackageParser(armoryPkg *ArmoryPackage, sigOnly bool, client
//
// GithubArmoryPackageParser - Uses github.com instead of api.github.com to download packages
func GithubArmoryPackageParser(armoryPkg *ArmoryPackage, sigOnly bool, clientConfig ArmoryHTTPConfig) (*minisign.Signature, []byte, error) {
func GithubArmoryPackageParser(_ *assets.ArmoryConfig, armoryPkg *ArmoryPackage, sigOnly bool, clientConfig ArmoryHTTPConfig) (*minisign.Signature, []byte, error) {
latestTag, err := githubLatestTagParser(armoryPkg, clientConfig)
if err != nil {
return nil, nil, err
}
client := httpClient(clientConfig)
sigURL, err := url.Parse(armoryPkg.RepoURL)
if err != nil {
return nil, nil, fmt.Errorf("failed to parse armory pkg url '%s': %s", armoryPkg.RepoURL, err)
}
sigURL.Path = path.Join(sigURL.Path, "releases", "download", latestTag, fmt.Sprintf("%s.minisig", armoryPkg.CommandName))
sigResp, err := client.Get(sigURL.String())
// Setup dummy auth here as the non-api endpoints don't support the Authorization header
noAuth := &assets.ArmoryConfig{
Authorization: "",
}
body, err := downloadRequest(clientConfig, sigURL.String(), noAuth)
if err != nil {
return nil, nil, err
}
defer sigResp.Body.Close()
if sigResp.StatusCode != http.StatusOK {
return nil, nil, fmt.Errorf("failed to get signature for armory pkg '%s': %s", armoryPkg.RepoURL, sigResp.Status)
}
var body []byte
body, err = ioutil.ReadAll(sigResp.Body)
if err != nil {
return nil, nil, fmt.Errorf("failed to read resp body '%s': %s", armoryPkg.RepoURL, err)
}
sig, err := parsePkgMinsig(body)
if err != nil {
return nil, nil, fmt.Errorf("failed to parse pkg sig '%s': %s", armoryPkg.RepoURL, err)
@@ -417,18 +403,10 @@ func GithubArmoryPackageParser(armoryPkg *ArmoryPackage, sigOnly bool, clientCon
return nil, nil, fmt.Errorf("failed to parse armory pkg url '%s': %s", armoryPkg.RepoURL, err)
}
tarGzURL.Path = path.Join(tarGzURL.Path, "releases", "download", latestTag, fmt.Sprintf("%s.tar.gz", armoryPkg.CommandName))
tarGzResp, err := client.Get(tarGzURL.String())
tarGz, err = downloadRequest(clientConfig, tarGzURL.String(), noAuth)
if err != nil {
return nil, nil, err
}
defer tarGzResp.Body.Close()
if tarGzResp.StatusCode != http.StatusOK {
return nil, nil, fmt.Errorf("failed to get tar.gz for armory pkg '%s': %s", armoryPkg.RepoURL, tarGzResp.Status)
}
tarGz, err = ioutil.ReadAll(tarGzResp.Body)
if err != nil {
return nil, nil, fmt.Errorf("failed to read tar.gz body '%s': %s", armoryPkg.RepoURL, err)
}
}
return sig, tarGz, nil
@@ -498,3 +476,46 @@ func httpClient(config ArmoryHTTPConfig) *http.Client {
},
}
}
func httpRequest(clientConfig ArmoryHTTPConfig, reqURL string, armoryConfig *assets.ArmoryConfig, extraHeaders http.Header) (*http.Response, []byte, error) {
client := httpClient(clientConfig)
req, err := http.NewRequest(http.MethodGet, reqURL, http.NoBody)
if err != nil {
return nil, nil, err
}
if len(extraHeaders) > 0 {
for key := range extraHeaders {
req.Header.Add(key, strings.Join(extraHeaders[key], ","))
}
}
if armoryConfig.Authorization != "" {
req.Header.Set("Authorization", armoryConfig.Authorization)
}
resp, err := client.Do(req)
if err != nil {
return nil, nil, err
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
return resp, body, err
}
func downloadRequest(clientConfig ArmoryHTTPConfig, reqURL string, armoryConfig *assets.ArmoryConfig) ([]byte, error) {
downloadHdr := http.Header{
"Accept": {"application/octet-stream"},
}
resp, body, err := httpRequest(clientConfig, reqURL, armoryConfig, downloadHdr)
if err != nil {
return nil, err
}
if resp == nil {
return nil, fmt.Errorf("invalid response when downloading %s, try again later", reqURL)
}
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusFound {
return nil, fmt.Errorf("error downloading asset: http %d", resp.StatusCode)
}
return body, err
}
+13 -8
View File
@@ -21,19 +21,22 @@ package armory
import (
"regexp"
"github.com/spf13/cobra"
"github.com/bishopfox/sliver/client/command/alias"
"github.com/bishopfox/sliver/client/command/extensions"
"github.com/bishopfox/sliver/client/console"
"github.com/desertbit/grumble"
)
// ArmorySearchCmd - Search for packages by name
func ArmorySearchCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
func ArmorySearchCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
con.PrintInfof("Refreshing package cache ... ")
clientConfig := parseArmoryHTTPConfig(ctx)
clientConfig := parseArmoryHTTPConfig(cmd)
refresh(clientConfig)
con.Printf(console.Clearln + "\r")
rawNameExpr := ctx.Args.String("name")
rawNameExpr := args[0]
// rawNameExpr := ctx.Args.String("name")
if rawNameExpr == "" {
con.PrintErrorf("Please specify a search term!\n")
return
@@ -44,7 +47,7 @@ func ArmorySearchCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
return
}
aliases, exts := packagesInCache()
aliases, exts := packageManifestsInCache()
matchedAliases := []*alias.AliasManifest{}
for _, a := range aliases {
if nameExpr.MatchString(a.CommandName) {
@@ -52,9 +55,11 @@ func ArmorySearchCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
}
}
matchedExts := []*extensions.ExtensionManifest{}
for _, ext := range exts {
if nameExpr.MatchString(ext.CommandName) {
matchedExts = append(matchedExts, ext)
for _, extm := range exts {
for _, ext := range extm.ExtCommand {
if nameExpr.MatchString(ext.CommandName) {
matchedExts = append(matchedExts, extm)
}
}
}
if len(matchedAliases) == 0 && len(matchedExts) == 0 {
+265 -42
View File
@@ -19,57 +19,131 @@ package armory
*/
import (
"io/ioutil"
"strings"
"errors"
"fmt"
"os"
"sort"
"github.com/jedib0t/go-pretty/v6/table"
"github.com/spf13/cobra"
"github.com/bishopfox/sliver/client/assets"
"github.com/bishopfox/sliver/client/command/alias"
"github.com/bishopfox/sliver/client/command/extensions"
"github.com/bishopfox/sliver/client/command/settings"
"github.com/bishopfox/sliver/client/console"
"github.com/desertbit/grumble"
"github.com/bishopfox/sliver/client/forms"
"github.com/bishopfox/sliver/util"
)
type VersionInformation struct {
OldVersion string
NewVersion string
ArmoryName string
}
type PackageType uint
const (
AliasPackage PackageType = iota
ExtensionPackage
)
type UpdateIdentifier struct {
Type PackageType
Name string
}
// ArmoryUpdateCmd - Update all installed extensions/aliases
func ArmoryUpdateCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
func ArmoryUpdateCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
var selectedUpdates []UpdateIdentifier
var err error
con.PrintInfof("Refreshing package cache ... ")
clientConfig := parseArmoryHTTPConfig(ctx)
clientConfig := parseArmoryHTTPConfig(cmd)
refresh(clientConfig)
con.Printf(console.Clearln + "\r")
// Aliases
aliasUpdates := checkForAliasUpdates(clientConfig, con)
if 0 < len(aliasUpdates) {
con.PrintInfof("%d alias(es) out of date: %s\n", len(aliasUpdates), strings.Join(aliasUpdates, ", "))
for _, aliasName := range aliasUpdates {
err := installAliasPackageByName(aliasName, clientConfig, con)
if err != nil {
con.PrintErrorf("Failed to update %s: %s\n", aliasName, err)
}
}
} else {
con.PrintInfof("All aliases up to date!\n")
armoryName, err := cmd.Flags().GetString("armory")
if err != nil {
con.PrintErrorf("Could not parse %q flag: %s\n", "armory", err)
return
}
// Extensions
extUpdates := checkForExtensionUpdates(clientConfig, con)
if 0 < len(extUpdates) {
con.PrintInfof("%d extension(s) out of date: %s\n", len(extUpdates), strings.Join(extUpdates, ", "))
for _, extName := range extUpdates {
err := installExtensionPackageByName(extName, clientConfig, con)
if err != nil {
con.PrintErrorf("Failed to update %s: %s\n", extName, err)
// Find PK for the armory name
armoryPK := getArmoryPublicKey(armoryName)
// If the armory with the name is not found, print a warning
if cmd.Flags().Changed("armory") && armoryPK == "" {
con.PrintWarnf("Could not find a configured armory named %q - searching all configured armories\n\n", armoryName)
}
// Check packages for updates
aliasUpdates := checkForAliasUpdates(armoryPK)
extUpdates := checkForExtensionUpdates(armoryPK)
// Display a table of results
if len(aliasUpdates) > 0 || len(extUpdates) > 0 {
updateKeys := sortUpdateIdentifiers(aliasUpdates, extUpdates)
displayAvailableUpdates(con, updateKeys, aliasUpdates, extUpdates)
selectedUpdates, err = getUpdatesFromUser(updateKeys)
if err != nil {
if errors.Is(err, forms.ErrUserAborted) {
return
}
con.PrintErrorf("%s\n", err.Error())
return
}
if len(selectedUpdates) == 0 {
return
}
} else {
con.PrintInfof("All extensions up to date!\n")
con.PrintSuccessf("All packages are up to date\n")
return
}
for _, update := range selectedUpdates {
switch update.Type {
case AliasPackage:
aliasVersionInfo, ok := aliasUpdates[update.Name]
if !ok {
continue
}
updatedPackage, err := getPackageForCommand(update.Name, armoryPK, aliasVersionInfo.NewVersion)
if err != nil {
con.PrintErrorf("Could not get update package for alias %s: %s\n", update.Name, err)
// Keep going because other packages might not encounter errors
continue
}
err = installAliasPackage(updatedPackage, false, clientConfig, con)
if err != nil {
con.PrintErrorf("Failed to update %s: %s\n", update.Name, err)
}
case ExtensionPackage:
extVersionInfo, ok := extUpdates[update.Name]
if !ok {
continue
}
updatedPackage, err := getPackageForCommand(update.Name, armoryPK, extVersionInfo.NewVersion)
if err != nil {
con.PrintErrorf("Could not get update package for extension %s: %s\n", update.Name, err)
continue
}
err = installExtensionPackage(updatedPackage, false, clientConfig, con)
if err != nil {
con.PrintErrorf("Failed to update %s: %s\n", update.Name, err)
}
default:
continue
}
}
}
func checkForAliasUpdates(clientConfig ArmoryHTTPConfig, con *console.SliverConsoleClient) []string {
cachedAliases, _ := packagesInCache()
results := []string{}
func checkForAliasUpdates(armoryPK string) map[string]VersionInformation {
cachedAliases, _ := packageManifestsInCache()
results := make(map[string]VersionInformation)
for _, aliasManifestPath := range assets.GetInstalledAliasManifests() {
data, err := ioutil.ReadFile(aliasManifestPath)
data, err := os.ReadFile(aliasManifestPath)
if err != nil {
continue
}
@@ -78,21 +152,33 @@ func checkForAliasUpdates(clientConfig ArmoryHTTPConfig, con *console.SliverCons
continue
}
for _, latestAlias := range cachedAliases {
// Right now we don't try to enforce any kind of versioning, it is assumed if the version from
// the armory differs at all from the local version, the extension is out of date.
if latestAlias.CommandName == localManifest.CommandName && latestAlias.Version != localManifest.Version {
results = append(results, localManifest.CommandName)
/*
We used to check if the version identifiers were different between the installed version and the
version in the armory. This worked when we had one armory, but with multiple potential armories,
we have to have some type of versioning. We do not have an official versioning scheme for packages,
so we will rely on the author of the package incrementing the version identifier somehow to determine
if a package is newer.
*/
if latestAlias.CommandName == localManifest.CommandName && latestAlias.Version > localManifest.Version {
if latestAlias.ArmoryPK == armoryPK || armoryPK == "" {
results[localManifest.CommandName] = VersionInformation{
OldVersion: localManifest.Version,
NewVersion: latestAlias.Version,
ArmoryName: latestAlias.ArmoryName,
}
}
}
}
}
return results
}
func checkForExtensionUpdates(clientConfig ArmoryHTTPConfig, con *console.SliverConsoleClient) []string {
_, cachedExtensions := packagesInCache()
results := []string{}
func checkForExtensionUpdates(armoryPK string) map[string]VersionInformation {
_, cachedExtensions := packageManifestsInCache()
// Return a map of extension name to minimum version to install
results := make(map[string]VersionInformation)
for _, extManifestPath := range assets.GetInstalledExtensionManifests() {
data, err := ioutil.ReadFile(extManifestPath)
data, err := os.ReadFile(extManifestPath)
if err != nil {
continue
}
@@ -101,12 +187,149 @@ func checkForExtensionUpdates(clientConfig ArmoryHTTPConfig, con *console.Sliver
continue
}
for _, latestExt := range cachedExtensions {
// Right now we don't try to enforce any kind of versioning, it is assumed if the version from
// the armory differs at all from the local version, the extension is out of date.
if latestExt.CommandName == localManifest.CommandName && latestExt.Version != localManifest.Version {
results = append(results, localManifest.CommandName)
/*
We used to check if the version identifiers were different between the installed version and the
version in the armory. This worked when we had one armory, but with multiple potential armories,
we have to have some type of versioning. We do not have an official versioning scheme for packages,
so we will rely on the author of the package incrementing the version identifier somehow to determine
if a package is newer.
*/
if latestExt.Name == localManifest.Name && latestExt.Version > localManifest.Version {
if latestExt.ArmoryPK == armoryPK || armoryPK == "" {
results[localManifest.Name] = VersionInformation{
OldVersion: localManifest.Version,
NewVersion: latestExt.Version,
ArmoryName: latestExt.ArmoryName,
}
}
}
}
}
return results
}
func sortUpdateIdentifiers(aliasUpdates, extensionUpdates map[string]VersionInformation) []UpdateIdentifier {
/*
This function helps us keep updates straight when the user chooses from them. Just in case
an alias and an extension exist with the same name, we cannot simply combine the two maps.
We will assume that no two aliases and no two extensions have the same name.
*/
result := []UpdateIdentifier{}
aliasNames := util.Keys(aliasUpdates)
extensionNames := util.Keys(extensionUpdates)
for _, name := range aliasNames {
result = append(result, UpdateIdentifier{
Type: AliasPackage,
Name: name,
})
}
for _, name := range extensionNames {
result = append(result, UpdateIdentifier{
Type: ExtensionPackage,
Name: name,
})
}
sort.Slice(result, func(i, j int) bool {
return result[i].Name < result[j].Name
})
return result
}
func displayAvailableUpdates(con *console.SliverClient, updateKeys []UpdateIdentifier, aliasUpdates, extensionUpdates map[string]VersionInformation) {
var (
aliasSuffix string
extensionSuffix string
title string = "Available Updates (%d alias%s, %d extension%s)"
)
tw := table.NewWriter()
tw.SetAutoIndex(true)
tw.SetStyle(settings.GetTableStyle(con))
if len(aliasUpdates) != 1 {
aliasSuffix = "es"
}
if len(extensionUpdates) != 1 {
extensionSuffix = "s"
}
tw.SetTitle(console.StyleBold.Render(fmt.Sprintf(title, len(aliasUpdates), aliasSuffix, len(extensionUpdates), extensionSuffix)))
tw.AppendHeader(table.Row{
"Package Name",
"Package Type",
"Installed Version",
"Available Version",
})
for _, key := range updateKeys {
var (
packageName string
packageType string
packageVersion VersionInformation
ok bool
)
switch key.Type {
case AliasPackage:
packageVersion, ok = aliasUpdates[key.Name]
if !ok {
continue
}
packageName = key.Name
packageType = "Alias"
case ExtensionPackage:
packageVersion, ok = extensionUpdates[key.Name]
if !ok {
continue
}
packageName = key.Name
packageType = "Extension"
default:
continue
}
tw.AppendRow(table.Row{
packageName,
packageType,
packageVersion.OldVersion,
fmt.Sprintf("%s (Armory: %s)", packageVersion.NewVersion, packageVersion.ArmoryName),
})
}
con.Printf("%s\n\n", tw.Render())
}
func getUpdatesFromUser(updateKeys []UpdateIdentifier) ([]UpdateIdentifier, error) {
options := make([]forms.ArmoryUpdateOption, 0, len(updateKeys))
optionIndex := make(map[string]UpdateIdentifier, len(updateKeys))
for _, key := range updateKeys {
packageType := "Alias"
if key.Type == ExtensionPackage {
packageType = "Extension"
}
optionID := fmt.Sprintf("%d:%s", key.Type, key.Name)
optionLabel := fmt.Sprintf("%s (%s)", key.Name, packageType)
options = append(options, forms.ArmoryUpdateOption{
ID: optionID,
Label: optionLabel,
})
optionIndex[optionID] = key
}
result, err := forms.ArmoryUpdateForm(options)
if err != nil {
return nil, err
}
chosenUpdates := make([]UpdateIdentifier, 0, len(result.SelectedIDs))
for _, selectedID := range result.SelectedIDs {
if update, ok := optionIndex[selectedID]; ok {
chosenUpdates = append(chosenUpdates, update)
}
}
return chosenUpdates, nil
}
+9 -3
View File
@@ -1,4 +1,10 @@
Backdoor
========
# client/command/backdoor
Implements command related to `backdoor`
## Overview
Implements the 'backdoor' command group for the Sliver client console.
## Go Files
- `backdoor.go` – Implements the RPC workflow that backdoors a remote binary with Sliver shellcode for the active session.
- `commands.go` – Registers the Cobra command, binds flags/completions, and restricts usage to applicable targets.
+11 -9
View File
@@ -19,36 +19,38 @@ package backdoor
*/
import (
"context"
"fmt"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/protobuf/sliverpb"
"github.com/desertbit/grumble"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/spf13/cobra"
)
// BackdoorCmd - Command to inject implant code into an existing binary
func BackdoorCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
// BackdoorCmd - Command to inject implant code into an existing binary.
func BackdoorCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
session := con.ActiveTarget.GetSessionInteractive()
if session == nil {
return
}
remoteFilePath := ctx.Args.String("remote-file")
remoteFilePath := args[0]
if remoteFilePath == "" {
con.PrintErrorf("Please provide a remote file path. See `help backdoor` for more info")
return
}
profileName := ctx.Flags.String("profile")
profileName, _ := cmd.Flags().GetString("profile")
grpcCtx, cancel := con.GrpcContext(cmd)
defer cancel()
ctrl := make(chan bool)
msg := fmt.Sprintf("Backdooring %s ...", remoteFilePath)
con.SpinUntil(msg, ctrl)
backdoor, err := con.Rpc.Backdoor(context.Background(), &sliverpb.BackdoorReq{
backdoor, err := con.Rpc.Backdoor(grpcCtx, &clientpb.BackdoorReq{
FilePath: remoteFilePath,
ProfileName: profileName,
Request: con.ActiveTarget.Request(ctx),
Request: con.ActiveTarget.Request(cmd),
})
ctrl <- true
<-ctrl
+38
View File
@@ -0,0 +1,38 @@
package backdoor
import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/bishopfox/sliver/client/command/flags"
"github.com/bishopfox/sliver/client/command/generate"
"github.com/bishopfox/sliver/client/command/help"
"github.com/bishopfox/sliver/client/console"
consts "github.com/bishopfox/sliver/client/constants"
)
// Commands returns the “ command and its subcommands.
func Commands(con *console.SliverClient) []*cobra.Command {
backdoorCmd := &cobra.Command{
Use: consts.BackdoorStr,
Short: "Infect a remote file with a sliver shellcode",
Long: help.GetHelpFor([]string{consts.BackdoorStr}),
Args: cobra.ExactArgs(1),
GroupID: consts.ExecutionHelpGroup,
Annotations: flags.RestrictTargets(consts.WindowsCmdsFilter),
Run: func(cmd *cobra.Command, args []string) {
BackdoorCmd(cmd, con, args)
},
}
flags.Bind("", false, backdoorCmd, func(f *pflag.FlagSet) {
f.StringP("profile", "p", "", "profile to use for service binary")
f.Int64P("timeout", "t", flags.DefaultTimeout, "grpc timeout in seconds")
})
flags.BindFlagCompletions(backdoorCmd, func(comp *carapace.ActionMap) {
(*comp)["profile"] = generate.ProfileNameCompleter(con)
})
carapace.Gen(backdoorCmd).PositionalCompletion(carapace.ActionValues().Usage("path to the remote file to backdoor"))
return []*cobra.Command{backdoorCmd}
}
+13 -3
View File
@@ -1,4 +1,14 @@
Beacons
========
# client/command/beacons
This package implements the beacons command, which can be used to list and interact with beacons.
## Overview
Implements the 'beacons' command group for the Sliver client console. Handlers map Cobra invocations to beacons workflows such as prune, RM, and watch.
## Go Files
- `beacons.go` – Retrieves beacon inventories and renders them in tabular form with optional filtering.
- `commands.go` – Declares the beacons command set, binds flags/completions, and wires subcommands like prune, rm, and watch.
- `helpers.go` – Provides helper RPC wrappers for selecting, fetching, and listing beacons.
- `prune.go` – Implements the prune routine that removes stale beacon entries via the backend API.
- `rm.go` – Removes a specific beacon by ID, coordinating confirmation and RPC teardown.
- `watch.go` – Streams beacon events in a watch loop, handling cancellation and console interaction.
+98 -45
View File
@@ -19,26 +19,27 @@ package beacons
*/
import (
"context"
"fmt"
"regexp"
"strings"
"time"
"github.com/jedib0t/go-pretty/v6/table"
"github.com/spf13/cobra"
"golang.org/x/term"
"github.com/bishopfox/sliver/client/command/kill"
"github.com/bishopfox/sliver/client/command/settings"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/bishopfox/sliver/protobuf/commonpb"
"github.com/desertbit/grumble"
"github.com/jedib0t/go-pretty/v6/table"
"golang.org/x/term"
)
// BeaconsCmd - Display/interact with beacons
func BeaconsCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
killFlag := ctx.Flags.String("kill")
killAll := ctx.Flags.Bool("kill-all")
func BeaconsCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
killFlag, _ := cmd.Flags().GetString("kill")
killAll, _ := cmd.Flags().GetBool("kill-all")
interact, _ := cmd.Flags().GetString("interact")
// Handle kill
if killFlag != "" {
@@ -47,7 +48,7 @@ func BeaconsCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
con.PrintErrorf("%s\n", err)
return
}
err = kill.KillBeacon(beacon, ctx, con)
err = kill.KillBeacon(beacon, cmd, con)
if err != nil {
con.PrintErrorf("%s\n", err)
return
@@ -63,7 +64,7 @@ func BeaconsCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
return
}
for _, beacon := range beacons.Beacons {
err = kill.KillBeacon(beacon, ctx, con)
err = kill.KillBeacon(beacon, cmd, con)
if err != nil {
con.PrintErrorf("%s\n", err)
return
@@ -72,18 +73,32 @@ func BeaconsCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
con.PrintInfof("Killed %s (%s)\n", beacon.Name, beacon.ID)
}
}
filter := ctx.Flags.String("filter")
if interact != "" {
beacon, err := GetBeacon(con, interact)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
con.ActiveTarget.Set(nil, beacon)
con.PrintInfof("Active beacon %s (%s)\n", beacon.Name, strings.Split(beacon.ID, "-")[0])
return
}
filter, _ := cmd.Flags().GetString("filter")
var filterRegex *regexp.Regexp
if ctx.Flags.String("filter-re") != "" {
if filterRe, _ := cmd.Flags().GetString("filter-re"); filterRe != "" {
var err error
filterRegex, err = regexp.Compile(ctx.Flags.String("filter-re"))
filterRegex, err = regexp.Compile(filterRe)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
}
beacons, err := con.Rpc.GetBeacons(context.Background(), &commonpb.Empty{})
grpcCtx, cancel := con.GrpcContext(cmd)
defer cancel()
beacons, err := con.Rpc.GetBeacons(grpcCtx, &commonpb.Empty{})
if err != nil {
con.PrintErrorf("%s\n", err)
return
@@ -92,7 +107,7 @@ func BeaconsCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
}
// PrintBeacons - Display a list of beacons
func PrintBeacons(beacons []*clientpb.Beacon, filter string, filterRegex *regexp.Regexp, con *console.SliverConsoleClient) {
func PrintBeacons(beacons []*clientpb.Beacon, filter string, filterRegex *regexp.Regexp, con *console.SliverClient) {
if len(beacons) == 0 {
con.PrintInfof("No beacons 🙁\n")
return
@@ -101,7 +116,7 @@ func PrintBeacons(beacons []*clientpb.Beacon, filter string, filterRegex *regexp
con.Printf("%s\n", tw.Render())
}
func renderBeacons(beacons []*clientpb.Beacon, filter string, filterRegex *regexp.Regexp, con *console.SliverConsoleClient) table.Writer {
func renderBeacons(beacons []*clientpb.Beacon, filter string, filterRegex *regexp.Regexp, con *console.SliverClient) table.Writer {
width, _, err := term.GetSize(0)
if err != nil {
width = 999
@@ -110,25 +125,51 @@ func renderBeacons(beacons []*clientpb.Beacon, filter string, filterRegex *regex
tw := table.NewWriter()
tw.SetStyle(settings.GetTableStyle(con))
wideTermWidth := con.Settings.SmallTermWidth < width
windowsBeaconInList := false
for _, beacon := range beacons {
if beacon.OS == "windows" {
windowsBeaconInList = true
}
}
if wideTermWidth {
tw.AppendHeader(table.Row{
"ID",
"Name",
"Tasks",
"Transport",
"Remote Address",
"Hostname",
"Username",
"Operating System",
"Locale",
"Last Check-in",
"Next Check-in",
})
if windowsBeaconInList {
tw.AppendHeader(table.Row{
"ID",
"Name",
"Tasks",
"Transport",
"Remote Address",
"Hostname",
"Username",
"Process (PID)",
"Integrity",
"Operating System",
"Locale",
"Last Check-in",
"Next Check-in",
})
} else {
tw.AppendHeader(table.Row{
"ID",
"Name",
"Tasks",
"Transport",
"Remote Address",
"Hostname",
"Username",
"Process (PID)",
"Operating System",
"Locale",
"Last Check-in",
"Next Check-in",
})
}
} else {
tw.AppendHeader(table.Row{
"ID",
"Name",
"Transport",
"Hostname",
"Username",
"Operating System",
"Last Check-in",
@@ -137,10 +178,13 @@ func renderBeacons(beacons []*clientpb.Beacon, filter string, filterRegex *regex
}
for _, beacon := range beacons {
color := console.Normal
style := console.StyleNormal
activeBeacon := con.ActiveTarget.GetBeacon()
if activeBeacon != nil && activeBeacon.ID == beacon.ID {
color = console.Green
style = console.StyleGreen
}
if beacon.Integrity == "" {
beacon.Integrity = "-"
}
// We need a slice of strings so we can apply filters
@@ -148,25 +192,34 @@ func renderBeacons(beacons []*clientpb.Beacon, filter string, filterRegex *regex
if wideTermWidth {
rowEntries = []string{
fmt.Sprintf(color+"%s"+console.Normal, strings.Split(beacon.ID, "-")[0]),
fmt.Sprintf(color+"%s"+console.Normal, beacon.Name),
fmt.Sprintf(color+"%d/%d"+console.Normal, beacon.TasksCountCompleted, beacon.TasksCount),
fmt.Sprintf(color+"%s"+console.Normal, beacon.Transport),
fmt.Sprintf(color+"%s"+console.Normal, beacon.RemoteAddress),
fmt.Sprintf(color+"%s"+console.Normal, beacon.Hostname),
fmt.Sprintf(color+"%s"+console.Normal, strings.TrimPrefix(beacon.Username, beacon.Hostname+"\\")),
fmt.Sprintf(color+"%s/%s"+console.Normal, beacon.OS, beacon.Arch),
fmt.Sprintf(color+"%s"+console.Normal, beacon.Locale),
style.Render(strings.Split(beacon.ID, "-")[0]),
style.Render(beacon.Name),
style.Render(fmt.Sprintf("%d/%d", beacon.TasksCountCompleted, beacon.TasksCount)),
style.Render(beacon.Transport),
style.Render(beacon.RemoteAddress),
style.Render(beacon.Hostname),
style.Render(strings.TrimPrefix(beacon.Username, beacon.Hostname+"\\")),
style.Render(fmt.Sprintf("%s (%d)", beacon.Filename, beacon.PID)),
}
if windowsBeaconInList {
rowEntries = append(rowEntries, style.Render(beacon.Integrity))
}
rowEntries = append(rowEntries, []string{
style.Render(fmt.Sprintf("%s/%s", beacon.OS, beacon.Arch)),
style.Render(beacon.Locale),
con.FormatDateDelta(time.Unix(beacon.LastCheckin, 0), wideTermWidth, false),
con.FormatDateDelta(time.Unix(beacon.NextCheckin, 0), wideTermWidth, true),
}
}...)
} else {
rowEntries = []string{
fmt.Sprintf(color+"%s"+console.Normal, strings.Split(beacon.ID, "-")[0]),
fmt.Sprintf(color+"%s"+console.Normal, beacon.Name),
fmt.Sprintf(color+"%s"+console.Normal, beacon.Transport),
fmt.Sprintf(color+"%s"+console.Normal, strings.TrimPrefix(beacon.Username, beacon.Hostname+"\\")),
fmt.Sprintf(color+"%s/%s"+console.Normal, beacon.OS, beacon.Arch),
style.Render(strings.Split(beacon.ID, "-")[0]),
style.Render(beacon.Name),
style.Render(beacon.Transport),
style.Render(beacon.Hostname),
style.Render(strings.TrimPrefix(beacon.Username, beacon.Hostname+"\\")),
style.Render(fmt.Sprintf("%s/%s", beacon.OS, beacon.Arch)),
con.FormatDateDelta(time.Unix(beacon.LastCheckin, 0), wideTermWidth, false),
con.FormatDateDelta(time.Unix(beacon.NextCheckin, 0), wideTermWidth, true),
}
+157
View File
@@ -0,0 +1,157 @@
package beacons
import (
"context"
"fmt"
"strings"
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/bishopfox/sliver/client/command/flags"
"github.com/bishopfox/sliver/client/command/help"
"github.com/bishopfox/sliver/client/console"
consts "github.com/bishopfox/sliver/client/constants"
"github.com/bishopfox/sliver/protobuf/commonpb"
)
// Commands returns the “ command and its subcommands.
func Commands(con *console.SliverClient) []*cobra.Command {
beaconsCmd := &cobra.Command{
Use: consts.BeaconsStr,
Short: "Manage beacons",
Long: help.GetHelpFor([]string{consts.BeaconsStr}),
GroupID: consts.SliverHelpGroup,
Run: func(cmd *cobra.Command, args []string) {
BeaconsCmd(cmd, con, args)
},
}
flags.Bind("beacons", true, beaconsCmd, func(f *pflag.FlagSet) {
f.Int64P("timeout", "t", flags.DefaultTimeout, "grpc timeout in seconds")
})
flags.Bind("beacons", false, beaconsCmd, func(f *pflag.FlagSet) {
f.StringP("kill", "k", "", "kill the designated beacon")
f.BoolP("kill-all", "K", false, "kill all beacons")
f.StringP("interact", "i", "", "interact with a beacon")
f.BoolP("force", "F", false, "force killing the beacon")
f.StringP("filter", "f", "", "filter beacons by substring")
f.StringP("filter-re", "e", "", "filter beacons by regular expression")
})
flags.BindFlagCompletions(beaconsCmd, func(comp *carapace.ActionMap) {
(*comp)["kill"] = BeaconIDCompleter(con)
(*comp)["interact"] = BeaconIDCompleter(con)
})
registerBeaconIDFlagCompletion(beaconsCmd, "interact", con)
beaconsRmCmd := &cobra.Command{
Use: consts.RmStr,
Short: "Remove a beacon",
Long: help.GetHelpFor([]string{consts.BeaconsStr, consts.RmStr}),
Run: func(cmd *cobra.Command, args []string) {
BeaconsRmCmd(cmd, con, args)
},
}
carapace.Gen(beaconsRmCmd).PositionalCompletion(BeaconIDCompleter(con))
beaconsCmd.AddCommand(beaconsRmCmd)
beaconsWatchCmd := &cobra.Command{
Use: consts.WatchStr,
Short: "Watch your beacons",
Long: help.GetHelpFor([]string{consts.BeaconsStr, consts.WatchStr}),
Run: func(cmd *cobra.Command, args []string) {
BeaconsWatchCmd(cmd, con, args)
},
}
beaconsCmd.AddCommand(beaconsWatchCmd)
beaconsPruneCmd := &cobra.Command{
Use: consts.PruneStr,
Short: "Prune stale beacons automatically",
Long: help.GetHelpFor([]string{consts.BeaconsStr, consts.PruneStr}),
Run: func(cmd *cobra.Command, args []string) {
BeaconsPruneCmd(cmd, con, args)
},
}
flags.Bind("beacons", false, beaconsPruneCmd, func(f *pflag.FlagSet) {
f.StringP("duration", "d", "1h", "duration to prune beacons that have missed their last checkin")
})
beaconsCmd.AddCommand(beaconsPruneCmd)
return []*cobra.Command{beaconsCmd}
}
// BeaconIDCompleter completes beacon IDs
func BeaconIDCompleter(con *console.SliverClient) carapace.Action {
callback := func(_ carapace.Context) carapace.Action {
return carapace.ActionValuesDescribed(beaconCompletionPairs(con)...).Tag("beacons")
}
return carapace.ActionCallback(callback)
}
func registerBeaconIDFlagCompletion(cmd *cobra.Command, name string, con *console.SliverClient) {
if cmd == nil {
return
}
if _, ok := cmd.GetFlagCompletionFunc(name); ok {
return
}
if cmd.Flags().Lookup(name) == nil && cmd.PersistentFlags().Lookup(name) == nil {
return
}
_ = cmd.RegisterFlagCompletionFunc(name, func(_ *cobra.Command, _ []string, toComplete string) ([]string, cobra.ShellCompDirective) {
values := describedValuesToTabs(beaconCompletionPairs(con))
return filterCompletionValues(values, toComplete), cobra.ShellCompDirectiveNoFileComp
})
}
func beaconCompletionPairs(con *console.SliverClient) []string {
results := make([]string, 0)
if con == nil || con.Rpc == nil {
return results
}
beacons, err := con.Rpc.GetBeacons(context.Background(), &commonpb.Empty{})
if err != nil {
return results
}
for _, b := range beacons.Beacons {
link := fmt.Sprintf("[%s <- %s]", b.ActiveC2, b.RemoteAddress)
id := fmt.Sprintf("%s (%d)", b.Name, b.PID)
userHost := fmt.Sprintf("%s@%s", b.Username, b.Hostname)
desc := strings.Join([]string{id, userHost, link}, " ")
results = append(results, b.ID[:8], desc)
}
return results
}
func describedValuesToTabs(values []string) []string {
tabbed := make([]string, 0, len(values)/2)
for i := 0; i+1 < len(values); i += 2 {
tabbed = append(tabbed, fmt.Sprintf("%s\t%s", values[i], values[i+1]))
}
return tabbed
}
func filterCompletionValues(values []string, prefix string) []string {
if prefix == "" {
return values
}
filtered := make([]string, 0, len(values))
for _, value := range values {
candidate := value
if tab := strings.IndexByte(value, '\t'); tab >= 0 {
candidate = value[:tab]
}
if strings.HasPrefix(candidate, prefix) {
filtered = append(filtered, value)
}
}
return filtered
}
+15 -14
View File
@@ -20,15 +20,14 @@ package beacons
import (
"bytes"
"context"
"errors"
"fmt"
"sort"
"strings"
"text/tabwriter"
"github.com/AlecAivazis/survey/v2"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/client/forms"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/bishopfox/sliver/protobuf/commonpb"
)
@@ -43,8 +42,10 @@ var (
)
// SelectBeacon - Interactive menu for the user to select an session, optionally only display live sessions
func SelectBeacon(con *console.SliverConsoleClient) (*clientpb.Beacon, error) {
beacons, err := con.Rpc.GetBeacons(context.Background(), &commonpb.Empty{})
func SelectBeacon(con *console.SliverClient) (*clientpb.Beacon, error) {
grpcCtx, cancel := con.GrpcContext(nil)
defer cancel()
beacons, err := con.Rpc.GetBeacons(grpcCtx, &commonpb.Empty{})
if err != nil {
return nil, err
}
@@ -81,12 +82,8 @@ func SelectBeacon(con *console.SliverConsoleClient) (*clientpb.Beacon, error) {
options := strings.Split(outputBuf.String(), "\n")
options = options[:len(options)-1] // Remove the last empty option
prompt := &survey.Select{
Message: "Select a beacon:",
Options: options,
}
selected := ""
survey.AskOne(prompt, &selected)
_ = forms.Select("Select a beacon:", options, &selected)
if selected == "" {
return nil, ErrNoSelection
}
@@ -100,8 +97,10 @@ func SelectBeacon(con *console.SliverConsoleClient) (*clientpb.Beacon, error) {
return nil, ErrNoSelection
}
func GetBeacon(con *console.SliverConsoleClient, beaconID string) (*clientpb.Beacon, error) {
beacons, err := con.Rpc.GetBeacons(context.Background(), &commonpb.Empty{})
func GetBeacon(con *console.SliverClient, beaconID string) (*clientpb.Beacon, error) {
grpcCtx, cancel := con.GrpcContext(nil)
defer cancel()
beacons, err := con.Rpc.GetBeacons(grpcCtx, &commonpb.Empty{})
if err != nil {
return nil, err
}
@@ -109,15 +108,17 @@ func GetBeacon(con *console.SliverConsoleClient, beaconID string) (*clientpb.Bea
return nil, ErrNoBeacons
}
for _, beacon := range beacons.Beacons {
if beacon.ID == beaconID {
if beacon.ID == beaconID || strings.HasPrefix(beacon.ID, beaconID) {
return beacon, nil
}
}
return nil, ErrBeaconNotFound
}
func GetBeacons(con *console.SliverConsoleClient) (*clientpb.Beacons, error) {
beacons, err := con.Rpc.GetBeacons(context.Background(), &commonpb.Empty{})
func GetBeacons(con *console.SliverClient) (*clientpb.Beacons, error) {
grpcCtx, cancel := con.GrpcContext(nil)
defer cancel()
beacons, err := con.Rpc.GetBeacons(grpcCtx, &commonpb.Empty{})
if err != nil {
return nil, err
}
+12 -10
View File
@@ -19,25 +19,28 @@ package beacons
*/
import (
"context"
"time"
"github.com/AlecAivazis/survey/v2"
"github.com/spf13/cobra"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/client/forms"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/bishopfox/sliver/protobuf/commonpb"
"github.com/desertbit/grumble"
)
// BeaconsPruneCmd - Prune stale beacons automatically
func BeaconsPruneCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
pruneDuration, err := time.ParseDuration(ctx.Flags.String("duration"))
func BeaconsPruneCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
duration, _ := cmd.Flags().GetString("duration")
pruneDuration, err := time.ParseDuration(duration)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
con.PrintInfof("Pruning beacons that missed their last checking by %s or more...\n\n", pruneDuration)
beacons, err := con.Rpc.GetBeacons(context.Background(), &commonpb.Empty{})
grpcCtx, cancel := con.GrpcContext(cmd)
defer cancel()
beacons, err := con.Rpc.GetBeacons(grpcCtx, &commonpb.Empty{})
if err != nil {
con.PrintErrorf("%s\n", err)
return
@@ -59,7 +62,7 @@ func BeaconsPruneCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
}
con.PrintWarnf("The following beacons and their tasks will be removed:\n")
for index, beacon := range pruneBeacons {
beacon, err := con.Rpc.GetBeacon(context.Background(), &clientpb.Beacon{ID: beacon.ID})
beacon, err := con.Rpc.GetBeacon(grpcCtx, &clientpb.Beacon{ID: beacon.ID})
if err != nil {
con.PrintErrorf("%s\n", err)
continue
@@ -68,14 +71,13 @@ func BeaconsPruneCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
}
con.Println()
confirm := false
prompt := &survey.Confirm{Message: "Prune these beacons?"}
survey.AskOne(prompt, &confirm)
_ = forms.Confirm("Prune these beacons?", &confirm)
if !confirm {
return
}
errCount := 0
for _, beacon := range pruneBeacons {
_, err := con.Rpc.RmBeacon(context.Background(), &clientpb.Beacon{ID: beacon.ID})
_, err := con.Rpc.RmBeacon(grpcCtx, &clientpb.Beacon{ID: beacon.ID})
if err != nil {
con.PrintErrorf("%s\n", err)
errCount++
+5 -4
View File
@@ -19,20 +19,21 @@ package beacons
*/
import (
"context"
"github.com/spf13/cobra"
"github.com/bishopfox/sliver/client/console"
"github.com/desertbit/grumble"
)
// BeaconsRmCmd - Display/interact with beacons
func BeaconsRmCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
func BeaconsRmCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
beacon, err := SelectBeacon(con)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
_, err = con.Rpc.RmBeacon(context.Background(), beacon)
grpcCtx, cancel := con.GrpcContext(cmd)
defer cancel()
_, err = con.Rpc.RmBeacon(grpcCtx, beacon)
if err != nil {
con.PrintErrorf("%s\n", err)
return
+4 -3
View File
@@ -24,13 +24,14 @@ import (
"strings"
"time"
"github.com/spf13/cobra"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/protobuf/commonpb"
"github.com/desertbit/grumble"
)
// BeaconsWatchCmd - Watch your beacons in real-ish time
func BeaconsWatchCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
func BeaconsWatchCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
done := waitForInput()
defer func() {
con.Printf(console.UpN+console.Clearln+"\r", 1)
@@ -57,7 +58,7 @@ func BeaconsWatchCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
}
func waitForInput() <-chan bool {
done := make(chan bool)
done := make(chan bool, 1)
go func() {
defer close(done)
fmt.Scanf("\n")
+10
View File
@@ -0,0 +1,10 @@
# client/command/builders
## Overview
Implements the 'builders' command group for the Sliver client console.
## Go Files
- `builders.go` – Fetches external builder metadata and formats it for console display.
- `commands.go` – Registers the builders CLI command with its flags and completion helpers.
+71
View File
@@ -0,0 +1,71 @@
package builders
/*
Sliver Implant Framework
Copyright (C) 2022 Bishop Fox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import (
"context"
"fmt"
"strings"
"github.com/bishopfox/sliver/client/command/settings"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/bishopfox/sliver/protobuf/commonpb"
"github.com/jedib0t/go-pretty/v6/table"
"github.com/spf13/cobra"
)
// BuildersCmd - List external builders.
func BuildersCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
builders, err := con.Rpc.Builders(context.Background(), &commonpb.Empty{})
if err != nil {
con.PrintErrorf("%s", err)
return
}
if len(builders.Builders) == 0 {
con.PrintInfof("No external builders connected to server\n")
} else {
PrintBuilders(builders.Builders, con)
}
}
func PrintBuilders(externalBuilders []*clientpb.Builder, con *console.SliverClient) {
tw := table.NewWriter()
tw.SetStyle(settings.GetTableStyle(con))
tw.AppendHeader(table.Row{
"Name", "Operator", "Templates", "Platform", "Compiler Targets",
})
for _, builder := range externalBuilders {
targets := []string{}
for _, target := range builder.Targets {
targets = append(targets, fmt.Sprintf("%s:%s/%s", target.Format, target.GOOS, target.GOARCH))
}
row := table.Row{
builder.Name,
builder.OperatorName,
strings.Join(builder.Templates, ", "),
fmt.Sprintf("%s/%s", builder.GOOS, builder.GOARCH),
strings.Join(targets, "\n"),
}
tw.AppendRow(table.Row(row))
}
con.Printf("%s\n", tw.Render())
}
+28
View File
@@ -0,0 +1,28 @@
package builders
import (
"github.com/bishopfox/sliver/client/command/flags"
"github.com/bishopfox/sliver/client/command/help"
"github.com/bishopfox/sliver/client/console"
consts "github.com/bishopfox/sliver/client/constants"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
// Commands returns the “ command and its subcommands.
func Commands(con *console.SliverClient) []*cobra.Command {
buildersCmd := &cobra.Command{
Use: consts.BuildersStr,
Short: "List external builders",
Long: help.GetHelpFor([]string{consts.BuildersStr}),
Run: func(cmd *cobra.Command, args []string) {
BuildersCmd(cmd, con, args)
},
GroupID: consts.PayloadsHelpGroup,
}
flags.Bind("builders", false, buildersCmd, func(f *pflag.FlagSet) {
f.Int64P("timeout", "t", flags.DefaultTimeout, "grpc timeout in seconds")
})
return []*cobra.Command{buildersCmd}
}
+10
View File
@@ -0,0 +1,10 @@
# client/command/c2profiles
## Overview
Implements the 'c2profiles' command group for the Sliver client console. Handlers map Cobra invocations to c2profiles workflows such as C2 profiles.
## Go Files
- `c2profiles.go` – Implements listing, import/export, and generation routines for HTTP C2 profiles, including protobuf/JSON conversion helpers.
- `commands.go` – Binds the c2profiles command suite with flag handling and completions for profile management operations.
+626
View File
@@ -0,0 +1,626 @@
package c2profiles
/*
Sliver Implant Framework
Copyright (C) 2019 Bishop Fox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/url"
"os"
"path"
"path/filepath"
"strings"
"github.com/jedib0t/go-pretty/v6/table"
"github.com/spf13/cobra"
"golang.org/x/exp/slices"
"github.com/bishopfox/sliver/client/assets"
"github.com/bishopfox/sliver/client/command/settings"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/client/constants"
"github.com/bishopfox/sliver/client/forms"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/bishopfox/sliver/protobuf/commonpb"
)
var (
ErrNoSelection = errors.New("no selection")
)
// C2ProfileCmd list available http profiles
func C2ProfileCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
profileName, _ := cmd.Flags().GetString("name")
if profileName == constants.DefaultC2Profile {
httpC2Profiles, err := con.Rpc.GetHTTPC2Profiles(context.Background(), &commonpb.Empty{})
if err != nil {
con.PrintErrorf("failed to fetch HTTP C2 profiles: %s", err.Error())
return
}
if len(httpC2Profiles.Configs) != 1 {
profileName, err = selectC2Profile(httpC2Profiles.Configs)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
}
}
profile, err := con.Rpc.GetHTTPC2ProfileByName(context.Background(), &clientpb.C2ProfileReq{Name: profileName})
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
PrintC2Profiles(profile, con)
}
func ImportC2ProfileCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
profileName, _ := cmd.Flags().GetString("name")
if profileName == "" {
con.PrintErrorf("Invalid c2 profile name\n")
return
}
filepath, _ := cmd.Flags().GetString("file")
if filepath == "" {
con.PrintErrorf("Missing file path\n")
return
}
overwrite, _ := cmd.Flags().GetBool("overwrite")
// retrieve and unmarshal profile config
jsonFile, err := os.Open(filepath)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
byteFile, _ := io.ReadAll(jsonFile)
var config *assets.HTTPC2Config = &assets.HTTPC2Config{}
err = json.Unmarshal(byteFile, config)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
httpC2ConfigReq := clientpb.HTTPC2ConfigReq{Overwrite: overwrite, C2Config: C2ConfigToProtobuf(profileName, config)}
_, err = con.Rpc.SaveHTTPC2Profile(context.Background(), &httpC2ConfigReq)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
}
func ExportC2ProfileCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
filepath, _ := cmd.Flags().GetString("file")
if filepath == "" {
con.PrintErrorf("Missing file path\n")
return
}
profileName, _ := cmd.Flags().GetString("name")
if profileName == "" {
con.PrintErrorf("Invalid c2 profile name\n")
return
}
if profileName == constants.DefaultC2Profile {
httpC2Profiles, err := con.Rpc.GetHTTPC2Profiles(context.Background(), &commonpb.Empty{})
if err != nil {
con.PrintErrorf("failed to fetch HTTP C2 profiles: %s", err.Error())
return
}
if len(httpC2Profiles.Configs) != 1 {
profileName, err = selectC2Profile(httpC2Profiles.Configs)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
}
}
profile, err := con.Rpc.GetHTTPC2ProfileByName(context.Background(), &clientpb.C2ProfileReq{Name: profileName})
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
config, err := C2ConfigToJSON(profileName, profile)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
jsonProfile, err := json.Marshal(config)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
err = os.WriteFile(filepath, jsonProfile, 0644)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
con.Println(profileName, "C2 profile exported to ", filepath)
}
func GenerateC2ProfileCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
// load template to use as starting point
template, err := cmd.Flags().GetString("template")
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
profileName, _ := cmd.Flags().GetString("name")
if profileName == "" {
con.PrintErrorf("Invalid c2 profile name\n")
return
}
profile, err := con.Rpc.GetHTTPC2ProfileByName(context.Background(), &clientpb.C2ProfileReq{Name: template})
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
config, err := C2ConfigToJSON(profileName, profile)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
// read urls files and replace segments
filepath, err := cmd.Flags().GetString("file")
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
urlsFile, err := os.Open(filepath)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
fileContent, err := io.ReadAll(urlsFile)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
urls := strings.Split(string(fileContent), "\n")
jsonProfile, err := updateC2Profile(config, urls)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
// save or display config
importC2Profile, err := cmd.Flags().GetBool("import")
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
if importC2Profile {
httpC2ConfigReq := clientpb.HTTPC2ConfigReq{C2Config: C2ConfigToProtobuf(profileName, jsonProfile)}
_, err = con.Rpc.SaveHTTPC2Profile(context.Background(), &httpC2ConfigReq)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
con.Println("C2 profile generated and saved as ", profileName)
} else {
PrintC2Profiles(C2ConfigToProtobuf(profileName, jsonProfile), con)
}
}
// convert protobuf to json
func C2ConfigToJSON(profileName string, profile *clientpb.HTTPC2Config) (*assets.HTTPC2Config, error) {
implantConfig := assets.HTTPC2ImplantConfig{
UserAgent: profile.ImplantConfig.UserAgent,
ChromeBaseVersion: int(profile.ImplantConfig.ChromeBaseVersion),
MacOSVersion: profile.ImplantConfig.MacOSVersion,
NonceQueryArgChars: profile.ImplantConfig.NonceQueryArgChars,
NonceQueryLength: int(profile.ImplantConfig.NonceQueryLength),
NonceMode: profile.ImplantConfig.NonceMode,
MaxFileGen: int(profile.ImplantConfig.MaxFileGen),
MinFileGen: int(profile.ImplantConfig.MinFileGen),
MaxPathGen: int(profile.ImplantConfig.MaxPathGen),
MinPathGen: int(profile.ImplantConfig.MinFileGen),
MaxPathLength: int(profile.ImplantConfig.MaxPathLength),
MinPathLength: int(profile.ImplantConfig.MinPathLength),
Extensions: profile.ImplantConfig.Extensions,
}
var headers []assets.NameValueProbability
for _, header := range profile.ImplantConfig.Headers {
headers = append(headers, assets.NameValueProbability{
Name: header.Name,
Value: header.Value,
Probability: int(header.Probability),
Method: header.Method,
})
}
implantConfig.Headers = headers
var urlParameters []assets.NameValueProbability
for _, urlParameter := range profile.ImplantConfig.ExtraURLParameters {
urlParameters = append(urlParameters, assets.NameValueProbability{
Name: urlParameter.Name,
Value: urlParameter.Value,
Probability: int(urlParameter.Probability),
})
}
implantConfig.URLParameters = urlParameters
var (
files []string
paths []string
)
for _, pathSegment := range profile.ImplantConfig.PathSegments {
if pathSegment.IsFile {
files = append(files, pathSegment.Value)
} else {
paths = append(paths, pathSegment.Value)
}
}
implantConfig.Files = files
implantConfig.Paths = paths
var serverHeaders []assets.NameValueProbability
for _, header := range profile.ServerConfig.Headers {
serverHeaders = append(serverHeaders, assets.NameValueProbability{
Name: header.Name,
Value: header.Value,
Probability: int(header.Probability),
Method: header.Method,
})
}
var serverCookies []string
for _, cookie := range profile.ServerConfig.Cookies {
serverCookies = append(serverCookies, cookie.Name)
}
serverConfig := assets.HTTPC2ServerConfig{
RandomVersionHeaders: profile.ServerConfig.RandomVersionHeaders,
Headers: serverHeaders,
Cookies: serverCookies,
}
config := assets.HTTPC2Config{
ImplantConfig: implantConfig,
ServerConfig: serverConfig,
}
return &config, nil
}
// convert json to protobuf
func C2ConfigToProtobuf(profileName string, config *assets.HTTPC2Config) *clientpb.HTTPC2Config {
httpC2UrlParameters := []*clientpb.HTTPC2URLParameter{}
httpC2Headers := []*clientpb.HTTPC2Header{}
pathSegments := []*clientpb.HTTPC2PathSegment{}
// files
for _, file := range config.ImplantConfig.Files {
pathSegments = append(pathSegments, &clientpb.HTTPC2PathSegment{
IsFile: true,
Value: file,
})
}
for _, path := range config.ImplantConfig.Paths {
pathSegments = append(pathSegments, &clientpb.HTTPC2PathSegment{
IsFile: false,
Value: path,
})
}
for _, clientHeader := range config.ImplantConfig.Headers {
httpC2Headers = append(httpC2Headers, &clientpb.HTTPC2Header{
Method: clientHeader.Method,
Name: clientHeader.Name,
Value: clientHeader.Value,
Probability: int32(clientHeader.Probability),
})
}
for _, urlParameter := range config.ImplantConfig.URLParameters {
httpC2UrlParameters = append(httpC2UrlParameters, &clientpb.HTTPC2URLParameter{
Method: urlParameter.Method,
Name: urlParameter.Name,
Value: urlParameter.Value,
Probability: int32(urlParameter.Probability),
})
}
implantConfig := &clientpb.HTTPC2ImplantConfig{
UserAgent: config.ImplantConfig.UserAgent,
ChromeBaseVersion: int32(config.ImplantConfig.ChromeBaseVersion),
MacOSVersion: config.ImplantConfig.MacOSVersion,
NonceQueryArgChars: config.ImplantConfig.NonceQueryArgChars,
NonceQueryLength: int32(config.ImplantConfig.NonceQueryLength),
NonceMode: config.ImplantConfig.NonceMode,
ExtraURLParameters: httpC2UrlParameters,
Headers: httpC2Headers,
MaxFileGen: int32(config.ImplantConfig.MaxFileGen),
MinFileGen: int32(config.ImplantConfig.MinFileGen),
MaxPathGen: int32(config.ImplantConfig.MaxPathGen),
MinPathGen: int32(config.ImplantConfig.MinPathGen),
MaxPathLength: int32(config.ImplantConfig.MaxPathLength),
MinPathLength: int32(config.ImplantConfig.MinPathLength),
Extensions: config.ImplantConfig.Extensions,
PathSegments: pathSegments,
}
// Server Config
serverHeaders := []*clientpb.HTTPC2Header{}
for _, serverHeader := range config.ServerConfig.Headers {
serverHeaders = append(serverHeaders, &clientpb.HTTPC2Header{
Method: serverHeader.Method,
Name: serverHeader.Name,
Value: serverHeader.Value,
Probability: int32(serverHeader.Probability),
})
}
serverCookies := []*clientpb.HTTPC2Cookie{}
for _, cookie := range config.ServerConfig.Cookies {
serverCookies = append(serverCookies, &clientpb.HTTPC2Cookie{
Name: cookie,
})
}
serverConfig := &clientpb.HTTPC2ServerConfig{
RandomVersionHeaders: config.ServerConfig.RandomVersionHeaders,
Headers: serverHeaders,
Cookies: serverCookies,
}
return &clientpb.HTTPC2Config{
Name: profileName,
ImplantConfig: implantConfig,
ServerConfig: serverConfig,
}
}
// PrintImplantBuilds - Print the implant builds on the server
func PrintC2Profiles(profile *clientpb.HTTPC2Config, con *console.SliverClient) {
tw := table.NewWriter()
tw.SetStyle(settings.GetTableStyle(con))
tw.AppendHeader(table.Row{
"Parameter",
"Value",
})
// Profile metadata
tw.AppendRow(table.Row{
"Profile Name",
profile.Name,
})
// Server side configuration
var serverHeaders []string
for _, header := range profile.ServerConfig.Headers {
serverHeaders = append(serverHeaders, header.Name)
}
tw.AppendRow(table.Row{
"Server Headers",
strings.Join(serverHeaders[:], ","),
})
var serverCookies []string
for _, cookie := range profile.ServerConfig.Cookies {
serverCookies = append(serverCookies, cookie.Name)
}
tw.AppendRow(table.Row{
"Server Cookies",
strings.Join(serverCookies[:], ","),
})
tw.AppendRow(table.Row{
"Randomize Server Headers",
profile.ServerConfig.RandomVersionHeaders,
})
// Client side configuration
var clientHeaders []string
for _, header := range profile.ImplantConfig.Headers {
clientHeaders = append(clientHeaders, header.Name)
}
tw.AppendRow(table.Row{
"Client Headers",
strings.Join(clientHeaders[:], ","),
})
var clientUrlParams []string
for _, clientUrlParam := range profile.ImplantConfig.ExtraURLParameters {
clientUrlParams = append(clientUrlParams, clientUrlParam.Name)
}
tw.AppendRow(table.Row{
"Extra URL Parameters",
strings.Join(clientUrlParams[:], ","),
})
tw.AppendRow(table.Row{
"User agent",
profile.ImplantConfig.UserAgent,
})
tw.AppendRow(table.Row{
"Chrome base version",
profile.ImplantConfig.ChromeBaseVersion,
})
tw.AppendRow(table.Row{
"MacOS version",
profile.ImplantConfig.MacOSVersion,
})
tw.AppendRow(table.Row{
"Nonce query arg chars",
profile.ImplantConfig.NonceQueryArgChars,
})
tw.AppendRow(table.Row{
"Nonce query length",
profile.ImplantConfig.NonceQueryLength,
})
tw.AppendRow(table.Row{
"Nonce mode",
profile.ImplantConfig.NonceMode,
})
tw.AppendRow(table.Row{
"Max files",
profile.ImplantConfig.MaxFileGen,
})
tw.AppendRow(table.Row{
"Min files",
profile.ImplantConfig.MinFileGen,
})
tw.AppendRow(table.Row{
"Max paths",
profile.ImplantConfig.MaxPathGen,
})
tw.AppendRow(table.Row{
"Min paths",
profile.ImplantConfig.MinPathGen,
})
tw.AppendRow(table.Row{
"Max path length",
profile.ImplantConfig.MaxPathLength,
})
tw.AppendRow(table.Row{
"Min path length",
profile.ImplantConfig.MinPathLength,
})
tw.AppendRow(table.Row{
"File extensions",
strings.Join(profile.ImplantConfig.Extensions, ","),
})
var (
paths []string
files []string
)
for _, segment := range profile.ImplantConfig.PathSegments {
if segment.IsFile {
files = append(files, segment.Value)
} else {
paths = append(paths, segment.Value)
}
}
tw.AppendRow(table.Row{
"Paths",
strings.Join(paths[:], ",")[:50] + "...",
})
tw.AppendRow(table.Row{
"Files",
strings.Join(files[:], ",")[:50] + "...",
})
con.Println(tw.Render())
con.Println("\n")
}
func selectC2Profile(c2profiles []*clientpb.HTTPC2Config) (string, error) {
c2profile := ""
var choices []string
for _, c2profile := range c2profiles {
choices = append(choices, c2profile.Name)
}
_ = forms.Select("Select a c2 profile", choices, &c2profile)
if c2profile == "" {
return "", ErrNoSelection
}
return c2profile, nil
}
func updateC2Profile(template *assets.HTTPC2Config, urls []string) (*assets.HTTPC2Config, error) {
// update the template with the urls
var (
paths []string
filenames []string
extensions []string
)
for _, urlPath := range urls {
parsedURL, err := url.Parse(urlPath)
if err != nil {
fmt.Println("Error parsing URL:", err)
continue
}
dir, file := path.Split(parsedURL.Path)
dir = strings.Trim(dir, "/")
if dir != "" {
paths = append(paths, strings.Split(dir, "/")...)
}
if file != "" {
fileName := strings.TrimSuffix(file, filepath.Ext(file))
filenames = append(filenames, fileName)
ext := strings.TrimPrefix(filepath.Ext(file), ".")
if ext != "" {
extensions = append(extensions, ext)
}
}
}
slices.Sort(extensions)
extensions = slices.Compact(extensions)
slices.Sort(paths)
paths = slices.Compact(paths)
slices.Sort(filenames)
filenames = slices.Compact(filenames)
// 5 is arbitrarily used as a minimum value
if len(paths) < 5 {
return nil, fmt.Errorf("got %d paths need at least 5", len(paths))
}
if len(filenames) < 5 {
return nil, fmt.Errorf("got %d paths need at least 5", len(filenames))
}
template.ImplantConfig.Extensions = extensions
template.ImplantConfig.Paths = paths
template.ImplantConfig.Files = filenames
return template, nil
}
+95
View File
@@ -0,0 +1,95 @@
package c2profiles
import (
"github.com/bishopfox/sliver/client/command/completers"
"github.com/bishopfox/sliver/client/command/flags"
"github.com/bishopfox/sliver/client/command/generate"
"github.com/bishopfox/sliver/client/command/help"
"github.com/bishopfox/sliver/client/console"
consts "github.com/bishopfox/sliver/client/constants"
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
// Commands returns the “ command and its subcommands.
func Commands(con *console.SliverClient) []*cobra.Command {
importC2ProfileCmd := &cobra.Command{
Use: consts.ImportC2ProfileStr,
Short: "Import HTTP C2 profile",
Long: help.GetHelpFor([]string{consts.ImportC2ProfileStr}),
Run: func(cmd *cobra.Command, args []string) {
ImportC2ProfileCmd(cmd, con, args)
},
}
flags.Bind(consts.ImportC2ProfileStr, false, importC2ProfileCmd, func(f *pflag.FlagSet) {
f.StringP("name", "n", consts.DefaultC2Profile, "HTTP C2 Profile name")
f.StringP("file", "f", "", "Path to C2 configuration file to import")
f.BoolP("overwrite", "o", false, "Overwrite profile if it exists")
})
completers.RegisterLocalFilePathFlagCompletion(importC2ProfileCmd, "file")
exportC2ProfileCmd := &cobra.Command{
Use: consts.ExportC2ProfileStr,
Short: "Export HTTP C2 profile",
Long: help.GetHelpFor([]string{consts.ExportC2ProfileStr}),
Run: func(cmd *cobra.Command, args []string) {
ExportC2ProfileCmd(cmd, con, args)
},
}
flags.Bind(consts.ExportC2ProfileStr, false, exportC2ProfileCmd, func(f *pflag.FlagSet) {
f.StringP("file", "f", "", "Path to file to export C2 configuration to")
f.StringP("name", "n", consts.DefaultC2Profile, "HTTP C2 Profile name")
})
completers.RegisterLocalFilePathFlagCompletion(exportC2ProfileCmd, "file")
flags.BindFlagCompletions(exportC2ProfileCmd, func(comp *carapace.ActionMap) {
(*comp)["name"] = generate.HTTPC2Completer(con)
})
C2ProfileCmd := &cobra.Command{
Use: consts.C2ProfileStr,
Short: "Display C2 profile details",
Long: help.GetHelpFor([]string{consts.C2ProfileStr}),
Run: func(cmd *cobra.Command, args []string) {
C2ProfileCmd(cmd, con, args)
},
GroupID: consts.NetworkHelpGroup,
}
flags.Bind(consts.C2ProfileStr, true, C2ProfileCmd, func(f *pflag.FlagSet) {
f.StringP("name", "n", consts.DefaultC2Profile, "HTTP C2 Profile to display")
})
flags.BindFlagCompletions(C2ProfileCmd, func(comp *carapace.ActionMap) {
(*comp)["name"] = generate.HTTPC2Completer(con)
})
generateC2ProfileCmd := &cobra.Command{
Use: consts.C2GenerateStr,
Short: "Generate a C2 Profile from a list of urls",
Long: help.GetHelpFor([]string{consts.C2ProfileStr + "." + consts.C2GenerateStr}),
Run: func(cmd *cobra.Command, args []string) {
GenerateC2ProfileCmd(cmd, con, args)
},
}
flags.Bind(consts.GenerateStr, false, generateC2ProfileCmd, func(f *pflag.FlagSet) {
f.StringP("file", "f", "", "Path to file containing URL list, /hello/there.txt one per line")
f.BoolP("import", "i", false, "Import the generated profile after creation")
f.StringP("name", "n", "", "HTTP C2 Profile name to save C2Profile as")
f.StringP("template", "t", consts.DefaultC2Profile, "HTTP C2 Profile to use as a template for the new profile")
})
completers.RegisterLocalFilePathFlagCompletion(generateC2ProfileCmd, "file")
flags.BindFlagCompletions(generateC2ProfileCmd, func(comp *carapace.ActionMap) {
(*comp)["template"] = generate.HTTPC2Completer(con)
})
C2ProfileCmd.AddCommand(generateC2ProfileCmd)
C2ProfileCmd.AddCommand(importC2ProfileCmd)
C2ProfileCmd.AddCommand(exportC2ProfileCmd)
return []*cobra.Command{
C2ProfileCmd,
}
}
+12
View File
@@ -0,0 +1,12 @@
# client/command/certificates
## Overview
Implements the 'certificates' command group for the Sliver client console.
## Go Files
- `authorities.go` – Retrieves certificate authority metadata from the server and prints it in a table.
- `completions.go` – Provides tab completion helpers for certificate common names.
- `certificates.go` – Retrieves certificate metadata from the server, formats expiration status, and prints results to the console.
- `commands.go` – Registers the certificates command and binds the flags needed to query certificate inventories.
@@ -0,0 +1,89 @@
package certificates
import (
"context"
"time"
"github.com/bishopfox/sliver/client/command/settings"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/bishopfox/sliver/protobuf/commonpb"
"github.com/jedib0t/go-pretty/v6/table"
"github.com/spf13/cobra"
"golang.org/x/term"
)
func CertificateAuthoritiesCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
authorityInfo, err := con.Rpc.GetCertificateAuthorityInfo(context.Background(), &commonpb.Empty{})
if err != nil {
con.PrintErrorf("could not get certificate authority information from database: %s", err.Error())
return
}
printCertificateAuthorityInfo(con, authorityInfo.Info)
}
func printCertificateAuthorityInfo(con *console.SliverClient, authData []*clientpb.CertificateAuthorityData) {
width, _, err := term.GetSize(0)
if err != nil {
width = 999
}
if len(authData) == 0 {
con.PrintWarnf("There are no certificate authorities in the database.\n")
return
}
tw := table.NewWriter()
tw.SetStyle(settings.GetTableStyle(con))
wideTermWidth := con.Settings.SmallTermWidth < width
if wideTermWidth {
tw.AppendHeader(table.Row{
"ID",
"Common Name",
"Creation Time",
"Authority Type",
"Key Algorithm",
"Validity Start",
"Expires",
})
} else {
tw.AppendHeader(table.Row{
"ID",
"Common Name",
"Expires",
})
}
for _, authority := range authData {
rowStyle := console.StyleNormal
expiry, err := time.Parse(timeFormat, authority.ValidityExpiry)
if err == nil {
rowStyle = checkCertExpiry(expiry)
}
if wideTermWidth {
tw.AppendRow(table.Row{
rowStyle.Render(authority.ID),
rowStyle.Render(authority.CN),
rowStyle.Render(authority.CreationTime),
rowStyle.Render(authority.Type),
rowStyle.Render(authority.KeyAlgorithm),
rowStyle.Render(authority.ValidityStart),
rowStyle.Render(authority.ValidityExpiry),
})
} else {
tw.AppendRow(table.Row{
rowStyle.Render(authority.ID),
rowStyle.Render(authority.CN),
rowStyle.Render(authority.ValidityExpiry),
})
}
}
tw.SortBy([]table.SortBy{{Name: "Expires", Mode: table.Dsc}})
con.Printf("%s\n", tw.Render())
}
+180
View File
@@ -0,0 +1,180 @@
package certificates
import (
"context"
"time"
"github.com/bishopfox/sliver/client/command/settings"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/jedib0t/go-pretty/v6/table"
"github.com/spf13/cobra"
"golang.org/x/term"
)
/*
Sliver Implant Framework
Copyright (C) 2024 Bishop Fox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
const (
timeFormat = "2006-01-02 15:04:05 UTC-0700"
)
// Defining the transport filters
const (
MTLSTransport uint32 = 1 << iota
HTTPSTransport
AllTransports
)
// Defining the role filters
const (
// Provide some separation between the options so that we do not have duplicate combinations
ServerRole uint32 = 8 << iota
ImplantRole
AllRoles
)
func CertificateInfoCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
// Since we are sending this value in a protobuf, we will give it a fixed bit size
// 32 is the smallest we can go
var chosenOptions uint32
if cmd.Flags().Changed("mtls") {
if cmd.Flags().Changed("https") {
chosenOptions = AllTransports
} else {
chosenOptions = MTLSTransport
}
} else if cmd.Flags().Changed("https") {
chosenOptions = HTTPSTransport
} else {
chosenOptions = AllTransports
}
if cmd.Flags().Changed("server") {
if cmd.Flags().Changed("implant") {
chosenOptions |= AllRoles
} else {
chosenOptions |= ServerRole
}
} else if cmd.Flags().Changed("implant") {
chosenOptions |= ImplantRole
} else {
chosenOptions |= AllRoles
}
request := &clientpb.CertificatesReq{
CategoryFilters: chosenOptions,
}
request.CN, _ = cmd.Flags().GetString("cn")
// Ask the server for information about certificates
certificateInfo, err := con.Rpc.GetCertificateInfo(context.Background(), request)
if err != nil {
con.PrintErrorf("could not get certificate information from database: %s", err.Error())
return
}
printCertificateInfo(con, certificateInfo.Info)
}
func checkCertExpiry(expiryTime time.Time) console.TextStyle {
if expiryTime.Before(time.Now()) || expiryTime.Equal(time.Now()) {
return console.StyleBoldRed
}
// One week is 168 hours - this is bad
if expiryTime.Before(time.Now().Add(168 * time.Hour)) {
return console.StyleBoldRed
}
// One month is approximately 730 hours - this is a warning
if expiryTime.Before(time.Now().Add(730 * time.Hour)) {
return console.StyleBoldOrange
}
return console.StyleNormal
}
func printCertificateInfo(con *console.SliverClient, certData []*clientpb.CertificateData) {
// Get the terminal width
width, _, err := term.GetSize(0)
if err != nil {
width = 999
}
if len(certData) == 0 {
con.PrintWarnf("There are no certificates in the database matching the given parameters.\n")
return
}
tw := table.NewWriter()
tw.SetStyle(settings.GetTableStyle(con))
wideTermWidth := con.Settings.SmallTermWidth < width
if wideTermWidth {
tw.AppendHeader(table.Row{
"ID",
"Common Name",
"Creation Time",
"Certificate Type",
"Key Algorithm",
"Validity Start",
"Expires",
})
} else {
tw.AppendHeader(table.Row{
"ID",
"Common Name",
"Expires",
})
}
for _, cert := range certData {
rowStyle := console.StyleNormal
expiry, err := time.Parse(timeFormat, cert.ValidityExpiry)
// This should not error out, but if it does, the row will not be colored
if err == nil {
rowStyle = checkCertExpiry(expiry)
}
if wideTermWidth {
tw.AppendRow(table.Row{
rowStyle.Render(cert.ID),
rowStyle.Render(cert.CN),
rowStyle.Render(cert.CreationTime),
rowStyle.Render(cert.Type),
rowStyle.Render(cert.KeyAlgorithm),
rowStyle.Render(cert.ValidityStart),
rowStyle.Render(cert.ValidityExpiry),
})
} else {
tw.AppendRow(table.Row{
rowStyle.Render(cert.ID),
rowStyle.Render(cert.CN),
rowStyle.Render(cert.ValidityExpiry),
})
}
}
tw.SortBy([]table.SortBy{{Name: "Expires", Mode: table.Dsc}})
con.Printf("%s\n", tw.Render())
}
+65
View File
@@ -0,0 +1,65 @@
package certificates
/*
Sliver Implant Framework
Copyright (C) 2024 Bishop Fox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import (
"github.com/bishopfox/sliver/client/command/flags"
"github.com/bishopfox/sliver/client/command/help"
"github.com/bishopfox/sliver/client/console"
consts "github.com/bishopfox/sliver/client/constants"
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
func Commands(con *console.SliverClient) []*cobra.Command {
certificatesCmd := &cobra.Command{
Use: consts.CertificatesStr,
Short: "Certificate management",
Long: help.GetHelpFor([]string{consts.CertificatesStr}),
Run: func(cmd *cobra.Command, args []string) {
CertificateInfoCmd(cmd, con, args)
},
GroupID: consts.GenericHelpGroup,
}
flags.Bind(consts.CertificatesStr, false, certificatesCmd, func(f *pflag.FlagSet) {
f.BoolP("mtls", "m", false, "Show MTLS certificates")
f.BoolP("https", "p", false, "Show HTTPS certificates")
f.BoolP("implant", "i", false, "Show implant certificates")
f.BoolP("server", "s", false, "Show server certificates")
f.StringP("cn", "c", "", "Show certificate information for a provided common name")
})
flags.BindFlagCompletions(certificatesCmd, func(comp *carapace.ActionMap) {
(*comp)["cn"] = CertificateCommonNameCompleter(con)
})
registerCertificateCNFlagCompletion(certificatesCmd, "cn", con)
authoritiesCmd := &cobra.Command{
Use: "authorities",
Short: "List certificate authorities",
Run: func(cmd *cobra.Command, args []string) {
CertificateAuthoritiesCmd(cmd, con, args)
},
}
certificatesCmd.AddCommand(authoritiesCmd)
return []*cobra.Command{
certificatesCmd,
}
}
@@ -0,0 +1,96 @@
package certificates
import (
"context"
"sort"
"strings"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)
// CertificateCommonNameCompleter completes common names for stored certificates.
func CertificateCommonNameCompleter(con *console.SliverClient) carapace.Action {
return carapace.ActionCallback(func(c carapace.Context) carapace.Action {
if con == nil || con.Rpc == nil {
return carapace.ActionMessage("not connected")
}
values, err := certificateCommonNameValues(con)
if err != nil {
return carapace.ActionMessage("failed to list certificates %s", err)
}
if len(values) == 0 {
return carapace.ActionMessage("no certificates")
}
return carapace.ActionValues(values...).Tag("common name").Usage("certificate common name")
})
}
func registerCertificateCNFlagCompletion(cmd *cobra.Command, name string, con *console.SliverClient) {
if cmd == nil {
return
}
if _, ok := cmd.GetFlagCompletionFunc(name); ok {
return
}
if cmd.Flags().Lookup(name) == nil && cmd.PersistentFlags().Lookup(name) == nil {
return
}
_ = cmd.RegisterFlagCompletionFunc(name, func(_ *cobra.Command, _ []string, toComplete string) ([]string, cobra.ShellCompDirective) {
values, err := certificateCommonNameValues(con)
if err != nil {
return nil, cobra.ShellCompDirectiveNoFileComp
}
return filterCompletionValues(values, toComplete), cobra.ShellCompDirectiveNoFileComp
})
}
func certificateCommonNameValues(con *console.SliverClient) ([]string, error) {
if con == nil || con.Rpc == nil {
return nil, nil
}
certInfo, err := con.Rpc.GetCertificateInfo(context.Background(), &clientpb.CertificatesReq{
CategoryFilters: AllTransports | AllRoles,
})
if err != nil {
return nil, err
}
unique := map[string]struct{}{}
for _, cert := range certInfo.Info {
if cert.CN == "" {
continue
}
unique[cert.CN] = struct{}{}
}
values := make([]string, 0, len(unique))
for name := range unique {
values = append(values, name)
}
sort.Strings(values)
return values, nil
}
func filterCompletionValues(values []string, prefix string) []string {
if prefix == "" {
return values
}
filtered := make([]string, 0, len(values))
for _, value := range values {
candidate := value
if tab := strings.IndexByte(value, '\t'); tab >= 0 {
candidate = value[:tab]
}
if strings.HasPrefix(candidate, prefix) {
filtered = append(filtered, value)
}
}
return filtered
}
+9
View File
@@ -0,0 +1,9 @@
# client/command/clean
## Overview
Implements the 'clean' command group for the Sliver client console.
## Go Files
- `clean.go` – Defines the clean command and its helpers that purge local build artifacts, cached profiles, and stale sessions.
+140
View File
@@ -0,0 +1,140 @@
package clean
/*
Sliver Implant Framework
Copyright (C) 2023 Bishop Fox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import (
"context"
"github.com/bishopfox/sliver/client/command/flags"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/client/constants"
"github.com/bishopfox/sliver/client/forms"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/bishopfox/sliver/protobuf/commonpb"
"github.com/bishopfox/sliver/protobuf/sliverpb"
"github.com/spf13/cobra"
)
// CleanCmd - Remove all profiles, beacons, sessions and implant builds (Builds and logs will still exist on disk in .sliver)
func CleanCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
con.Printf("This command will kill and remove all sessions, beacons and profiles \n")
confirm := false
_ = forms.Confirm("Are you sure you want to destroy everything?", &confirm)
if !confirm {
return
}
err := removeSessionsAndBeacons(con)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
err = removeImplantBuilds(con)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
err = removeProfiles(con)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
con.Printf("All done !\n")
}
func removeImplantBuilds(con *console.SliverClient) error {
builds, err := con.Rpc.ImplantBuilds(context.Background(), &commonpb.Empty{})
if err != nil {
return err
}
for name, _ := range builds.Configs {
_, err := con.Rpc.DeleteImplantBuild(context.Background(), &clientpb.DeleteReq{
Name: name,
})
if err != nil {
return err
}
}
return nil
}
func removeProfiles(con *console.SliverClient) error {
profiles, err := con.Rpc.ImplantProfiles(context.Background(), &commonpb.Empty{})
if err != nil {
return err
}
for _, profile := range profiles.Profiles {
_, err := con.Rpc.DeleteImplantProfile(context.Background(), &clientpb.DeleteReq{
Name: profile.Name,
})
if err != nil {
return err
}
}
return nil
}
func removeSessionsAndBeacons(con *console.SliverClient) error {
sessions, err := con.Rpc.GetSessions(context.Background(), &commonpb.Empty{})
if err != nil {
return err
}
for _, session := range sessions.Sessions {
_, err := con.Rpc.Kill(context.Background(), &sliverpb.KillReq{
Request: &commonpb.Request{
SessionID: session.ID,
Timeout: flags.DefaultTimeout,
},
Force: false,
})
if err != nil {
return err
}
}
beacons, err := con.Rpc.GetBeacons(context.Background(), &commonpb.Empty{})
if err != nil {
return err
}
for _, beacon := range beacons.Beacons {
_, err = con.Rpc.RmBeacon(context.Background(), &clientpb.Beacon{ID: beacon.ID})
if err != nil {
return err
}
}
return nil
}
// Commands returns the `exit` command.
func Command(con *console.SliverClient) []*cobra.Command {
return []*cobra.Command{{
Use: "clean",
Short: "Remove all profiles, beacons, sessions, implant builds and HTTP profiles (Builds and logs will still exist on disk in .sliver)",
Run: func(cmd *cobra.Command, args []string) {
CleanCmd(cmd, con, args)
},
GroupID: constants.GenericHelpGroup,
}}
}
+135
View File
@@ -0,0 +1,135 @@
package command
/*
Sliver Implant Framework
Copyright (C) 2023 Bishop Fox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import (
"strings"
client "github.com/bishopfox/sliver/client/console"
"github.com/reeflective/console"
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
// Bind is a convenience function to bind flags to a given command.
// name - The name of the flag set (can be empty).
// cmd - The command to which the flags should be bound.
// flags - A function exposing the flag set through which flags are declared.
func Bind(name string, persistent bool, cmd *cobra.Command, flags func(f *pflag.FlagSet)) {
flagSet := pflag.NewFlagSet(name, pflag.ContinueOnError) // Create the flag set.
flags(flagSet) // Let the user bind any number of flags to it.
if persistent {
cmd.PersistentFlags().AddFlagSet(flagSet)
} else {
cmd.Flags().AddFlagSet(flagSet)
}
}
// BindFlagCompletions is a convenience function for adding completions to a command's flags.
// cmd - The command owning the flags to complete.
// bind - A function exposing a map["flag-name"]carapace.Action.
func BindFlagCompletions(cmd *cobra.Command, bind func(comp *carapace.ActionMap)) {
comps := make(carapace.ActionMap)
bind(&comps)
carapace.Gen(cmd).FlagCompletion(comps)
}
// RestrictTargets generates a cobra annotation map with a single console.CommandHiddenFilter key
// to a comma-separated list of filters to use in order to expose/hide commands based on requirements.
// Ex: cmd.Annotations = RestrictTargets("windows") will only show the command if the target is Windows.
// Ex: cmd.Annotations = RestrictTargets("windows", "beacon") show the command if target is a beacon on Windows.
func RestrictTargets(filters ...string) map[string]string {
if len(filters) == 0 {
return nil
}
if len(filters) == 1 {
return map[string]string{
console.CommandFilterKey: filters[0],
}
}
filts := strings.Join(filters, ",")
return map[string]string{
console.CommandFilterKey: filts,
}
}
// makeBind returns a commandBinder helper function
// @menu - The command menu to which the commands should be bound (either server or implant menu).
func makeBind(cmd *cobra.Command, con *client.SliverClient) func(group string, cmds ...func(con *client.SliverClient) []*cobra.Command) {
return func(group string, cmds ...func(con *client.SliverClient) []*cobra.Command) {
found := false
// Ensure the given command group is available in the menu.
if group != "" {
for _, grp := range cmd.Groups() {
if grp.Title == group {
found = true
break
}
}
if !found {
cmd.AddGroup(&cobra.Group{
ID: group,
Title: group,
})
}
}
// Bind the command to the root
for _, command := range cmds {
cmd.AddCommand(command(con)...)
}
}
}
// commandBinder is a helper used to bind commands to a given menu, for a given "command help group".
//
// @group - Name of the group under which the command should be shown. Preferably use a string in the constants package.
// @ cmds - A list of functions returning a list of root commands to bind. See any package's `commands.go` file and function.
// type commandBinder func(group string, cmds ...func(con *client.SliverClient) []*cobra.Command)
// [ Core ]
// [ Sessions ]
// [ Execution ]
// [ Filesystem ]
// [ Info ]
// [ Network (C2)]
// [ Network tools ]
// [ Payloads ]
// [ Privileges ]
// [ Processes ]
// [ Aliases ]
// [ Extensions ]
// Commands not to bind in CLI:
// - portforwarders
// - Socks (and wg-socks ?)
// - shell ?
// Take care of:
// - double bind help command
// - double bind session commands
// - don't bind readline command in CLI.
File diff suppressed because it is too large. Load diff
+8 -3
View File
@@ -1,4 +1,9 @@
Completers
===========
# client/command/completers
This package contains general purpose completers for the console, note that some package also contain their own package-specific completers.
## Overview
Implements the 'completers' command group for the Sliver client console.
## Go Files
- `completers.go` – Provides reusable carapace completion helpers for selecting client interfaces and proxy endpoints.
+114 -33
View File
@@ -19,45 +19,126 @@ package completers
*/
import (
"io/ioutil"
"os"
"path/filepath"
"strings"
"net"
"github.com/bishopfox/sliver/client/console"
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)
// LocalPathCompleter - Completes a local file system path
func LocalPathCompleter(prefix string, args []string, con *console.SliverConsoleClient) []string {
var parent string
var partial string
fi, err := os.Stat(prefix)
if os.IsNotExist(err) {
parent = filepath.Dir(prefix)
partial = filepath.Base(prefix)
} else {
if fi.IsDir() {
parent = prefix
partial = ""
} else {
parent = filepath.Dir(prefix)
partial = filepath.Base(prefix)
// ClientInterfacesCompleter completes interface addresses on the client host.
func ClientInterfacesCompleter() carapace.Action {
return carapace.ActionCallback(func(_ carapace.Context) carapace.Action {
ifaces, err := net.Interfaces()
if err != nil {
return carapace.ActionMessage("failed to get net interfaces: %s", err.Error())
}
}
results := []string{}
ls, err := ioutil.ReadDir(parent)
if err != nil {
return results
}
for _, fi = range ls {
if 0 < len(partial) {
if strings.HasPrefix(fi.Name(), partial) {
results = append(results, filepath.Join(parent, fi.Name()))
results := make([]string, 0)
for _, i := range ifaces {
addrs, err := i.Addrs()
if err != nil {
continue
}
for _, a := range addrs {
switch v := a.(type) {
case *net.IPAddr:
results = append(results, v.IP.String())
case *net.IPNet:
results = append(results, v.IP.String())
default:
results = append(results, v.String())
}
}
} else {
results = append(results, filepath.Join(parent, fi.Name()))
}
return carapace.ActionValues(results...).Tag("client interfaces").NoSpace(':')
})
}
// LocalProxyCompleter gives URL completion to all flags/arguments that accept a client proxy address.
func LocalProxyCompleter() carapace.Action {
return carapace.ActionCallback(func(c carapace.Context) carapace.Action {
prefix := ""
hostPort := carapace.ActionMultiParts(":", func(c carapace.Context) carapace.Action {
switch len(c.Parts) {
case 0:
return ClientInterfacesCompleter()
case 1:
return carapace.ActionMessage("server port")
default:
return carapace.ActionValues()
}
})
return carapace.ActionMultiParts("://", func(c carapace.Context) carapace.Action {
switch len(c.Parts) {
case 0:
return carapace.ActionValues("http", "https").Tag("proxy protocols").Suffix("://")
case 1:
return hostPort
default:
return carapace.ActionValues()
}
}).Invoke(c).Prefix(prefix).ToA()
})
}
// LocalFilePathCompleter completes local file and directory paths.
func LocalFilePathCompleter() carapace.Action {
return carapace.ActionFiles().Tag("local file path")
}
// RegisterLocalFilePathFlagCompletion registers local file-path completion for a flag.
func RegisterLocalFilePathFlagCompletion(cmd *cobra.Command, name string) {
if cmd == nil {
return
}
return results
if _, ok := cmd.GetFlagCompletionFunc(name); ok {
return
}
if cmd.Flags().Lookup(name) == nil && cmd.PersistentFlags().Lookup(name) == nil {
return
}
_ = cmd.RegisterFlagCompletionFunc(name, func(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
return nil, cobra.ShellCompDirectiveDefault
})
}
// RegisterLocalFilePathFlagCompletions registers local file-path completion for a list of flags.
func RegisterLocalFilePathFlagCompletions(cmd *cobra.Command, names ...string) {
for _, name := range names {
RegisterLocalFilePathFlagCompletion(cmd, name)
}
}
// RegisterLocalFilePathPositionalCompletion registers local file-path completion for a positional argument index.
func RegisterLocalFilePathPositionalCompletion(cmd *cobra.Command, index int) {
if cmd == nil || index < 0 {
return
}
if cmd.ValidArgsFunction != nil {
return
}
cmd.ValidArgsFunction = func(_ *cobra.Command, args []string, _ string) ([]string, cobra.ShellCompDirective) {
if len(args) == index {
return nil, cobra.ShellCompDirectiveDefault
}
return nil, cobra.ShellCompDirectiveNoFileComp
}
}
// RegisterLocalFilePathPositionalAnyCompletion registers local file-path completion for all positional arguments.
func RegisterLocalFilePathPositionalAnyCompletion(cmd *cobra.Command) {
if cmd == nil {
return
}
if cmd.ValidArgsFunction != nil {
return
}
cmd.ValidArgsFunction = func(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
return nil, cobra.ShellCompDirectiveDefault
}
}
+12
View File
@@ -0,0 +1,12 @@
# client/command/crack
## Overview
Implements the 'crack' command group for the Sliver client console. Handlers map Cobra invocations to crack workflows such as crack files.
## Go Files
- `commands.go` – Defines the crack command hierarchy, attaching operations for stations and file management.
- `crack-files.go` – Manages cracking asset uploads, listings, and removals, handling streaming transfers and chunking.
- `crack.go` – Implements station status reporting, health checks, and list rendering for distributed cracking nodes.
- `helpers.go` – Supplies completion helpers and byte formatting utilities for crack subcommands.
+151
View File
@@ -0,0 +1,151 @@
package crack
import (
"github.com/bishopfox/sliver/client/command/completers"
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/bishopfox/sliver/client/command/flags"
"github.com/bishopfox/sliver/client/command/help"
"github.com/bishopfox/sliver/client/console"
consts "github.com/bishopfox/sliver/client/constants"
)
// Commands returns the “ command and its subcommands.
func Commands(con *console.SliverClient) []*cobra.Command {
crackCmd := &cobra.Command{
Use: consts.CrackStr,
Short: "Crack: GPU password cracking",
Long: help.GetHelpFor([]string{consts.CrackStr}),
GroupID: consts.GenericHelpGroup,
Run: func(cmd *cobra.Command, args []string) {
CrackCmd(cmd, con, args)
},
}
flags.Bind("", true, crackCmd, func(f *pflag.FlagSet) {
f.Int64P("timeout", "t", flags.DefaultTimeout, "grpc timeout in seconds")
bindCrackFlags(f)
})
crackStationsCmd := &cobra.Command{
Use: consts.StationsStr,
Short: "Manage crackstations",
Long: help.GetHelpFor([]string{consts.CrackStr, consts.StationsStr}),
Run: func(cmd *cobra.Command, args []string) {
CrackStationsCmd(cmd, con, args)
},
}
flags.Bind("", false, crackStationsCmd, func(f *pflag.FlagSet) {
f.Bool("show-benchmarks", false, "show benchmark rates for crackstations")
})
crackCmd.AddCommand(crackStationsCmd)
wordlistsCmd := &cobra.Command{
Use: consts.WordlistsStr,
Short: "Manage wordlists",
Long: help.GetHelpFor([]string{consts.CrackStr, consts.WordlistsStr}),
Run: func(cmd *cobra.Command, args []string) {
CrackWordlistsCmd(cmd, con, args)
},
}
crackCmd.AddCommand(wordlistsCmd)
wordlistsAddCmd := &cobra.Command{
Use: consts.AddStr,
Short: "Add a wordlist",
Run: func(cmd *cobra.Command, args []string) {
CrackWordlistsAddCmd(cmd, con, args)
},
}
flags.Bind("", false, wordlistsAddCmd, func(f *pflag.FlagSet) {
f.StringP("name", "n", "", "wordlist name (blank = filename)")
})
carapace.Gen(wordlistsAddCmd).PositionalCompletion(carapace.ActionFiles().Usage("path to local wordlist file"))
completers.RegisterLocalFilePathPositionalCompletion(wordlistsAddCmd, 0)
wordlistsCmd.AddCommand(wordlistsAddCmd)
wordlistsRmCmd := &cobra.Command{
Use: consts.RmStr,
Short: "Remove a wordlist",
Run: func(cmd *cobra.Command, args []string) {
CrackWordlistsRmCmd(cmd, con, args)
},
}
wordlistsCmd.AddCommand(wordlistsRmCmd)
carapace.Gen(wordlistsRmCmd).PositionalCompletion(CrackWordlistCompleter(con).Usage("wordlist to remove"))
rulesCmd := &cobra.Command{
Use: consts.RulesStr,
Short: "Manage rule files",
Long: help.GetHelpFor([]string{consts.CrackStr, consts.RulesStr}),
Run: func(cmd *cobra.Command, args []string) {
CrackRulesCmd(cmd, con, args)
},
}
crackCmd.AddCommand(rulesCmd)
rulesAddCmd := &cobra.Command{
Use: consts.AddStr,
Short: "Add a rules file",
Long: help.GetHelpFor([]string{consts.CrackStr, consts.RulesStr, consts.AddStr}),
Run: func(cmd *cobra.Command, args []string) {
CrackRulesAddCmd(cmd, con, args)
},
}
flags.Bind("", false, rulesAddCmd, func(f *pflag.FlagSet) {
f.StringP("name", "n", "", "rules name (blank = filename)")
})
carapace.Gen(rulesAddCmd).PositionalCompletion(carapace.ActionFiles().Usage("path to local rules file"))
completers.RegisterLocalFilePathPositionalCompletion(rulesAddCmd, 0)
rulesCmd.AddCommand(rulesAddCmd)
rulesRmCmd := &cobra.Command{
Use: consts.RmStr,
Short: "Remove rules",
Long: help.GetHelpFor([]string{consts.CrackStr, consts.RulesStr, consts.RmStr}),
Run: func(cmd *cobra.Command, args []string) {
CrackRulesRmCmd(cmd, con, args)
},
}
carapace.Gen(rulesRmCmd).PositionalCompletion(CrackRulesCompleter(con).Usage("rules to remove"))
rulesCmd.AddCommand(rulesRmCmd)
hcstat2Cmd := &cobra.Command{
Use: consts.Hcstat2Str,
Short: "Manage markov hcstat2 files",
Long: help.GetHelpFor([]string{consts.CrackStr, consts.Hcstat2Str}),
Run: func(cmd *cobra.Command, args []string) {
CrackHcstat2Cmd(cmd, con, args)
},
}
crackCmd.AddCommand(hcstat2Cmd)
hcstat2AddCmd := &cobra.Command{
Use: consts.AddStr,
Short: "Add a hcstat2 file",
Long: help.GetHelpFor([]string{consts.CrackStr, consts.Hcstat2Str, consts.AddStr}),
Run: func(cmd *cobra.Command, args []string) {
CrackHcstat2AddCmd(cmd, con, args)
},
}
flags.Bind("", false, hcstat2AddCmd, func(f *pflag.FlagSet) {
f.StringP("name", "n", "", "hcstat2 name (blank = filename)")
})
carapace.Gen(hcstat2AddCmd).PositionalCompletion(carapace.ActionFiles().Usage("path to local hcstat2 file"))
completers.RegisterLocalFilePathPositionalCompletion(hcstat2AddCmd, 0)
hcstat2Cmd.AddCommand(hcstat2AddCmd)
hcstat2RmCmd := &cobra.Command{
Use: consts.RmStr,
Short: "Remove hcstat2 file",
Long: help.GetHelpFor([]string{consts.CrackStr, consts.Hcstat2Str, consts.RmStr}),
Run: func(cmd *cobra.Command, args []string) {
CrackHcstat2RmCmd(cmd, con, args)
},
}
carapace.Gen(hcstat2RmCmd).PositionalCompletion(CrackHcstat2Completer(con).Usage("hcstat2 to remove"))
hcstat2Cmd.AddCommand(hcstat2RmCmd)
return []*cobra.Command{crackCmd}
}
+326
View File
@@ -0,0 +1,326 @@
package crack
import (
"fmt"
"strconv"
"strings"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
func shouldRunCrack(cmd *cobra.Command, args []string) bool {
if len(args) > 0 {
return true
}
hasFlag := false
cmd.Flags().VisitAll(func(flag *pflag.Flag) {
if flag.Changed && flag.Name != "timeout" {
hasFlag = true
}
})
return hasFlag
}
func buildCrackCommand(cmd *cobra.Command, args []string) (*clientpb.CrackCommand, error) {
flags := cmd.Flags()
req := &clientpb.CrackCommand{}
if flags.Changed("attack-mode") {
raw, _ := flags.GetString("attack-mode")
attackMode, err := parseCrackAttackMode(raw)
if err != nil {
return nil, err
}
req.AttackMode = attackMode
}
if flags.Changed("hash-type") {
raw, _ := flags.GetString("hash-type")
hashType, err := parseHashType(raw)
if err != nil {
return nil, err
}
req.HashType = hashType
}
hashes, _ := flags.GetStringSlice("hash")
if len(args) > 0 {
hashes = append(hashes, args...)
}
req.Hashes = hashes
req.Quiet, _ = flags.GetBool("quiet")
req.HexCharset, _ = flags.GetBool("hex-charset")
req.HexSalt, _ = flags.GetBool("hex-salt")
req.HexWordlist, _ = flags.GetBool("hex-wordlist")
req.Force, _ = flags.GetBool("force")
req.DeprecatedCheckDisable, _ = flags.GetBool("deprecated-check-disable")
req.Status, _ = flags.GetBool("status")
req.StatusJSON, _ = flags.GetBool("status-json")
req.StatusTimer, _ = flags.GetUint32("status-timer")
req.StdinTimeoutAbort, _ = flags.GetUint32("stdin-timeout-abort")
req.MachineReadable, _ = flags.GetBool("machine-readable")
req.KeepGuessing, _ = flags.GetBool("keep-guessing")
req.SelfTestDisable, _ = flags.GetBool("self-test-disable")
req.Loopback, _ = flags.GetBool("loopback")
if raw, _ := flags.GetString("markov-hcstat2"); raw != "" {
req.MarkovHcstat2 = []byte(raw)
}
req.MarkovDisable, _ = flags.GetBool("markov-disable")
req.MarkovClassic, _ = flags.GetBool("markov-classic")
req.MarkovInverse, _ = flags.GetBool("markov-inverse")
req.MarkovThreshold, _ = flags.GetUint32("markov-threshold")
req.Runtime, _ = flags.GetUint32("runtime")
req.Session, _ = flags.GetString("session")
req.Restore, _ = flags.GetBool("restore")
req.RestoreDisable, _ = flags.GetBool("restore-disable")
if raw, _ := flags.GetString("restore-file"); raw != "" {
req.RestoreFile = []byte(raw)
}
if formats, _ := flags.GetStringSlice("outfile-format"); len(formats) > 0 {
for _, raw := range formats {
format, err := parseCrackOutfileFormat(raw)
if err != nil {
return nil, err
}
req.OutfileFormat = append(req.OutfileFormat, format)
}
}
req.OutfileAutohexDisable, _ = flags.GetBool("outfile-autohex-disable")
req.OutfileCheckTimer, _ = flags.GetUint32("outfile-check-timer")
req.WordlistAutohexDisable, _ = flags.GetBool("wordlist-autohex-disable")
req.Separator, _ = flags.GetString("separator")
req.Stdout, _ = flags.GetBool("stdout")
req.Show, _ = flags.GetBool("show")
req.Left, _ = flags.GetBool("left")
req.Username, _ = flags.GetBool("username")
req.Remove, _ = flags.GetBool("remove")
req.RemoveTimer, _ = flags.GetUint32("remove-timer")
req.PotfileDisable, _ = flags.GetBool("potfile-disable")
if raw, _ := flags.GetString("potfile"); raw != "" {
req.Potfile = []byte(raw)
}
if flags.Changed("encoding-from") {
raw, _ := flags.GetString("encoding-from")
enc, err := parseCrackEncoding(raw)
if err != nil {
return nil, err
}
req.EncodingFrom = enc
}
if flags.Changed("encoding-to") {
raw, _ := flags.GetString("encoding-to")
enc, err := parseCrackEncoding(raw)
if err != nil {
return nil, err
}
req.EncodingTo = enc
}
req.DebugMode, _ = flags.GetUint32("debug-mode")
req.LogfileDisable, _ = flags.GetBool("logfile-disable")
req.HccapxMessagePair, _ = flags.GetUint32("hccapx-message-pair")
req.NonceErrorCorrections, _ = flags.GetUint32("nonce-error-corrections")
if raw, _ := flags.GetString("keyboard-layout-mapping"); raw != "" {
req.KeyboardLayoutMapping = []byte(raw)
}
req.Benchmark, _ = flags.GetBool("benchmark")
req.BenchmarkAll, _ = flags.GetBool("benchmark-all")
req.SpeedOnly, _ = flags.GetBool("speed-only")
req.ProgressOnly, _ = flags.GetBool("progress-only")
req.SegmentSize, _ = flags.GetUint32("segment-size")
req.BitmapMin, _ = flags.GetUint32("bitmap-min")
req.BitmapMax, _ = flags.GetUint32("bitmap-max")
req.CPUAffinity = uintSliceToUint32(flags, "cpu-affinity")
req.HookThreads, _ = flags.GetUint32("hook-threads")
req.HashInfo, _ = flags.GetBool("hash-info")
req.BackendIgnoreCUDA, _ = flags.GetBool("backend-ignore-cuda")
req.BackendIgnoreHip, _ = flags.GetBool("backend-ignore-hip")
req.BackendIgnoreMetal, _ = flags.GetBool("backend-ignore-metal")
req.BackendIgnoreOpenCL, _ = flags.GetBool("backend-ignore-opencl")
req.BackendInfo, _ = flags.GetBool("backend-info")
req.BackendDevices = uintSliceToUint32(flags, "backend-devices")
req.OpenCLDeviceTypes = uintSliceToUint32(flags, "opencl-device-types")
req.OptimizedKernelEnable, _ = flags.GetBool("optimized-kernel-enable")
req.MultiplyAccelDisabled, _ = flags.GetBool("multiply-accel-disabled")
if flags.Changed("workload-profile") {
raw, _ := flags.GetString("workload-profile")
profile, err := parseCrackWorkloadProfile(raw)
if err != nil {
return nil, err
}
req.WorkloadProfile = profile
}
req.KernelAccel, _ = flags.GetUint32("kernel-accel")
req.KernelLoops, _ = flags.GetUint32("kernel-loops")
req.KernelThreads, _ = flags.GetUint32("kernel-threads")
req.BackendVectorWidth, _ = flags.GetUint32("backend-vector-width")
req.SpinDamp, _ = flags.GetUint32("spin-damp")
req.HwmonDisable, _ = flags.GetBool("hwmon-disable")
req.HwmonTempAbort, _ = flags.GetUint32("hwmon-temp-abort")
req.ScryptTMTO, _ = flags.GetUint32("scrypt-tmto")
req.Skip, _ = flags.GetUint64("skip")
req.Limit, _ = flags.GetUint64("limit")
req.Keyspace, _ = flags.GetBool("keyspace")
if raw, _ := flags.GetString("rules-file"); raw != "" {
req.RulesFile = []byte(raw)
}
req.GenerateRules, _ = flags.GetUint32("generate-rules")
req.GenerateRulesFunMin, _ = flags.GetUint32("generate-rules-fun-min")
req.GenerateRulesFunMax, _ = flags.GetUint32("generate-rules-fun-max")
req.GenerateRulesFuncSel, _ = flags.GetString("generate-rules-func-sel")
req.GenerateRulesSeed, _ = flags.GetInt32("generate-rules-seed")
req.CustomCharset1, _ = flags.GetString("custom-charset1")
req.CustomCharset2, _ = flags.GetString("custom-charset2")
req.CustomCharset3, _ = flags.GetString("custom-charset3")
req.CustomCharset4, _ = flags.GetString("custom-charset4")
req.Identify, _ = flags.GetString("identify")
req.Increment, _ = flags.GetBool("increment")
req.IncrementMin, _ = flags.GetUint32("increment-min")
req.IncrementMax, _ = flags.GetUint32("increment-max")
req.SlowCandidates, _ = flags.GetBool("slow-candidates")
req.BrainServer, _ = flags.GetBool("brain-server")
req.BrainServerTimer, _ = flags.GetUint32("brain-server-timer")
req.BrainClient, _ = flags.GetBool("brain-client")
req.BrainClientFeatures, _ = flags.GetString("brain-client-features")
req.BrainHost, _ = flags.GetString("brain-host")
req.BrainPort, _ = flags.GetUint32("brain-port")
req.BrainPassword, _ = flags.GetString("brain-password")
req.BrainSession, _ = flags.GetString("brain-session")
req.BrainSessionWhitelist, _ = flags.GetString("brain-session-whitelist")
return req, nil
}
func uintSliceToUint32(flags *pflag.FlagSet, name string) []uint32 {
values, _ := flags.GetUintSlice(name)
if len(values) == 0 {
return nil
}
out := make([]uint32, len(values))
for i, value := range values {
out[i] = uint32(value)
}
return out
}
func parseCrackAttackMode(raw string) (clientpb.CrackAttackMode, error) {
if raw == "" {
return clientpb.CrackAttackMode_STRAIGHT, nil
}
if numeric, err := strconv.ParseInt(raw, 10, 32); err == nil {
return clientpb.CrackAttackMode(numeric), nil
}
normalized := strings.ToLower(strings.TrimSpace(raw))
normalized = strings.NewReplacer("-", "_", " ", "_").Replace(normalized)
switch normalized {
case "straight":
return clientpb.CrackAttackMode_STRAIGHT, nil
case "combination":
return clientpb.CrackAttackMode_COMBINATION, nil
case "bruteforce", "brute_force", "brute-force":
return clientpb.CrackAttackMode_BRUTEFORCE, nil
case "hybrid_wordlist_mask":
return clientpb.CrackAttackMode_HYBRID_WORDLIST_MASK, nil
case "hybrid_mask_wordlist":
return clientpb.CrackAttackMode_HYBRID_MASK_WORDLIST, nil
case "association":
return clientpb.CrackAttackMode_ASSOCIATION, nil
case "no_attack", "none":
return clientpb.CrackAttackMode_NO_ATTACK, nil
default:
return clientpb.CrackAttackMode_STRAIGHT, fmt.Errorf("unknown attack mode: %s", raw)
}
}
func parseHashType(raw string) (clientpb.HashType, error) {
if raw == "" {
return clientpb.HashType_MD5, nil
}
if numeric, err := strconv.ParseInt(raw, 10, 32); err == nil {
return clientpb.HashType(numeric), nil
}
key := normalizeEnumKey(raw)
if value, ok := clientpb.HashType_value[key]; ok {
return clientpb.HashType(value), nil
}
return clientpb.HashType_MD5, fmt.Errorf("unknown hash type: %s", raw)
}
func parseCrackEncoding(raw string) (clientpb.CrackEncoding, error) {
if raw == "" {
return clientpb.CrackEncoding_INVALID_ENCODING, nil
}
if numeric, err := strconv.ParseInt(raw, 10, 32); err == nil {
return clientpb.CrackEncoding(numeric), nil
}
key := normalizeEnumKey(raw)
if value, ok := clientpb.CrackEncoding_value[key]; ok {
return clientpb.CrackEncoding(value), nil
}
return clientpb.CrackEncoding_INVALID_ENCODING, fmt.Errorf("unknown encoding: %s", raw)
}
func parseCrackOutfileFormat(raw string) (clientpb.CrackOutfileFormat, error) {
if raw == "" {
return clientpb.CrackOutfileFormat_INVALID_FORMAT, nil
}
if numeric, err := strconv.ParseInt(raw, 10, 32); err == nil {
return clientpb.CrackOutfileFormat(numeric), nil
}
key := normalizeEnumKey(raw)
if value, ok := clientpb.CrackOutfileFormat_value[key]; ok {
return clientpb.CrackOutfileFormat(value), nil
}
return clientpb.CrackOutfileFormat_INVALID_FORMAT, fmt.Errorf("unknown outfile format: %s", raw)
}
func parseCrackWorkloadProfile(raw string) (clientpb.CrackWorkloadProfile, error) {
if raw == "" {
return clientpb.CrackWorkloadProfile_INVALID_WORKLOAD_PROFILE, nil
}
if numeric, err := strconv.ParseInt(raw, 10, 32); err == nil {
return clientpb.CrackWorkloadProfile(numeric), nil
}
key := normalizeEnumKey(raw)
if value, ok := clientpb.CrackWorkloadProfile_value[key]; ok {
return clientpb.CrackWorkloadProfile(value), nil
}
return clientpb.CrackWorkloadProfile_INVALID_WORKLOAD_PROFILE, fmt.Errorf("unknown workload profile: %s", raw)
}
func normalizeEnumKey(value string) string {
if value == "" {
return ""
}
var builder strings.Builder
builder.Grow(len(value))
underscore := false
for i := 0; i < len(value); i++ {
ch := value[i]
if (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') {
if ch >= 'a' && ch <= 'z' {
ch -= 'a' - 'A'
}
builder.WriteByte(ch)
underscore = false
continue
}
if !underscore {
builder.WriteByte('_')
underscore = true
}
}
return strings.Trim(builder.String(), "_")
}
+504
View File
@@ -0,0 +1,504 @@
package crack
/*
Sliver Implant Framework
Copyright (C) 2022 Bishop Fox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import (
"context"
"crypto/sha256"
"encoding/hex"
"io"
"os"
"github.com/bishopfox/sliver/client/command/settings"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/bishopfox/sliver/util"
"github.com/jedib0t/go-pretty/v6/table"
"github.com/klauspost/compress/zstd"
"github.com/spf13/cobra"
)
// CrackWordlistsCmd - Manage GPU cracking stations.
func CrackWordlistsCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
wordlists, err := con.Rpc.CrackFilesList(context.Background(), &clientpb.CrackFile{Type: clientpb.CrackFileType_WORDLIST})
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
if len(wordlists.Files) == 0 {
con.PrintInfof("No wordlists, add some using `crack wordlists add`\n")
} else {
PrintCrackFiles(wordlists, con)
con.Println()
con.Printf("Disk quota %02.2f%% - %s of %s\n",
(float64(wordlists.CurrentDiskUsage)/float64(wordlists.MaxDiskUsage))*100,
util.ByteCountBinary(wordlists.CurrentDiskUsage),
util.ByteCountBinary(wordlists.MaxDiskUsage),
)
}
}
// CrackRulesCmd - Manage GPU cracking stations.
func CrackRulesCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
rules, err := con.Rpc.CrackFilesList(context.Background(), &clientpb.CrackFile{Type: clientpb.CrackFileType_RULES})
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
if len(rules.Files) == 0 {
con.PrintInfof("No rules files, add some using `crack rules add`\n")
} else {
PrintCrackFiles(rules, con)
con.Println()
con.Printf("Disk quota %02.2f%% - %s of %s\n",
(float64(rules.CurrentDiskUsage)/float64(rules.MaxDiskUsage))*100,
util.ByteCountBinary(rules.CurrentDiskUsage),
util.ByteCountBinary(rules.MaxDiskUsage),
)
}
}
// CrackHcstat2Cmd - Manage GPU cracking stations.
func CrackHcstat2Cmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
hcstat2, err := con.Rpc.CrackFilesList(context.Background(), &clientpb.CrackFile{Type: clientpb.CrackFileType_MARKOV_HCSTAT2})
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
if len(hcstat2.Files) == 0 {
con.PrintInfof("No hcstat2 files, add some using `crack hcstat2 add`\n")
} else {
PrintCrackFiles(hcstat2, con)
con.Println()
con.Printf("Disk quota %02.2f%% - %s of %s\n",
(float64(hcstat2.CurrentDiskUsage)/float64(hcstat2.MaxDiskUsage))*100,
util.ByteCountBinary(hcstat2.CurrentDiskUsage),
util.ByteCountBinary(hcstat2.MaxDiskUsage),
)
}
}
func PrintCrackFiles(crackFiles *clientpb.CrackFiles, con *console.SliverClient) {
tw := table.NewWriter()
tw.SetStyle(settings.GetTableStyle(con))
tw.AppendHeader(table.Row{"Name", "Size"})
for _, file := range crackFiles.Files {
tw.AppendRow(table.Row{file.Name, util.ByteCountBinary(file.UncompressedSize)})
}
con.Printf("%s\n", tw.Render())
}
func PrintCrackFilesByType(crackFiles *clientpb.CrackFiles, con *console.SliverClient) {
wordlistTable := table.NewWriter()
wordlistTable.SetTitle(console.StyleBold.Render("Wordlists"))
wordlistTable.SetStyle(settings.GetTableStyle(con))
wordlistTable.AppendHeader(table.Row{"Name", "Size"})
rulesTable := table.NewWriter()
rulesTable.SetTitle(console.StyleBold.Render("Rules"))
rulesTable.SetStyle(settings.GetTableStyle(con))
rulesTable.AppendHeader(table.Row{"Name", "Size"})
hcTable := table.NewWriter()
hcTable.SetTitle(console.StyleBold.Render("Markov Hcstat2"))
hcTable.SetStyle(settings.GetTableStyle(con))
hcTable.AppendHeader(table.Row{"Name", "Size"})
wordlists := 0
rules := 0
hc := 0
for _, file := range crackFiles.Files {
switch file.Type {
case clientpb.CrackFileType_WORDLIST:
wordlistTable.AppendRow(table.Row{file.Name, util.ByteCountBinary(file.UncompressedSize)})
wordlists++
case clientpb.CrackFileType_RULES:
rulesTable.AppendRow(table.Row{file.Name, util.ByteCountBinary(file.UncompressedSize)})
rules++
case clientpb.CrackFileType_MARKOV_HCSTAT2:
hcTable.AppendRow(table.Row{file.Name, util.ByteCountBinary(file.UncompressedSize)})
hc++
}
}
if wordlists > 0 {
con.Printf("%s\n", wordlistTable.Render())
}
if rules > 0 {
if wordlists > 0 {
con.Println()
}
con.Printf("%s\n", rulesTable.Render())
}
if hc > 0 {
if wordlists > 0 || rules > 0 {
con.Println()
}
con.Printf("%s\n", hcTable.Render())
}
con.Println()
con.Printf("%d wordlists, %d rules, %d hcstat2 files\n", wordlists, rules, hc)
con.Printf("Disk quota %02.2f%% - %s of %s\n",
(float64(crackFiles.CurrentDiskUsage)/float64(crackFiles.MaxDiskUsage))*100,
util.ByteCountBinary(crackFiles.CurrentDiskUsage),
util.ByteCountBinary(crackFiles.MaxDiskUsage),
)
}
// CrackWordlistsAddCmd - Manage GPU cracking stations.
func CrackWordlistsAddCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
name, _ := cmd.Flags().GetString("name")
var localPath string
if len(args) > 0 {
localPath = args[0]
}
if localPath == "" {
con.PrintErrorf("No path specified, see --help\n")
return
}
wordlistStat, err := os.Stat(localPath)
if os.IsNotExist(err) || wordlistStat.IsDir() {
con.PrintErrorf("File does not exist: %s\n", localPath)
return
}
if name == "" {
name = wordlistStat.Name()
}
wordlist, err := os.Open(localPath)
if err != nil {
con.PrintErrorf("Failed to open file: %s\n", err)
return
}
defer wordlist.Close()
crackFile, err := con.Rpc.CrackFileCreate(context.Background(), &clientpb.CrackFile{
Type: clientpb.CrackFileType_WORDLIST,
Name: name,
UncompressedSize: wordlistStat.Size(),
IsCompressed: true,
})
if err != nil {
con.PrintErrorf("Failed to create file: %s\n", err)
return
}
con.PrintInfof("Adding new wordlist '%s' (uncompressed: %s)\n",
crackFile.Name,
util.ByteCountBinary(crackFile.UncompressedSize),
)
addCrackFile(wordlist, crackFile, con)
}
// CrackRulesAddCmd - add a rules file.
func CrackRulesAddCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
name, _ := cmd.Flags().GetString("name")
var localPath string
if len(args) > 0 {
localPath = args[0]
}
if localPath == "" {
con.PrintErrorf("No path specified, see --help\n")
return
}
rulesStat, err := os.Stat(localPath)
if os.IsNotExist(err) || rulesStat.IsDir() {
con.PrintErrorf("File does not exist: %s\n", localPath)
return
}
if name == "" {
name = rulesStat.Name()
}
rules, err := os.Open(localPath)
if err != nil {
con.PrintErrorf("Failed to open file: %s\n", err)
return
}
defer rules.Close()
crackFile, err := con.Rpc.CrackFileCreate(context.Background(), &clientpb.CrackFile{
Type: clientpb.CrackFileType_RULES,
Name: name,
UncompressedSize: rulesStat.Size(),
IsCompressed: true,
})
if err != nil {
con.PrintErrorf("Failed to create file: %s\n", err)
return
}
con.PrintInfof("Adding new rules file '%s' (uncompressed: %s)\n",
crackFile.Name,
util.ByteCountBinary(crackFile.UncompressedSize),
)
addCrackFile(rules, crackFile, con)
}
// CrackHcstat2AddCmd - add a hcstat2 file.
func CrackHcstat2AddCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
name, _ := cmd.Flags().GetString("name")
var localPath string
if len(args) > 0 {
localPath = args[0]
}
if localPath == "" {
con.PrintErrorf("No path specified, see --help\n")
return
}
hcstat2Stat, err := os.Stat(localPath)
if os.IsNotExist(err) || hcstat2Stat.IsDir() {
con.PrintErrorf("File does not exist: %s\n", localPath)
return
}
if name == "" {
name = hcstat2Stat.Name()
}
hcstat2, err := os.Open(localPath)
if err != nil {
con.PrintErrorf("Failed to open file: %s\n", err)
return
}
defer hcstat2.Close()
crackFile, err := con.Rpc.CrackFileCreate(context.Background(), &clientpb.CrackFile{
Type: clientpb.CrackFileType_MARKOV_HCSTAT2,
Name: name,
UncompressedSize: hcstat2Stat.Size(),
IsCompressed: true,
})
if err != nil {
con.PrintErrorf("Failed to create file: %s\n", err)
return
}
con.PrintInfof("Adding new markov hcstat2 file '%s' (uncompressed: %s)\n",
crackFile.Name,
util.ByteCountBinary(crackFile.UncompressedSize),
)
addCrackFile(hcstat2, crackFile, con)
}
func addCrackFile(localFile *os.File, crackFile *clientpb.CrackFile, con *console.SliverClient) {
digest := sha256.New()
wordlistReader := io.TeeReader(localFile, digest)
chunks := make(chan []byte, 1) // Chunks are in-memory!
var chunkReaderErr error
go func() {
chunkReaderErr = chunkReader(wordlistReader, crackFile.ChunkSize, chunks)
}()
n := uint32(0)
total := int64(0)
errors := []error{}
for chunk := range chunks {
total += int64(len(chunk))
con.PrintInfof("Uploading %s (chunk %d - %s) ...",
util.ByteCountBinary(total),
n,
util.ByteCountBinary(int64(len(chunk))),
)
_, err := con.Rpc.CrackFileChunkUpload(context.Background(), &clientpb.CrackFileChunk{
CrackFileID: crackFile.ID,
N: n,
Data: chunk,
})
n++
if err != nil {
errors = append(errors, err)
continue
}
}
con.Printf(console.Clearln + "\r")
if chunkReaderErr != nil {
con.PrintErrorf("Failed to read file: %s\n", chunkReaderErr)
return
}
if len(errors) > 0 {
for _, err := range errors {
con.PrintErrorf("Failed to upload chunk: %s\n", err)
}
return
}
_, err := con.Rpc.CrackFileComplete(context.Background(), &clientpb.CrackFile{
ID: crackFile.ID,
Sha2_256: hex.EncodeToString(digest.Sum(nil)),
})
if err != nil {
con.PrintErrorf("Failed to complete file upload: %s\n", err)
return
}
con.PrintInfof("Upload completed (compressed: %s)\n", util.ByteCountBinary(total))
}
func chunkReader(wordlistReader io.Reader, chunkSize int64, chunks chan []byte) error {
defer close(chunks)
start := int64(0)
tmpFile, err := os.CreateTemp("", "sliver-wordlist")
if err != nil {
return err
}
defer tmpFile.Close()
compressor, _ := zstd.NewWriter(tmpFile, zstd.WithEncoderLevel(zstd.SpeedBetterCompression))
for {
readBuf := make([]byte, 32*1024*1024) // 32MB
readN, readErr := wordlistReader.Read(readBuf)
if readErr != nil && readErr != io.EOF {
return err
}
if readN != 0 {
_, err := compressor.Write(readBuf[:readN])
if err != nil {
return err
}
compressor.Flush()
tmpFileStat, err := os.Stat(tmpFile.Name())
if err != nil {
return err
}
if tmpFileStat.Size()-start >= chunkSize {
stop := start + chunkSize
chunk, err := readChunkAt(tmpFile, start, chunkSize)
if err != nil {
return err
}
chunks <- chunk
start = stop
}
}
if readErr == io.EOF {
chunk, err := readChunkAt(tmpFile, start, chunkSize)
if err != nil {
return err
}
chunks <- chunk
return nil
}
}
}
func readChunkAt(tmpFile *os.File, offset int64, chunkSize int64) ([]byte, error) {
chunkBuf := make([]byte, chunkSize)
n, err := tmpFile.ReadAt(chunkBuf, offset)
if err != nil && err != io.EOF {
return nil, err
}
return chunkBuf[:n], nil
}
// CrackWordlistsRmCmd - Manage GPU cracking stations.
func CrackWordlistsRmCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
var wordlistName string
if len(args) > 0 {
wordlistName = args[0]
}
if wordlistName == "" {
con.PrintErrorf("No name specified, see --help\n")
return
}
wordlists, err := con.Rpc.CrackFilesList(context.Background(), &clientpb.CrackFile{Type: clientpb.CrackFileType_WORDLIST})
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
found := false
for _, wordlist := range wordlists.Files {
if wordlist.Name == wordlistName && wordlist.Type == clientpb.CrackFileType_WORDLIST {
found = true
_, err := con.Rpc.CrackFileDelete(context.Background(), wordlist)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
break
}
}
if found {
con.PrintInfof("Removed wordlist: %s\n", wordlistName)
} else {
con.PrintErrorf("Wordlist not found: %s\n", wordlistName)
}
}
// CrackRulesRmCmd - Manage GPU cracking stations.
func CrackRulesRmCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
var rulesName string
if len(args) > 0 {
rulesName = args[0]
}
if rulesName == "" {
con.PrintErrorf("No name specified, see --help\n")
return
}
rules, err := con.Rpc.CrackFilesList(context.Background(), &clientpb.CrackFile{Type: clientpb.CrackFileType_RULES})
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
found := false
for _, rulesFile := range rules.Files {
if rulesFile.Name == rulesName && rulesFile.Type == clientpb.CrackFileType_RULES {
found = true
_, err := con.Rpc.CrackFileDelete(context.Background(), rulesFile)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
break
}
}
if found {
con.PrintInfof("Removed rules: %s\n", rulesName)
} else {
con.PrintErrorf("Rules not found: %s\n", rulesName)
}
}
// CrackHcstat2RmCmd - remove a hcstat2 file.
func CrackHcstat2RmCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
var hcstat2Name string
if len(args) > 0 {
hcstat2Name = args[0]
}
if hcstat2Name == "" {
con.PrintErrorf("No name specified, see --help\n")
return
}
hcstat2s, err := con.Rpc.CrackFilesList(context.Background(), &clientpb.CrackFile{Type: clientpb.CrackFileType_MARKOV_HCSTAT2})
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
found := false
for _, hcstat2File := range hcstat2s.Files {
if hcstat2File.Name == hcstat2Name && hcstat2File.Type == clientpb.CrackFileType_MARKOV_HCSTAT2 {
found = true
_, err := con.Rpc.CrackFileDelete(context.Background(), hcstat2File)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
break
}
}
if found {
con.PrintInfof("Removed hcstat2: %s\n", hcstat2Name)
} else {
con.PrintErrorf("Hcstat2 not found: %s\n", hcstat2Name)
}
}
+108
View File
@@ -0,0 +1,108 @@
package crack
import "github.com/spf13/pflag"
func bindCrackFlags(f *pflag.FlagSet) {
f.String("attack-mode", "", "crack attack mode (straight, combination, bruteforce, hybrid-wordlist-mask, hybrid-mask-wordlist, association, no-attack, or numeric)")
f.String("hash-type", "", "hashcat hash type (number or enum name)")
f.StringSlice("hash", nil, "hashes to crack (repeatable)")
f.Bool("quiet", false, "quiet mode")
f.Bool("hex-charset", false, "treat charset as hex")
f.Bool("hex-salt", false, "treat salt as hex")
f.Bool("hex-wordlist", false, "treat wordlist as hex")
f.Bool("force", false, "ignore warnings")
f.Bool("deprecated-check-disable", false, "disable deprecated check")
f.Bool("status", false, "enable status")
f.Bool("status-json", false, "emit status in JSON")
f.Uint32("status-timer", 0, "status timer interval (seconds)")
f.Uint32("stdin-timeout-abort", 0, "abort after stdin timeout (seconds)")
f.Bool("machine-readable", false, "machine readable output")
f.Bool("keep-guessing", false, "keep guessing")
f.Bool("self-test-disable", false, "disable self-test")
f.Bool("loopback", false, "use loopback mode")
f.String("markov-hcstat2", "", "markov hcstat2 filename or identifier")
f.Bool("markov-disable", false, "disable markov mode")
f.Bool("markov-classic", false, "use classic markov")
f.Bool("markov-inverse", false, "use inverse markov")
f.Uint32("markov-threshold", 0, "markov threshold")
f.Uint32("runtime", 0, "runtime in seconds")
f.String("session", "", "session name")
f.Bool("restore", false, "restore session")
f.Bool("restore-disable", false, "disable restore")
f.String("restore-file", "", "restore file path or identifier")
f.StringSlice("outfile-format", nil, "outfile formats (hash-salt, plain, hex-plain, crack-pos, timestamp-absolute, timestamp-relative, or numeric)")
f.Bool("outfile-autohex-disable", false, "disable outfile autohex")
f.Uint32("outfile-check-timer", 0, "outfile check timer interval (seconds)")
f.Bool("wordlist-autohex-disable", false, "disable wordlist autohex")
f.String("separator", "", "separator character")
f.Bool("stdout", false, "stdout output")
f.Bool("show", false, "show cracked hashes")
f.Bool("left", false, "show uncracked hashes")
f.Bool("username", false, "enable username handling")
f.Bool("remove", false, "remove cracked hashes")
f.Uint32("remove-timer", 0, "remove timer interval (seconds)")
f.Bool("potfile-disable", false, "disable potfile")
f.String("potfile", "", "potfile path or identifier")
f.String("encoding-from", "", "input encoding (iso-8859-15, utf-32le, or numeric)")
f.String("encoding-to", "", "output encoding (iso-8859-15, utf-32le, or numeric)")
f.Uint32("debug-mode", 0, "debug mode mask")
f.Bool("logfile-disable", false, "disable logfile")
f.Uint32("hccapx-message-pair", 0, "hccapx message pair")
f.Uint32("nonce-error-corrections", 0, "nonce error corrections")
f.String("keyboard-layout-mapping", "", "keyboard layout mapping file or identifier")
f.Bool("benchmark", false, "run benchmark")
f.Bool("benchmark-all", false, "run full benchmark")
f.Bool("speed-only", false, "show speed only")
f.Bool("progress-only", false, "show progress only")
f.Uint32("segment-size", 0, "segment size")
f.Uint32("bitmap-min", 0, "bitmap min")
f.Uint32("bitmap-max", 0, "bitmap max")
f.UintSlice("cpu-affinity", nil, "CPU affinity list")
f.Uint32("hook-threads", 0, "hook threads")
f.Bool("hash-info", false, "show hash information")
f.Bool("backend-ignore-cuda", false, "ignore CUDA backend")
f.Bool("backend-ignore-hip", false, "ignore HIP backend")
f.Bool("backend-ignore-metal", false, "ignore Metal backend")
f.Bool("backend-ignore-opencl", false, "ignore OpenCL backend")
f.Bool("backend-info", false, "show backend info")
f.UintSlice("backend-devices", nil, "backend device IDs")
f.UintSlice("opencl-device-types", nil, "OpenCL device types")
f.Bool("optimized-kernel-enable", false, "enable optimized kernels")
f.Bool("multiply-accel-disabled", false, "disable multiply accel")
f.String("workload-profile", "", "workload profile (low, default, high, nightmare, or numeric)")
f.Uint32("kernel-accel", 0, "kernel acceleration")
f.Uint32("kernel-loops", 0, "kernel loops")
f.Uint32("kernel-threads", 0, "kernel threads")
f.Uint32("backend-vector-width", 0, "backend vector width")
f.Uint32("spin-damp", 0, "spin damp")
f.Bool("hwmon-disable", false, "disable hardware monitoring")
f.Uint32("hwmon-temp-abort", 0, "hardware monitor temperature abort")
f.Uint32("scrypt-tmto", 0, "scrypt tmto")
f.Uint64("skip", 0, "skip count")
f.Uint64("limit", 0, "limit count")
f.Bool("keyspace", false, "show keyspace")
f.String("rules-file", "", "rules file path or identifier")
f.Uint32("generate-rules", 0, "generate rules")
f.Uint32("generate-rules-fun-min", 0, "generate rules function min")
f.Uint32("generate-rules-fun-max", 0, "generate rules function max")
f.String("generate-rules-func-sel", "", "generate rules function selection")
f.Int32("generate-rules-seed", 0, "generate rules seed")
f.String("custom-charset1", "", "custom charset 1")
f.String("custom-charset2", "", "custom charset 2")
f.String("custom-charset3", "", "custom charset 3")
f.String("custom-charset4", "", "custom charset 4")
f.String("identify", "", "identify hash")
f.Bool("increment", false, "incremental mode")
f.Uint32("increment-min", 0, "increment min")
f.Uint32("increment-max", 0, "increment max")
f.Bool("slow-candidates", false, "slow candidates")
f.Bool("brain-server", false, "brain server mode")
f.Uint32("brain-server-timer", 0, "brain server timer")
f.Bool("brain-client", false, "brain client mode")
f.String("brain-client-features", "", "brain client features")
f.String("brain-host", "", "brain host")
f.Uint32("brain-port", 0, "brain port")
f.String("brain-password", "", "brain password")
f.String("brain-session", "", "brain session")
f.String("brain-session-whitelist", "", "brain session whitelist")
}
+191
View File
@@ -0,0 +1,191 @@
package crack
/*
Sliver Implant Framework
Copyright (C) 2022 Bishop Fox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import (
"context"
"fmt"
"sort"
"time"
"github.com/jedib0t/go-pretty/v6/table"
"github.com/spf13/cobra"
"github.com/bishopfox/sliver/client/command/settings"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/bishopfox/sliver/protobuf/commonpb"
)
// CrackCmd - GPU password cracking interface
func CrackCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
if shouldRunCrack(cmd, args) {
crackCmd, err := buildCrackCommand(cmd, args)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
timeoutSeconds, _ := cmd.Flags().GetInt64("timeout")
ctx := context.Background()
if timeoutSeconds > 0 {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, time.Duration(timeoutSeconds)*time.Second)
defer cancel()
}
resp, err := con.Rpc.Crack(ctx, crackCmd)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
if resp == nil || resp.Job == nil {
con.PrintInfof("Crack request submitted\n")
return
}
con.PrintInfof("Crack job %s created (status: %s)\n", resp.Job.ID, resp.Job.Status.String())
if resp.Job.Err != "" {
con.PrintErrorf("Crack job error: %s\n", resp.Job.Err)
}
return
}
if !AreCrackersOnline(con) {
PrintNoCrackstations(con)
} else {
crackers, err := con.Rpc.Crackstations(context.Background(), &commonpb.Empty{})
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
con.PrintInfof("%d crackstation(s) connected to server\n", len(crackers.Crackstations))
}
crackFiles, err := con.Rpc.CrackFilesList(context.Background(), &clientpb.CrackFile{})
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
if len(crackFiles.Files) == 0 {
con.PrintInfof("No crack files uploaded to server\n")
} else {
con.Println()
PrintCrackFilesByType(crackFiles, con)
}
}
// CrackStationsCmd - Manage GPU cracking stations
func CrackStationsCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
crackers, err := con.Rpc.Crackstations(context.Background(), &commonpb.Empty{})
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
showBenchmarks, _ := cmd.Flags().GetBool("show-benchmarks")
if len(crackers.Crackstations) == 0 {
PrintNoCrackstations(con)
} else {
PrintCrackers(crackers.Crackstations, con, showBenchmarks)
}
}
func PrintNoCrackstations(con *console.SliverClient) {
con.PrintInfof("No crackstations connected to server\n")
}
func AreCrackersOnline(con *console.SliverClient) bool {
crackers, err := con.Rpc.Crackstations(context.Background(), &commonpb.Empty{})
if err != nil {
return false
}
return len(crackers.Crackstations) > 0
}
func PrintCrackers(crackers []*clientpb.Crackstation, con *console.SliverClient, showBenchmarks bool) {
sort.Slice(crackers, func(i, j int) bool {
return crackers[i].Name < crackers[j].Name
})
for index, cracker := range crackers {
printCracker(cracker, index, con, showBenchmarks)
if index < len(crackers)-1 {
con.Println()
con.Println()
}
}
}
func printCracker(cracker *clientpb.Crackstation, index int, con *console.SliverClient, showBenchmarks bool) {
tw := table.NewWriter()
tw.SetStyle(settings.GetTableStyle(con))
tw.SetTitle(console.StyleBoldOrange.Render(fmt.Sprintf(">>> Crackstation %02d - %s (%s)", index+1, cracker.Name, cracker.OperatorName)) + "\n")
tw.AppendSeparator()
tw.AppendRow(table.Row{console.StyleBold.Render("Operating System"), fmt.Sprintf("%s/%s", cracker.GOOS, cracker.GOARCH)})
tw.AppendRow(table.Row{console.StyleBold.Render("Hashcat Version"), cracker.HashcatVersion})
if 0 < len(cracker.CUDA) {
for _, cuda := range cracker.CUDA {
tw.AppendSeparator()
tw.AppendRow(table.Row{console.StyleBold.Render("CUDA Device"), console.StyleBoldGreen.Render(fmt.Sprintf("%s (%s)", cuda.Name, cuda.Version))})
tw.AppendRow(table.Row{console.StyleBold.Render("Memory"), fmt.Sprintf("%s free of %s", cuda.MemoryFree, cuda.MemoryTotal)})
tw.AppendRow(table.Row{console.StyleBold.Render("Clock"), fmt.Sprintf("%d", cuda.Clock)})
tw.AppendRow(table.Row{console.StyleBold.Render("Processors"), fmt.Sprintf("%d", cuda.Processors)})
}
}
if 0 < len(cracker.Metal) {
for _, metal := range cracker.Metal {
tw.AppendSeparator()
tw.AppendRow(table.Row{console.StyleBold.Render("Metal Device"), console.StyleBoldGreen.Render(fmt.Sprintf("%s (%s)", metal.Name, metal.Version))})
tw.AppendRow(table.Row{console.StyleBold.Render("Memory"), fmt.Sprintf("%s free of %s", metal.MemoryFree, metal.MemoryTotal)})
tw.AppendRow(table.Row{console.StyleBold.Render("Clock"), fmt.Sprintf("%d", metal.Clock)})
tw.AppendRow(table.Row{console.StyleBold.Render("Processors"), fmt.Sprintf("%d", metal.Processors)})
}
}
if 0 < len(cracker.OpenCL) {
for _, openCL := range cracker.OpenCL {
tw.AppendSeparator()
tw.AppendRow(table.Row{console.StyleBold.Render("OpenCL Device"), console.StyleBoldGreen.Render(fmt.Sprintf("%s (%s)", openCL.Name, openCL.Version))})
tw.AppendRow(table.Row{console.StyleBold.Render("Memory"), fmt.Sprintf("%s free of %s", openCL.MemoryFree, openCL.MemoryTotal)})
tw.AppendRow(table.Row{console.StyleBold.Render("Clock"), fmt.Sprintf("%d", openCL.Clock)})
tw.AppendRow(table.Row{console.StyleBold.Render("Processors"), fmt.Sprintf("%d", openCL.Processors)})
}
}
con.Printf("%s\n", tw.Render())
if showBenchmarks {
con.Println()
printBenchmarks(cracker, con)
}
}
func printBenchmarks(cracker *clientpb.Crackstation, con *console.SliverClient) {
tw := table.NewWriter()
tw.SetStyle(settings.GetTableStyle(con))
tw.SetTitle(console.StyleBold.Render("Benchmarks"))
tw.SortBy([]table.SortBy{{Name: "Hash Type"}})
tw.AppendHeader(table.Row{"Hash Type", "Rate"})
if len(cracker.Benchmarks) == 0 {
tw.AppendRow(table.Row{"No benchmarks reported", "-"})
} else {
for hashType, speed := range cracker.Benchmarks {
name, ok := hashcatHashTypeName(hashType)
if !ok {
name = clientpb.HashType(hashType).String()
}
tw.AppendRow(table.Row{name, humanizeHashRate(speed)})
}
}
con.Printf("%s\n", tw.Render())
}
+419
View File
@@ -0,0 +1,419 @@
package crack
import "fmt"
// Hashcat mode names sourced from client/credentials/EXAMPLES.md.
var hashcatHashTypes = map[int32]string{
0: "MD5",
10: "md5($pass.$salt)",
11: "Joomla < 2.5.18",
12: "PostgreSQL",
20: "md5($salt.$pass)",
21: "osCommerce, xt:Commerce",
22: "Juniper NetScreen/SSG (ScreenOS)",
23: "Skype",
24: "SolarWinds Serv-U",
30: "md5(utf16le($pass).$salt)",
40: "md5($salt.utf16le($pass))",
50: "HMAC-MD5 (key = $pass)",
60: "HMAC-MD5 (key = $salt)",
70: "md5(utf16le($pass))",
100: "SHA1",
101: "nsldap, SHA-1(Base64), Netscape LDAP SHA",
110: "sha1($pass.$salt)",
111: "nsldaps, SSHA-1(Base64), Netscape LDAP SSHA",
112: "Oracle S: Type (Oracle 11+)",
120: "sha1($salt.$pass)",
121: "SMF (Simple Machines Forum) > v1.1",
122: "macOS v10.4, macOS v10.5, macOS v10.6",
123: "EPi",
124: "Django (SHA-1)",
125: "ArubaOS",
130: "sha1(utf16le($pass).$salt)",
131: "MSSQL (2000)",
132: "MSSQL (2005)",
133: "PeopleSoft",
140: "sha1($salt.utf16le($pass))",
141: "Episerver 6.x < .NET 4",
150: "HMAC-SHA1 (key = $pass)",
160: "HMAC-SHA1 (key = $salt)",
170: "sha1(utf16le($pass))",
190: "sha1(LinkedIn)",
200: "MySQL323",
300: "MySQL4.1/MySQL5",
400: "phpass, phpBB3 (MD5)",
500: "md5crypt, MD5 (Unix), Cisco-IOS $1$ (MD5)",
501: "Juniper IVE",
600: "BLAKE2b-512",
900: "MD4",
1000: "NTLM",
1100: "Domain Cached Credentials (DCC), MS Cache",
1300: "SHA2-224",
1400: "SHA2-256",
1410: "sha256($pass.$salt)",
1411: "SSHA-256(Base64), LDAP {SSHA256}",
1420: "sha256($salt.$pass)",
1421: "hMailServer",
1430: "sha256(utf16le($pass).$salt)",
1431: "base64(sha256(unicode($pass)))",
1440: "sha256($salt.utf16le($pass))",
1441: "Episerver 6.x >= .NET 4",
1450: "HMAC-SHA256 (key = $pass)",
1460: "HMAC-SHA256 (key = $salt)",
1470: "sha256(utf16le($pass))",
1500: "descrypt, DES (Unix), Traditional DES",
1600: "Apache $apr1$ MD5, md5apr1, MD5 (APR)",
1700: "SHA2-512",
1710: "sha512($pass.$salt)",
1711: "SSHA-512(Base64), LDAP {SSHA512}",
1720: "sha512($salt.$pass)",
1722: "macOS v10.7",
1730: "sha512(utf16le($pass).$salt)",
1731: "MSSQL (2012, 2014)",
1740: "sha512($salt.utf16le($pass))",
1750: "HMAC-SHA512 (key = $pass)",
1760: "HMAC-SHA512 (key = $salt)",
1770: "sha512(utf16le($pass))",
1800: "sha512crypt $6$, SHA512 (Unix)",
2000: "STDOUT",
2100: "Domain Cached Credentials 2 (DCC2), MS Cache 2",
2400: "Cisco-PIX MD5",
2410: "Cisco-ASA MD5",
2500: "WPA-EAPOL-PBKDF2",
2501: "WPA-EAPOL-PMK",
2600: "md5(md5($pass))",
2611: "vBulletin < v3.8.5",
2612: "PHPS",
2711: "vBulletin >= v3.8.5",
2811: "MyBB 1.2+, IPB2+ (Invision Power Board)",
3000: "LM",
3100: "Oracle H: Type (Oracle 7+)",
3200: "bcrypt $2\\*$, Blowfish (Unix)",
3300: "MD5(Sun)",
3500: "md5(md5(md5($pass)))",
3610: "md5(md5($salt).$pass )",
3710: "md5($salt.md5($pass))",
3711: "MediaWiki B type",
3720: "md5($pass.md5($salt))",
3721: "WebEdition CMS",
3800: "md5($salt.$pass.$salt)",
3910: "md5(md5($pass).md5($salt))",
4010: "md5($salt.md5($salt.$pass))",
4110: "md5($salt.md5($pass.$salt))",
4210: "md5($username.0.$pass)",
4300: "md5(strtoupper(md5($pass)))",
4400: "md5(sha1($pass))",
4500: "sha1(sha1($pass))",
4510: "sha1(sha1($pass).$salt)",
4520: "sha1($salt.sha1($pass))",
4521: "Redmine",
4522: "PunBB",
4600: "sha1(sha1(sha1($pass)))",
4700: "sha1(md5($pass))",
4710: "sha1(md5($pass).$salt)",
4711: "Huawei sha1(md5($pass).$salt)",
4800: "iSCSI CHAP authentication, MD5(CHAP)",
4900: "sha1($salt.$pass.$salt)",
5000: "sha1(sha1($salt.$pass.$salt))",
5100: "Half MD5",
5200: "Password Safe v3",
5300: "IKE-PSK MD5",
5400: "IKE-PSK SHA1",
5500: "NetNTLMv1 / NetNTLMv1+ESS",
5600: "NetNTLMv2",
5700: "Cisco-IOS type 4 (SHA256)",
5800: "Samsung Android Password/PIN",
6000: "RIPEMD-160",
6100: "Whirlpool",
6211: "TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + AES / TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + Serpent / TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + Twofish",
6212: "TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + AES-Twofish / TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + Serpent-AES / TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + Twofish-Serpent",
6213: "TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + AES-Twofish-Serpent / TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + Serpent-Twofish-AES",
6221: "TrueCrypt 5.0+ SHA512 + AES / TrueCrypt 5.0+ SHA512 + Serpent / TrueCrypt 5.0+ SHA512 + Twofish",
6222: "TrueCrypt 5.0+ SHA512 + AES-Twofish / TrueCrypt 5.0+ SHA512 + Serpent-AES / TrueCrypt 5.0+ SHA512 + Twofish-Serpent",
6223: "TrueCrypt 5.0+ SHA512 + AES-Twofish-Serpent / TrueCrypt 5.0+ SHA512 + Serpent-Twofish-AES",
6231: "TrueCrypt 5.0+ Whirlpool + AES / TrueCrypt 5.0+ Whirlpool + Serpent / TrueCrypt 5.0+ Whirlpool + Twofish",
6232: "TrueCrypt 5.0+ Whirlpool + AES-Twofish / TrueCrypt 5.0+ Whirlpool + Serpent-AES / TrueCrypt 5.0+ Whirlpool + Twofish-Serpent",
6233: "TrueCrypt 5.0+ Whirlpool + AES-Twofish-Serpent / TrueCrypt 5.0+ Whirlpool + Serpent-Twofish-AES",
6241: "TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + AES + boot / TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + Serpent + boot / TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + Twofish + boot",
6242: "TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + AES-Twofish + boot / TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + Serpent-AES + boot / TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + Twofish-Serpent + boot",
6243: "TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + AES-Twofish-Serpent + boot / TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + Serpent-Twofish-AES + boot",
6300: "AIX {smd5}",
6400: "AIX {ssha256}",
6500: "AIX {ssha512}",
6600: "1Password, agilekeychain",
6700: "AIX {ssha1}",
6800: "LastPass + LastPass sniffed",
6900: "GOST R 34.11-94",
7000: "FortiGate (FortiOS)",
7100: "macOS v10.8+ (PBKDF2-SHA512)",
7200: "GRUB 2",
7300: "IPMI2 RAKP HMAC-SHA1",
7400: "sha256crypt $5$, SHA256 (Unix)",
7401: "MySQL $A$ (sha256crypt)",
7500: "Kerberos 5, etype 23, AS-REQ Pre-Auth",
7700: "SAP CODVN B (BCODE)",
7701: "SAP CODVN B (BCODE) from RFC_READ_TABLE",
7800: "SAP CODVN F/G (PASSCODE)",
7801: "SAP CODVN F/G (PASSCODE) from RFC_READ_TABLE",
7900: "Drupal7",
8000: "Sybase ASE",
8100: "Citrix NetScaler (SHA1)",
8200: "1Password, cloudkeychain",
8300: "DNSSEC (NSEC3)",
8400: "WBB3 (Woltlab Burning Board)",
8500: "RACF",
8600: "Lotus Notes/Domino 5",
8700: "Lotus Notes/Domino 6",
8800: "Android FDE <= 4.3",
8900: "scrypt",
9000: "Password Safe v2",
9100: "Lotus Notes/Domino 8",
9200: "Cisco-IOS $8$ (PBKDF2-SHA256)",
9300: "Cisco-IOS $9$ (scrypt)",
9400: "MS Office 2007",
9500: "MS Office 2010",
9600: "MS Office 2013",
9700: "MS Office <= 2003 MD5 + RC4, oldoffice$0, oldoffice$1",
9710: "MS Office <= 2003 $0/$1, MD5 + RC4, collider #1",
9720: "MS Office <= 2003 $0/$1, MD5 + RC4, collider #2",
9800: "MS Office <= 2003 SHA1 + RC4, oldoffice$3, oldoffice$4",
9810: "MS Office <= 2003 $3, SHA1 + RC4, collider #1",
9820: "MS Office <= 2003 $3, SHA1 + RC4, collider #2",
9900: "Radmin2",
10000: "Django (PBKDF2-SHA256)",
10100: "SipHash",
10200: "CRAM-MD5",
10300: "SAP CODVN H (PWDSALTEDHASH) iSSHA-1",
10400: "PDF 1.1 - 1.3 (Acrobat 2 - 4)",
10410: "PDF 1.1 - 1.3 (Acrobat 2 - 4), collider #1",
10420: "PDF 1.1 - 1.3 (Acrobat 2 - 4), collider #2",
10500: "PDF 1.4 - 1.6 (Acrobat 5 - 8)",
10600: "PDF 1.7 Level 3 (Acrobat 9)",
10700: "PDF 1.7 Level 8 (Acrobat 10 - 11)",
10800: "SHA2-384",
10810: "sha384($pass.$salt)",
10820: "sha384($salt.$pass)",
10830: "sha384(utf16le($pass).$salt)",
10840: "sha384($salt.utf16le($pass))",
10870: "sha384(utf16le($pass))",
10900: "PBKDF2-HMAC-SHA256",
10901: "RedHat 389-DS LDAP (PBKDF2-HMAC-SHA256)",
11000: "PrestaShop",
11100: "PostgreSQL CRAM (MD5)",
11200: "MySQL CRAM (SHA1)",
11300: "Bitcoin/Litecoin wallet.dat",
11400: "SIP digest authentication (MD5)",
11500: "CRC32",
11600: "7-Zip",
11700: "GOST R 34.11-2012 (Streebog) 256-bit, big-endian",
11750: "HMAC-Streebog-256 (key = $pass), big-endian",
11760: "HMAC-Streebog-256 (key = $salt), big-endian",
11800: "GOST R 34.11-2012 (Streebog) 512-bit, big-endian",
11850: "HMAC-Streebog-512 (key = $pass), big-endian",
11860: "HMAC-Streebog-512 (key = $salt), big-endian",
11900: "PBKDF2-HMAC-MD5",
12000: "PBKDF2-HMAC-SHA1",
12001: "Atlassian (PBKDF2-HMAC-SHA1)",
12100: "PBKDF2-HMAC-SHA512",
12200: "eCryptfs",
12300: "Oracle T: Type (Oracle 12+)",
12400: "BSDi Crypt, Extended DES",
12500: "RAR3-hp",
12600: "ColdFusion 10+",
12700: "Blockchain, My Wallet",
12800: "MS-AzureSync PBKDF2-HMAC-SHA256",
12900: "Android FDE (Samsung DEK)",
13000: "RAR5",
13100: "Kerberos 5, etype 23, TGS-REP",
13200: "AxCrypt 1",
13300: "AxCrypt 1 in-memory SHA1",
13400: "KeePass 1 AES / without keyfile / KeePass 2 AES / without keyfile / KeePass 1 Twofish / with keyfile / Keepass 2 AES / with keyfile",
13500: "PeopleSoft PS_TOKEN",
13600: "WinZip",
13711: "VeraCrypt PBKDF2-HMAC-RIPEMD160 + AES / VeraCrypt PBKDF2-HMAC-RIPEMD160 + Serpent / VeraCrypt PBKDF2-HMAC-RIPEMD160 + Twofish",
13712: "VeraCrypt PBKDF2-HMAC-RIPEMD160 + AES-Twofish / VeraCrypt PBKDF2-HMAC-RIPEMD160 + Serpent-AES / VeraCrypt PBKDF2-HMAC-RIPEMD160 + Twofish-Serpent",
13713: "VeraCrypt PBKDF2-HMAC-RIPEMD160 + Serpent-Twofish-AES",
13721: "VeraCrypt PBKDF2-HMAC-SHA512 + AES / VeraCrypt PBKDF2-HMAC-SHA512 + Serpent / VeraCrypt PBKDF2-HMAC-SHA512 + Twofish",
13722: "VeraCrypt PBKDF2-HMAC-SHA512 + AES-Twofish / VeraCrypt PBKDF2-HMAC-SHA512 + Serpent-AES / VeraCrypt PBKDF2-HMAC-SHA512 + Twofish-Serpent",
13723: "VeraCrypt PBKDF2-HMAC-SHA512 + Serpent-Twofish-AES",
13731: "VeraCrypt PBKDF2-HMAC-Whirlpool + AES / VeraCrypt PBKDF2-HMAC-Whirlpool + Serpent / VeraCrypt PBKDF2-HMAC-Whirlpool + Twofish",
13732: "VeraCrypt PBKDF2-HMAC-Whirlpool + AES-Twofish / VeraCrypt PBKDF2-HMAC-Whirlpool + Serpent-AES / VeraCrypt PBKDF2-HMAC-Whirlpool + Twofish-Serpent",
13733: "VeraCrypt PBKDF2-HMAC-Whirlpool + Serpent-Twofish-AES",
13741: "VeraCrypt PBKDF2-HMAC-RIPEMD160 + boot-mode + AES",
13742: "VeraCrypt PBKDF2-HMAC-RIPEMD160 + boot-mode + AES-Twofish",
13743: "VeraCrypt PBKDF2-HMAC-RIPEMD160 + boot-mode + AES-Twofish-Serpent",
13751: "VeraCrypt PBKDF2-HMAC-SHA256 + AES / VeraCrypt PBKDF2-HMAC-SHA256 + Serpent / VeraCrypt PBKDF2-HMAC-SHA256 + Twofish",
13752: "VeraCrypt PBKDF2-HMAC-SHA256 + AES-Twofish / VeraCrypt PBKDF2-HMAC-SHA256 + Serpent-AES / VeraCrypt PBKDF2-HMAC-SHA256 + Twofish-Serpent",
13753: "VeraCrypt PBKDF2-HMAC-SHA256 + Serpent-Twofish-AES",
13761: "VeraCrypt PBKDF2-HMAC-SHA256 + boot-mode + Twofish / VeraCrypt PBKDF2-HMAC-SHA256 + boot-mode + PIM + AES",
13762: "VeraCrypt PBKDF2-HMAC-SHA256 + boot-mode + Serpent-AES",
13763: "VeraCrypt PBKDF2-HMAC-SHA256 + boot-mode + Serpent-Twofish-AES",
13771: "VeraCrypt Streebog-512 + XTS 512 bit",
13772: "VeraCrypt Streebog-512 + XTS 1024 bit",
13773: "VeraCrypt Streebog-512 + XTS 1536 bit",
13800: "Windows Phone 8+ PIN/password",
13900: "OpenCart",
14000: "DES (PT = $salt, key = $pass)",
14100: "3DES (PT = $salt, key = $pass)",
14400: "sha1(CX)",
14500: "Linux Kernel Crypto API (2.4)",
14600: "LUKS",
14700: "iTunes backup < 10.0",
14800: "iTunes backup >= 10.0",
14900: "Skip32 (PT = $salt, key = $pass)",
15000: "FileZilla Server >= 0.9.55",
15100: "Juniper/NetBSD sha1crypt",
15200: "Blockchain, My Wallet, V2",
15300: "DPAPI masterkey file v1 + local context",
15400: "ChaCha20",
15500: "JKS Java Key Store Private Keys (SHA1)",
15600: "Ethereum Wallet, PBKDF2-HMAC-SHA256",
15700: "Ethereum Wallet, SCRYPT",
15900: "DPAPI masterkey file v2 + Active Directory domain context",
16000: "Tripcode",
16100: "TACACS+",
16200: "Apple Secure Notes",
16300: "Ethereum Pre-Sale Wallet, PBKDF2-HMAC-SHA256",
16400: "CRAM-MD5 Dovecot",
16500: "JWT (JSON Web Token)",
16600: "Electrum Wallet (Salt-Type 1-3)",
16700: "FileVault 2",
16800: "WPA-PMKID-PBKDF2",
16801: "WPA-PMKID-PMK",
16900: "Ansible Vault",
17200: "PKZIP (Compressed)",
17210: "PKZIP (Uncompressed)",
17220: "PKZIP (Compressed Multi-File)",
17225: "PKZIP (Mixed Multi-File)",
17230: "PKZIP (Mixed Multi-File Checksum-Only)",
17300: "SHA3-224",
17400: "SHA3-256",
17500: "SHA3-384",
17600: "SHA3-512",
17700: "Keccak-224",
17800: "Keccak-256",
17900: "Keccak-384",
18000: "Keccak-512",
18100: "TOTP (HMAC-SHA1)",
18200: "Kerberos 5, etype 23, AS-REP",
18300: "Apple File System (APFS)",
18400: "Open Document Format (ODF) 1.2 (SHA-256, AES)",
18500: "sha1(md5(md5($pass)))",
18600: "Open Document Format (ODF) 1.1 (SHA-1, Blowfish)",
18700: "Java Object hashCode()",
18800: "Blockchain, My Wallet, Second Password (SHA256)",
18900: "Android Backup",
19000: "QNX /etc/shadow (MD5)",
19100: "QNX /etc/shadow (SHA256)",
19200: "QNX /etc/shadow (SHA512)",
19300: "sha1($salt1.$pass.$salt2)",
19500: "Ruby on Rails Restful-Authentication",
19600: "Kerberos 5, etype 17, TGS-REP (AES128-CTS-HMAC-SHA1-96)",
19700: "Kerberos 5, etype 18, TGS-REP (AES256-CTS-HMAC-SHA1-96)",
19800: "Kerberos 5, etype 17, Pre-Auth",
19900: "Kerberos 5, etype 18, Pre-Auth",
20011: "DiskCryptor SHA512 + XTS 512 bit (AES) / DiskCryptor SHA512 + XTS 512 bit (Twofish) / DiskCryptor SHA512 + XTS 512 bit (Serpent)",
20012: "DiskCryptor SHA512 + XTS 1024 bit (AES-Twofish) / DiskCryptor SHA512 + XTS 1024 bit (Twofish-Serpent) / DiskCryptor SHA512 + XTS 1024 bit (Serpent-AES)",
20013: "DiskCryptor SHA512 + XTS 1536 bit (AES-Twofish-Serpent)",
20200: "Python passlib pbkdf2-sha512",
20300: "Python passlib pbkdf2-sha256",
20400: "Python passlib pbkdf2-sha1",
20500: "PKZIP Master Key",
20510: "PKZIP Master Key (6 byte optimization)",
20600: "Oracle Transportation Management (SHA256)",
20710: "sha256(sha256($pass).$salt)",
20711: "AuthMe sha256",
20720: "sha256($salt.sha256($pass))",
20800: "sha256(md5($pass))",
20900: "md5(sha1($pass).md5($pass).sha1($pass))",
21000: "BitShares v0.x - sha512(sha512_bin(pass))",
21100: "sha1(md5($pass.$salt))",
21200: "md5(sha1($salt).md5($pass))",
21300: "md5($salt.sha1($salt.$pass))",
21400: "sha256(sha256_bin($pass))",
21500: "SolarWinds Orion",
21501: "SolarWinds Orion v2",
21600: "Web2py pbkdf2-sha512",
21700: "Electrum Wallet (Salt-Type 4)",
21800: "Electrum Wallet (Salt-Type 5)",
22000: "WPA-PBKDF2-PMKID+EAPOL",
22001: "WPA-PMK-PMKID+EAPOL",
22100: "BitLocker",
22200: "Citrix NetScaler (SHA512)",
22300: "sha256($salt.$pass.$salt)",
22301: "Telegram Mobile App Passcode (SHA256)",
22400: "AES Crypt (SHA256)",
22500: "MultiBit Classic .key (MD5)",
22600: "Telegram Desktop < v2.1.14 (PBKDF2-HMAC-SHA1)",
22700: "MultiBit HD (scrypt)",
22911: "RSA/DSA/EC/OpenSSH Private Keys ($0$)",
22921: "RSA/DSA/EC/OpenSSH Private Keys ($6$)",
22931: "RSA/DSA/EC/OpenSSH Private Keys ($1, $3$)",
22941: "RSA/DSA/EC/OpenSSH Private Keys ($4$)",
22951: "RSA/DSA/EC/OpenSSH Private Keys ($5$)",
23001: "SecureZIP AES-128",
23002: "SecureZIP AES-192",
23003: "SecureZIP AES-256",
23100: "Apple Keychain",
23200: "XMPP SCRAM PBKDF2-SHA1",
23300: "Apple iWork",
23400: "Bitwarden",
23500: "AxCrypt 2 AES-128",
23600: "AxCrypt 2 AES-256",
23700: "RAR3-p (Uncompressed)",
23800: "RAR3-p (Compressed)",
23900: "BestCrypt v3 Volume Encryption",
24100: "MongoDB ServerKey SCRAM-SHA-1",
24200: "MongoDB ServerKey SCRAM-SHA-256",
24300: "sha1($salt.sha1($pass.$salt))",
24410: "PKCS#8 Private Keys (PBKDF2-HMAC-SHA1 + 3DES/AES)",
24420: "PKCS#8 Private Keys (PBKDF2-HMAC-SHA256 + 3DES/AES)",
24500: "Telegram Desktop >= v2.1.14 (PBKDF2-HMAC-SHA512)",
24600: "SQLCipher",
24700: "Stuffit5",
24800: "Umbraco HMAC-SHA1",
24900: "Dahua Authentication MD5",
25300: "MS Office 2016 - SheetProtection",
25400: "PDF 1.4 - 1.6 (Acrobat 5 - 8) - edit password",
25500: "Stargazer Stellar Wallet XLM",
25600: "bcrypt(md5($pass)) / bcryptmd5",
25700: "MurmurHash",
25800: "bcrypt(sha1($pass)) / bcryptsha1",
25900: "KNX IP Secure - Device Authentication Code",
26000: "Mozilla key3.db",
26100: "Mozilla key4.db",
26200: "OpenEdge Progress Encode",
26300: "FortiGate256 (FortiOS256)",
26401: "AES-128-ECB NOKDF (PT = $salt, key = $pass)",
26402: "AES-192-ECB NOKDF (PT = $salt, key = $pass)",
26403: "AES-256-ECB NOKDF (PT = $salt, key = $pass)",
26500: "iPhone passcode (UID key + System Keybag)",
26600: "MetaMask Wallet",
99999: "Plaintext",
}
func hashcatHashTypeName(mode int32) (string, bool) {
name, ok := hashcatHashTypes[mode]
return name, ok
}
func humanizeHashRate(rate uint64) string {
const unit = 1000
if rate < unit {
return fmt.Sprintf("%d H/s", rate)
}
value := float64(rate)
exp := 0
for value >= unit && exp < 5 {
value /= unit
exp++
}
suffixes := []string{"kH/s", "MH/s", "GH/s", "TH/s", "PH/s"}
if exp == 0 {
return fmt.Sprintf("%d H/s", rate)
}
if exp > len(suffixes) {
exp = len(suffixes)
}
return fmt.Sprintf("%.2f %s", value, suffixes[exp-1])
}
+110
View File
@@ -0,0 +1,110 @@
package crack
import (
"context"
"fmt"
"time"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/rsteube/carapace"
)
func CrackHcstat2Completer(con *console.SliverClient) carapace.Action {
return carapace.ActionCallback(func(c carapace.Context) carapace.Action {
hcstat2, err := con.Rpc.CrackFilesList(context.Background(), &clientpb.CrackFile{Type: clientpb.CrackFileType_MARKOV_HCSTAT2})
if err != nil {
return carapace.ActionMessage("failed to fetch crack files: %s", err.Error())
}
results := make([]string, 0)
for _, file := range hcstat2.Files {
if file.Type != clientpb.CrackFileType_MARKOV_HCSTAT2 {
continue
}
results = append(results, file.Name)
desc := fmt.Sprintf("%s (%d chunks, chunk size: %s)", byteCountSI(file.UncompressedSize), len(file.Chunks), byteCountSI(file.ChunkSize))
results = append(results, desc)
}
return carapace.ActionValuesDescribed(results...).Tag("hcstat2 files")
})
}
func CrackWordlistCompleter(con *console.SliverClient) carapace.Action {
return carapace.ActionCallback(func(c carapace.Context) carapace.Action {
hcstat2, err := con.Rpc.CrackFilesList(context.Background(), &clientpb.CrackFile{Type: clientpb.CrackFileType_MARKOV_HCSTAT2})
if err != nil {
return carapace.ActionMessage("failed to fetch crack files: %s", err.Error())
}
results := make([]string, 0)
for _, file := range hcstat2.Files {
if file.Type != clientpb.CrackFileType_WORDLIST {
continue
}
results = append(results, file.Name)
createdAt, modifiedAt := time.Unix(file.CreatedAt, 0).Format("03:04:05"), time.Unix(file.LastModified, 0).Format("03:04:05")
desc := fmt.Sprintf("%s (Created: %s, modified: %s)", byteCountSI(file.UncompressedSize), createdAt, modifiedAt)
results = append(results, desc)
}
return carapace.ActionValuesDescribed(results...).Tag("wordlists")
})
}
func CrackRulesCompleter(con *console.SliverClient) carapace.Action {
return carapace.ActionCallback(func(c carapace.Context) carapace.Action {
hcstat2, err := con.Rpc.CrackFilesList(context.Background(), &clientpb.CrackFile{Type: clientpb.CrackFileType_MARKOV_HCSTAT2})
if err != nil {
return carapace.ActionMessage("failed to fetch crack files: %s", err.Error())
}
results := make([]string, 0)
for _, file := range hcstat2.Files {
if file.Type != clientpb.CrackFileType_RULES {
continue
}
results = append(results, file.Name)
createdAt, modifiedAt := time.Unix(file.CreatedAt, 0).Format("03:04:05"), time.Unix(file.LastModified, 0).Format("03:04:05")
desc := fmt.Sprintf("%s (Created: %s, modified: %s)", byteCountSI(file.UncompressedSize), createdAt, modifiedAt)
results = append(results, desc)
}
return carapace.ActionValuesDescribed(results...).Tag("wordlists")
})
}
func byteCountSI(b int64) string {
const unit = 1000
if b < unit {
return fmt.Sprintf("%d B", b)
}
div, exp := int64(unit), 0
for n := b / unit; n >= unit; n /= unit {
div *= unit
exp++
}
return fmt.Sprintf("%.1f %cB",
float64(b)/float64(div), "kMGTPE"[exp])
}
func byteCountIEC(b int64) string {
const unit = 1024
if b < unit {
return fmt.Sprintf("%d B", b)
}
div, exp := int64(unit), 0
for n := b / unit; n >= unit; n /= unit {
div *= unit
exp++
}
return fmt.Sprintf("%.1f %ciB",
float64(b)/float64(div), "KMGTPE"[exp])
}
+14
View File
@@ -0,0 +1,14 @@
# client/command/creds
## Overview
Implements the 'creds' command group for the Sliver client console. Handlers map Cobra invocations to creds workflows such as ADD, hash types, RM, and select.
## Go Files
- `add.go` – Adds credentials to the client store via interactive or flag-based input.
- `commands.go` – Registers credential management commands and subcommands.
- `creds.go` – Lists stored credentials and formats them for display.
- `hash-types.go` – Enumerates supported hash types and their identifiers.
- `rm.go` – Removes credentials by ID or filter from the store.
- `select.go` – Selects credentials for use in other workflows, updating defaults.
Loaded 100 of 15638 files, more files were not shown because too many files have changed in this diff. Show more