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

Add example OpenAI wrapper analytic for ranking suspicious processes #26

Merged

Conversation

mayaCostantini
Copy link
Contributor

The goal of this analytic is to offer a base for prompting an OpenAI model (here ChatGPT) to rank suspicious processes given in the input dataframe.

@CLAassistant
Copy link

CLAassistant commented Apr 25, 2024

CLA assistant check
All committers have signed the CLA.

@mayaCostantini
Copy link
Contributor Author

cc @subbyte @kpeeples

Copy link
Member

@subbyte subbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Would you want to provide a screenshot for people to quickly make sense of this analytics?

And is it helpful to give a little more detailed instructions in the prompt about which field/attribute for GPTs to focus on, e.g., name and command_line to help it finish its job?

@mayaCostantini
Copy link
Contributor Author

Thanks for the review @subbyte ! Here is a screenshot of the analytic applied to a list of processes as extracted from another example huntbook, with the original prompt from this PR:
Screenshot from 2024-04-26 10-15-00

@mayaCostantini
Copy link
Contributor Author

And as suggested, here is the result when asking the model to focus on the name and command_line attributes instead:
Screenshot from 2024-04-26 10-18-01

The answer looks indeed more useful with the new prompt, so I will change it.

@mayaCostantini mayaCostantini marked this pull request as ready for review April 26, 2024 08:20
@subbyte
Copy link
Member

subbyte commented Apr 26, 2024

Cool! Could we have the screenshot as a file like analytics/openai-suspicious-processes/screenshot.png?

And it looks like GPT just grab all processes from the JSON and try to rank them, not understand the variable (in this test) only has one process and all other processes are related ones such as parent process---this requires the understanding of the attributes in the exported JSON, which may requires few shots examples to help the LLM. Anyway, a good starting point, and it is great to see that GPT gives some ideas how these processes can be used in an attack.

@mayaCostantini
Copy link
Contributor Author

Thanks! I will follow-up soon with the improvement you proposed

@subbyte subbyte merged commit 78236ab into opencybersecurityalliance:release May 28, 2024
1 check passed
@mayaCostantini mayaCostantini deleted the openai-wrapper branch May 29, 2024 07:45
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

Successfully merging this pull request may close these issues.

None yet

3 participants