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

building tests for agent #853

Closed
23 tasks done
Tracked by #834
zyronix opened this issue Feb 6, 2023 · 6 comments
Closed
23 tasks done
Tracked by #834

building tests for agent #853

zyronix opened this issue Feb 6, 2023 · 6 comments
Assignees

Comments

@zyronix
Copy link
Member

zyronix commented Feb 6, 2023

  • How easy is it to test against a real server?
  • Built tests for Hashcat cracking flow
  • Keyspace
  • Benchmark
  • Real cracking
  • Setup Windows devcontainer
  • Allow to run real hashcat on windows
  • Allow to debug unittest
  • Test windows download cracker
  • Test windows keyspace
  • Test windows benchmark
  • Test windows cracking

Required test cases

  • Test with worlist/rules '-a0'
  • Test with space -a3
  • Test runtime benchmark
  • Test with prince
  • Test with prince and rules and speedbenchmark
  • Test preprocessor windows
  • Test with brain
  • Test Agent upgrade
  • Test file with 7z
  • Test file with 7z windows

Discussion:

  • How can we crack passwords containing spaces with bruteforce in the attack command?
@zyronix
Copy link
Member Author

zyronix commented Feb 7, 2023

Solution to test against real server:

Temp fix:

  • Test against APIv2 (for creating tasks etc, not implementing user api).
  • Create instructions how to run the tests

Final solution:

  • User API Python module in separate module
  • Github actions flow:
  • Git clone agent code
  • Git clone server code
  • Git clone python-module code
  • Start devcontainerserver
  • Start devcontainer agent
  • Run tests against the real server

@zyronix zyronix self-assigned this Feb 8, 2023
@zyronix zyronix moved this to 🏗 In progress in Development Plans Feb 8, 2023
@zyronix
Copy link
Member Author

zyronix commented Feb 8, 2023

Regarding devcontainer for windows development based on the nanoserver image for example. This does not seem to be possible: microsoft/vscode-remote-release#445

Possible workaround:
Install OpenSSH into the container; connect with remote-ssh to the container.

Setup notes:

  • Install Container Feature and Hyper-V feature
  • Right click on the Docker Desktop, select 'Switch to Windows containers'
  • Start container in powershell with: docker run -it mcr.microsoft.com/windows-cssc/python3.7nanoserver:ltsc2022 cmd.exe

@zyronix
Copy link
Member Author

zyronix commented Feb 22, 2023

Test with space -a3, this is a kinda special case. On the CLI you normally do this through quotes. For example:

./crackers/1/hashcat.bin -a3 -m0 4061727a2162d43085a7444fad8464c4 ?l?l?l" "l?l
But quotes are escaped.

@zyronix
Copy link
Member Author

zyronix commented Feb 22, 2023

Note: usePrince is already broken. As it is deprecated and replace with preprocessorCmds I am not investing time in fixing this.

@zyronix
Copy link
Member Author

zyronix commented Feb 27, 2023

Note: no test needed for upgrade. No paths are involved here.

@zyronix zyronix moved this from 🏗 In progress to ✅ Done in Development Plans Feb 27, 2023
@zyronix
Copy link
Member Author

zyronix commented Feb 27, 2023

Will be solved in hashtopolis/agent-python#36

@zyronix zyronix closed this as completed Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

No branches or pull requests

1 participant