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

Assessment ID #65

Open
iblissguy opened this issue Jan 30, 2022 · 6 comments
Open

Assessment ID #65

iblissguy opened this issue Jan 30, 2022 · 6 comments

Comments

@iblissguy
Copy link

Hi Guys,

How can i get an assessment ID from my gophish?

@mcdonnnj
Copy link
Member

@iblissguy The assessment ID is chosen arbitrarily and used when creating the campaign name. Please see

allCampaigns = api.campaigns.get()
for campaign in allCampaigns:
if campaign.name.startswith(assessment_id):
return True
for the logic in how campaigns are matched for exports.

@iblissguy
Copy link
Author

iblissguy commented Jan 30, 2022

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
Copy link
Member

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
Copy link
Author

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
Copy link
Author

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
Copy link
Member

The provided assessment ID is used to get information in these places:

allCampaigns = api.campaigns.get()
for campaign in allCampaigns:
if campaign.name.startswith(assessment_id):
return True

rawGroup = api.groups.get() # Holds raw list of campaigns from Gophish.
groups = list() # Holds list of campaign IDs that match the assessment.
for group in rawGroup:
group = group.as_dict()
if group["name"].startswith(assessment_id):
groups.append(group["id"])

rawCampaigns = api.campaigns.get() # Holds raw list of campaigns from Gophish.
campaigns = list() # Holds list of campaign IDs that match the assessment.
for campaign in rawCampaigns:
campaign = campaign.as_dict()
if campaign["name"].startswith(assessment_id):
campaigns.append(campaign["id"])

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.

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

2 participants