Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError: list index out of range while running update-attack.py #363

Open
Yash66666 opened this issue Mar 11, 2022 · 8 comments
Open
Assignees

Comments

@Yash66666
Copy link

While using workbench to integrate with attack website as per the guide, the following occurs while running update-attack.py

clean : ---------------------------------------- 0.00s
matrices : ---------------------------------------- 7.74s
tactics : ---------------------------------------- 0.13s
techniques : ---------------------------------------- Running...Traceback (most recent call last):
File "update-attack.py", line 154, in
ptr'run_module'
File "/home/yash/Downloads/attack-website-master/modules/techniques/init.py", line 37, in run_module
return (techniques.generate_techniques(), techniques_config.module_name)
File "/home/yash/Downloads/attack-website-master/modules/techniques/techniques.py", line 53, in generate_techniques
check_if_generated = generate_domain_markdown(domain['name'], techniques_no_sub, tactics, side_nav_data, notes, deprecated)
File "/home/yash/Downloads/attack-website-master/modules/techniques/techniques.py", line 95, in generate_domain_markdown
generate_technique_md(technique, domain, side_nav_data, tactics[domain], notes)
File "/home/yash/Downloads/attack-website-master/modules/techniques/techniques.py", line 123, in generate_technique_md
technique_dict = generate_data_for_md(technique_dict, technique, tactic_list)
File "/home/yash/Downloads/attack-website-master/modules/techniques/techniques.py", line 239, in generate_data_for_md
tactic = [x for x in tactic_list if x['x_mitre_shortname'] == elem['phase_name']][0]
IndexError: list index out of range

@Yash66666
Copy link
Author

Background: I used the predefined collection index and imported only the enterprise collection stix bundle while keeping everything the default.

@Yash66666
Copy link
Author

Also, while importing the collection from the official ATT&CK repository on the frontend workbench, there was an object which could not be imported. Could this be a reason why the issue is occuring?

@Yash66666
Copy link
Author

There is a strange issue, it all seems to work fine for some versions. But for those versions when I edit something on the workbench and then try update-attack.py, it stops working

@Yash66666
Copy link
Author

For instance, It was working for the version 8 of enterprise matrix. But when I just tried to change the description of the enterprise matrix from the frontend and then tried to execute the update-attack.py, it shows the same error again.

@IanDavila
Copy link
Contributor

Hi @Yash66666, thanks for opening this issue. The error looks related to the tactic of a technique. Did you modify a technique or was it only changing the description of the enterprise matrix?

@Yash66666
Copy link
Author

Hi, It was just the description of the matrix. Also I was wondering is there a way to add or modify the assets in the ICS Matrix (this is related to workbench I think). The current assets are HMI, control server, etc. And finally wanted to ask about the ICS website to be integrated with the main Mitre website.

@IanDavila
Copy link
Contributor

We are currently working on adding ICS to the website (See issue #272). We encountered errors on some ICS techniques similar to what you originally provided. If you are trying to integrate ICS technique to the website then it's likely to be that. We are working on making those fixing on the ICS STIX bundle itself. The target to add ICS to the website is during the next ATT&CK content release in April.

Regarding Also I was wondering is there a way to add or modify the assets in the ICS Matrix: Would appreciate if you could open an issue on https://github.com/center-for-threat-informed-defense/attack-workbench-frontend for the team to look into it

@Yash66666
Copy link
Author

Sure thing, Thank you so much!

@jondricek jondricek self-assigned this Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants