cisagov / gophish-tools

Helpful tools for interacting with a GoPhish phishing instance
Creative Commons Zero v1.0 Universal
42 stars 6 forks source link

Assessment ID #65

Open iblissguy opened 2 years ago

iblissguy commented 2 years ago

Hi Guys,

How can i get an assessment ID from my gophish?

mcdonnnj commented 2 years ago

@iblissguy The assessment ID is chosen arbitrarily and used when creating the campaign name. Please see https://github.com/cisagov/gophish-tools/blob/b1b36f2df32c594f3584e4a7aa3ea7711bb8fa21/src/tools/gophish_export.py#L55-L58 for the logic in how campaigns are matched for exports.

iblissguy commented 2 years ago

Hey! thanks for answering...

If I understand this right, the export will start from the assessment_id that i put in the commandline like: gophish-export assessment_id FULLURL API_KEY...

But when i do this, i just dont know what to insert in the assessment id. How can i get this ID? is it inside gophish admin panel? is it by terminal?

mcdonnnj commented 2 years ago

The gophish-export tool checks for campaigns/groups that begin with the given assessment ID. It is a completely arbitrary value that is determined by the person using Gophish/this library.

iblissguy commented 2 years ago

i see...

I think i'm missing something. I run gophish-export but no matter what i type in the assessment ID, it does not work.

Do I have to build an assessment ID with the pca-wizard?

iblissguy commented 2 years ago

i tried to find it inside gophish's DB but no lucky

starting to guess that i have to generate the assessment ID in the pca-wizard

mcdonnnj commented 2 years ago

The provided assessment ID is used to get information in these places: https://github.com/cisagov/gophish-tools/blob/d9e5ab65dfa90994afa3f6b93c36884b74b968f3/src/tools/gophish_export.py#L55-L58 https://github.com/cisagov/gophish-tools/blob/d9e5ab65dfa90994afa3f6b93c36884b74b968f3/src/tools/gophish_export.py#L111-L117 https://github.com/cisagov/gophish-tools/blob/d9e5ab65dfa90994afa3f6b93c36884b74b968f3/src/tools/gophish_export.py#L145-L151

The campaign and group names are user created values in the running Gophish instance. If you prefix your campaign and group names with Testing-, then the assessment ID you should give to gophish-export is Testing-. There is no field or location in Gophish that stores an "assessment ID" value.