splunk / splunk/attack_range

GCP Region issue

Open
#1,334 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.6k
Forks
417
PR merge metrics
No merged PRs in 30d

Description

I have set up the attack range on my Mac and connected to GCP. However, when I run the attack command, it gives the below error.

Traceback (most recent call last):
File "/Users/a/Desktop/s/attack_range/attack_range.py", line 349, in
main(sys.argv[1:])
~~~~^^^^^^^^^^^^^^
File "/Users/a/Desktop/s/attack_range/attack_range.py", line 345, in main
return args.func(args)
~~~~~~~~~^^^^^^
File "/Users/a/Desktop/s/attack_range/attack_range.py", line 73, in simulate
controller.simulate(args.engine, args.target, args.technique, args.playbook)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/a/Desktop/s/attack_range/modules/gcp_controller.py", line 143, in simulate
simulation_controller.simulate(target, technique)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/Users/a/Desktop/s/attack_range/modules/art_simulation_controller.py", line 62, in simulate
target_public_ip = gcp_service.get_single_instance_public_ip(
target,
self.config["general"]["key_name"],
self.config["gcp"]["region"],
)
File "/Users/a/Desktop/s/attack_range/modules/gcp_service.py", line 102, in get_single_instance_public_ip
.network_interfaces[0]
^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'network_interfaces'

even though I have this config in the YML
region: europe-west3
zone: europe-west3-a

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with attack_range.py and follow the simulate path into modules/gcp_controller.py, modules/art_simulation_controller.py, and modules/gcp_service.py. Reproduce the attack using the reported region and zone settings, then inspect get_single_instance_public_ip around the failing network interface lookup. Done means the configured GCP region and zone no longer lead to this AttributeError during an attack.

Written by the indexing model from the issue text.

Assessment

Tech stack
gcp, python
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.