Skip to content

New attack mode: Association attack#95

Open
Duke-of-Karamel wants to merge 2 commits into
nesfit:masterfrom
Duke-of-Karamel:master
Open

New attack mode: Association attack#95
Duke-of-Karamel wants to merge 2 commits into
nesfit:masterfrom
Duke-of-Karamel:master

Conversation

@Duke-of-Karamel

Copy link
Copy Markdown

Changes in Webadmin, Generator, Runner.
No changes to Database models.

@Duke-of-Karamel

Copy link
Copy Markdown
Author

Sorry for spam of pull requests....

@davidbolvansky

Copy link
Copy Markdown
Contributor

Cool, thanks!

I will do code review this weekend.

@davidbolvansky davidbolvansky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Initial comments.

"all_hashes" should be explained more.

Otherwise I will wait until your thesis is available, so I can better understand your implementation.

There are no tests, so please atleast create some and put them to @ihranicky's manual testing spreadsheet.

Comment thread Dockerfile

# Entrypoint
RUN ["chmod", "+x", "/srv/fitcrack/entrypoint-fitcrack.sh"]
ENTRYPOINT ["/srv/fitcrack/entrypoint-fitcrack.sh"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why we need these changes?

Comment thread boinc_connect_local.sh
@@ -0,0 +1,3 @@
(boinccmd --project 127.0.0.1/fitcrack/ detach || true) &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not needed for our repo.

Comment thread docker-compose-custom-build.yml Outdated
args:
- COMPILER_THREADS=1 # Higher values may cause linker race conditions

command: ./entrypoint-fitcrack.sh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Possibly bad merge of dev branch?

virtual bool requiresDicts() const override {return true;}

virtual bool hasStickyLeftDict() const override {
return m_job->getDistributionMode() == 1 || m_job->getDistributionMode() == 2;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Better to put these constants to enum

/**
* @brief enum for distribution mode options readability
*/
enum DistributionMode {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You have them here, so move this declaration somewhere else, into some more general header, so we can use these named constants everywhere.


case Config::AttackMode::AttackAssoc:
if (job->getDistributionMode() == 0){ //
if (job->getAttackSubmode() == 1) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Use enum instead of numbers, as explained above.

echo "Project already exists."

usermod -d /var/lib/mysql/ mysql
# Fix MySQL socket permissions

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bad merge?

job['keyspace'] = job['hc_keyspace'] * ruleFileMultiplier

# in case of rule distribution hashcat keyspace is defined by rules
if job['attack_settings']['distribution_mode'] == 2:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Create same "enum" also in python, so you can use it here, instead of "2".

if self.job.rulesFile:
rules = self.job.rulesFile.count
return self.hc_keyspace * rules if rules else self.hc_keyspace
elif self.job.attack_mode == 10 and self.job.distribution_mode == 2:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same here and everywhere where you use magic constants.

// All ok!
return true
case 'association':
return state.leftDicts.reduce((total, current)=>total+current.keyspace, 0) == state.validatedHashes.length

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please format properly.

@davidbolvansky davidbolvansky force-pushed the dev branch 2 times, most recently from 35da608 to 3c6de50 Compare July 16, 2023 21:46
@alpatron alpatron self-assigned this Jul 19, 2024
@alpatron alpatron changed the base branch from dev to master June 12, 2025 14:58

@alpatron alpatron left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Okay. I will have to test the thing, then implement the changes requested, then re-test, and also investigate the remaining review questions.

Moreover, I need to check how this PR is impacted by some of the newer pulled PRs; most notably the PR to update the way cracking time is estimated and the performance updates.

Also, I think as of now this will not work because the code is made for FC before the hash list update, so I'll probably most definitely need to update it for that.

Comment thread Dockerfile

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah. I also think the changes here are nonsense. Will test and remove.

Comment thread boinc_connect_local.sh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah. I also think the changes here are nonsense. Will test and remove.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I too have zero idea what the changes here are supposed to mean.

Comment thread rebuild_docker.sh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah. I also think the changes here are nonsense. Will test and remove.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I suppose I agree with David's points and will implement them.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a very long file. I haven't read through it yet, but I think I suppose that this file is largely based on the dictionary attack file? I think I'll want to do a diff with that to see the relevant parts.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a very long file. I haven't read through it yet, but I think I suppose that this file is largely based on the dictionary attack file? I think I'll want to do a diff with that to see the relevant parts.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't understand the need for the m_all_hashes. If it was mentioned in the thesis, I may have forgotten.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ahh, I see David's point. Yeah, we'll probably do it like that.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah. I also think the changes here are nonsense. Will test and remove.

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.

3 participants