-
Notifications
You must be signed in to change notification settings - Fork 31
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
New attack mode: Association attack #95
base: dev
Are you sure you want to change the base?
Conversation
Sorry for spam of pull requests.... |
Cool, thanks! I will do code review this weekend. |
There was a problem hiding this comment.
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.
# Entrypoint | ||
RUN ["chmod", "+x", "/srv/fitcrack/entrypoint-fitcrack.sh"] | ||
ENTRYPOINT ["/srv/fitcrack/entrypoint-fitcrack.sh"] |
There was a problem hiding this comment.
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?
@@ -0,0 +1,3 @@ | |||
(boinccmd --project 127.0.0.1/fitcrack/ detach || true) && |
There was a problem hiding this comment.
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.
# Configuration of the build context | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
args: | ||
- COMPILER_THREADS=1 # Higher values may cause linker race conditions | ||
|
||
command: ./entrypoint-fitcrack.sh |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
@@ -112,6 +112,33 @@ std::vector<std::string> CAbstractGenerator::getStickyFiles(PtrJob &job) { | |||
std::to_string(job->getId())+".dict"); | |||
break; | |||
|
|||
case Config::AttackMode::AttackAssoc: | |||
if (job->getDistributionMode() == 0){ // | |||
if (job->getAttackSubmode() == 1) { |
There was a problem hiding this comment.
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.
@@ -32,6 +32,14 @@ echo "============================================================" | |||
# Check if project exists. If not, create it. | |||
if [ -d "$BOINC_PROJECT_DIR" ]; then | |||
echo "Project already exists." | |||
|
|||
usermod -d /var/lib/mysql/ mysql | |||
# Fix MySQL socket permissions |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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".
@@ -670,6 +670,8 @@ def keyspace(self): | |||
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: |
There was a problem hiding this comment.
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.
@@ -158,6 +158,8 @@ export default { | |||
|
|||
// All ok! | |||
return true | |||
case 'association': | |||
return state.leftDicts.reduce((total, current)=>total+current.keyspace, 0) == state.validatedHashes.length |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please format properly.
35da608
to
3c6de50
Compare
Changes in Webadmin, Generator, Runner.
No changes to Database models.