714 Commits
Author SHA1 Message Date
jbarciabf ba4ff4701a Merge pull request #130 from BishopFox/fix/network-ports-map-race
Fix concurrent map access race in network-ports module and bump version to 2.0.5
v2.0.5
2026-05-26 10:45:11 -04:00
jbarciabf 81be56e006 Bump version to 2.0.5 2026-05-26 10:42:29 -04:00
jbarciabf 494443d7ce Fix concurrent map access race in network-ports module (#129)
The NetworkPortsModule cached EC2 NACLs and Security Groups in two
per-region maps. The cache lookup read the maps without holding a
lock while the cache population path took a write lock, producing a
"concurrent map read and map write" runtime panic when multiple
region goroutines hit the cache check concurrently. The panic
reproduced reliably in low-density AWS accounts where every region
goroutine raced through the cache check at the same instant.

Take the read lock on the cache fast-path in both
getEC2NACLsPerRegion and getEC2SecurityGroupsPerRegion. Move
naclsMutex and securityGroupsMutex from package-level vars onto the
module struct so concurrent module instances stop serializing on
each other's locks.

Convert CommandCounter from plain int fields with naked ++/-- to
int64 fields with Incr/Decr/Load methods that use atomic.AddInt64
and atomic.LoadInt64 internally. Worker goroutines and the spinner
goroutine were updating and reading the same counters without
synchronization, producing torn integer writes that could show as
off-by-one progress in the spinner. Plain int64 storage keeps the
struct copyable so existing constructors and helpers that take
modules by value continue to vet-clean.

Add TestNetworkPortsCacheConcurrentAccess as a regression test.
With the read lock removed, "go test -race" reports the
mapaccess2_faststr read racing the locked write; with the fix in
place the test passes.
2026-05-26 10:36:17 -04:00
Joseph Barcia 3d3cfc6c0c Update GitHub Actions to Node 24 compatible versions
- actions/checkout v4 -> v6
- actions/setup-go v4 -> v5
- go-version ^1.20 -> ^1.25
- Replace abandoned marvinpinto/action-automatic-releases with
  softprops/action-gh-release v2

Node.js 20 actions are deprecated and will be forced to Node 24
starting June 2, 2026, and removed September 16, 2026.
2026-05-26 10:30:22 -04:00
jbarciabf 1b0925877d Merge pull request #127 from BishopFox/fix/pmapper-basepath-all-checks
Fix pmapper-data-basepath ignored in all-checks and instances race condition
v2.0.4
2026-04-21 09:06:40 -04:00
Joseph Barcia 7727d1d08c Fix pmapper-data-basepath ignored in all-checks and race condition in instances module
The pmapperCommand in runAllChecksCommand was missing the
PmapperDataBasePath parameter, causing --pmapper-data-basepath to be
ignored for the pmapper module when running all-checks. (Fixes #105)

The instances module had a race condition where role analysis ran before
the receiver goroutine finished collecting all MappedInstances. This
caused IsAdminRole and CanPrivEscToAdmin columns to appear empty in
all-checks despite pmapper data being available. Fixed by signaling
the receiver to stop and waiting for it to drain before running role
analysis.

Version bumped to 2.0.4.
2026-04-21 13:06:11 +00:00
jbarciabf c7f81dc5cc Merge pull request #126 from mitre88/main
Fix --pmapper-data-basepath ignored in all-checks for EC2 user data module
2026-04-21 09:02:34 -04:00
Open Source Contributor 008fb84d23 Fix --pmapper-data-basepath ignored in all-checks for EC2 user data module
The EC2 user data InstancesModule in runAllChecksCommand was not receiving
the PmapperDataBasePath parameter, causing the --pmapper-data-basepath flag
to be ignored when running all-checks.

Fix: Add PmapperDataBasePath: PmapperDataBasePath to the ec2UserData struct
initialization in runAllChecksCommand.
2026-04-20 20:38:56 -06:00
jbarciabf 142757b5c2 Merge pull request #125 from BishopFox/fix/go-stdlib-vulnerabilities
Upgrade Go to 1.25.9, fix 24 stdlib vulnerabilities
v2.0.3
2026-04-13 09:06:34 -04:00
Joseph Barcia 146034d619 Update AWS SDK to fix EventStream decoder panic (GHSA-xmrv-pmrh-hhx2)
Updates aws-sdk-go-v2/aws/protocol/eventstream to v1.7.8,
service/s3 to v1.97.3, service/lambda to v1.88.5, and
service/kinesis to v1.43.5.
2026-04-13 12:59:37 +00:00
Joseph Barcia 9e056b29d7 Update opentelemetry-go to v1.43.0 and go-jose to v4.1.4
Fixes CVE-2026-39883 (PATH hijacking in otel SDK) and
CVE-2026-34986 (panic in JWE decryption in go-jose).
2026-04-13 12:55:22 +00:00
Joseph Barcia 871491738b Upgrade Go to 1.25.9 and bump version to 2.0.3
Fixes 24 standard library vulnerabilities in crypto/tls, crypto/x509,
net/url, net/http, html/template, encoding/asn1, encoding/pem,
net/mail, net/textproto, os, and os/exec.
2026-04-12 18:16:58 +00:00
jbarciabf 033c953d57 Merge pull request #124 from BishopFox/version-bump-2.0.2
Bump version to 2.0.2
v2.0.2
2026-04-12 13:49:44 -04:00
Joseph Barcia a7e45b9ae5 Bump version to 2.0.2 2026-04-12 17:47:40 +00:00
jbarciabf ce513ba04d Merge pull request #123 from sethsec/fix/awsservicemap-v1.1.0-service-slugs
Fix service slug mismatches for awsservicemap v1.1.0
2026-04-12 13:46:14 -04:00
Joseph Barcia 83f9af249d Update google.golang.org/grpc to v1.79.3 to fix GO-2026-4762
Fixes authorization bypass via missing leading slash in :path header.
2026-04-12 17:40:35 +00:00
Seth Art 11652a9a6e Fix service slug mismatches for awsservicemap v1.1.0 across all commands
awsservicemap v1.1.0 switched to URL-based service slugs, breaking all
commands that used the old identifiers. Affected slugs and their fixes:

  secretsmanager  -> secrets-manager   (resource-trusts, inventory)
  ssm             -> systems-manager   (inventory)
  elb             -> elasticloadbalancing (endpoints, inventory, network-ports)
  es              -> opensearch-service   (endpoints, inventory, resource-trusts)
  mq              -> amazon-mq            (endpoints, inventory)
  stepfunctions   -> step-functions       (inventory)
  sagemaker       -> sagemaker-ai         (env-vars)
  clouddirectory  -> directoryservice     (directory-services)
  kinesis         -> streams              (inventory)
  lightsail       -> amazonlightsail.com  (endpoints, env-vars, network-ports)

Each mismatch caused IsServiceInRegion to return false for all regions,
silently skipping enumeration of that service entirely.
2026-04-11 11:40:48 -04:00
Seth Art 6ac7a0bf6b Fix secrets command skipping all regions due to stale service slug names
awsservicemap v1.1.0 changed to a URL-based service identification format.
The secrets module was passing old-style slugs ("secretsmanager", "ssm") to
IsServiceInRegion, which never matched the new URL-derived slugs
("secrets-manager", "systems-manager"). This caused 0 tasks to be queued
and no secrets to be returned despite secrets existing in the account.
2026-04-11 11:40:48 -04:00
jbarciabf c6fcdba665 Merge pull request #122 from jbarciabf/fix/CVE-2026-24051
v2.0.1 - CVE-2026-24051 Fix
v2.0.1
2026-03-09 10:10:46 -04:00
jbarciabf 4f2c2cb4c9 Bump go.opentelemetry.io/otel/sdk to v1.40.0 (CVE-2026-24051)
Fixes PATH hijacking vulnerability in the OTel Go SDK on macOS/Darwin.
2026-03-05 08:17:36 -05:00
jbarciabf db8a6895c3 Merge pull request #118 from prdngr/fix-privesc-false-positive
Fix false positive where GitHub Actions subject was not recognized
v2.0.0 v2.0.0a
2026-03-04 09:18:59 -05:00
Dominik Prodinger 11763f04f6 Merge branch 'BishopFox:main' into fix-privesc-false-positive 2026-03-04 10:39:12 +01:00
Bastien Faure 0ba9e2d37f Merge pull request #121 from BishopFox/jb/gcp-dev
v2.0.0 - GCP Rewrite
2026-02-27 09:05:41 -05:00
jbarciabf a3d1c09558 fixed codespell referer error 2026-02-26 16:32:53 -05:00
jbarciabf a3b7ab4269 rename buckets -> storage 2026-02-26 15:01:18 -05:00
jbarciabf 60c6b8d61c added log-enum, bigquery-enum, bigtable-enum, spanner-enum to search for sensitive stored data 2026-02-26 12:55:50 -05:00
jbarciabf 8db014b136 updated foxmapper mappings 2026-02-21 14:12:23 -05:00
jbarciabf 72cd367086 fixed potential panics 2026-02-20 16:12:28 -05:00
jbarciabf f2d4b7c535 updated readme 2026-02-20 13:06:07 -05:00
jbarciabf 47d69d870f remove alias due to conflict 2026-02-20 12:59:43 -05:00
jbarciabf c9d1c2de68 normalized loot files and added additional commands 2026-02-20 11:59:20 -05:00
jbarciabf a8e802404f code cleanup 2026-02-20 08:31:44 -05:00
jbarciabf d021ea54de cleanup output, better streaming and file splitting 2026-02-19 18:17:24 -05:00
jbarciabf 7a18090609 removed attackpath and orgcache flags and enable by default 2026-02-16 15:17:04 -05:00
jbarciabf cb8be678e7 removed attack paths to use foxmapper instead 2026-02-15 23:02:27 -05:00
Dominik Prodinger 6f45cbe900 Fix false positive where GitHub Actions subject was not recognized 2026-02-09 12:19:05 +01:00
jbarciabf 8a248e3127 updated instances 2026-02-04 21:53:51 -05:00
jbarciabf de141300e9 fixed enumerate regions where permissions were sometimes denied 2026-02-04 20:35:44 -05:00
jbarciabf eb76d76dea physical cache instead of memory. 1st wave of cleanup 2026-02-04 14:15:16 -05:00
jbarciabf 72a551b38b centralized attackpath service and playbooks 2026-01-30 10:53:15 -05:00
jbarciabf 59bac4ee36 fixed whoami output and added new attack paths 2026-01-30 09:22:38 -05:00
jbarciabf 44bf8e8915 added attackpaths and loot 2026-01-29 16:16:17 -05:00
jbarciabf 70107c607f updated session handling 2026-01-23 10:52:42 -05:00
jbarciabf d24f817bf9 changed global all projects flag 2026-01-20 14:33:22 -05:00
jbarciabf 711e29e3bb updated readme permissions 2026-01-20 08:33:20 -05:00
jbarciabf 04bb167273 updated version number 2026-01-20 08:20:09 -05:00
jbarciabf ed732d0c01 migrated over to sdk and caching for standardization with aws modules 2026-01-19 15:35:39 -05:00
jbarciabf f82547b438 updated attackpath output 2026-01-16 11:36:25 -05:00
jbarciabf 35fca31475 updated whoami counts 2026-01-16 10:02:10 -05:00
jbarciabf 888649616f added attackpath flag 2026-01-16 00:32:45 -05:00