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

nixos/security.cyber-toolnix: add module #345300

Closed
wants to merge 1 commit into from

Conversation

D3vil0p3r
Copy link
Member

This module is used to install pentesting tools based on the chosen role. Options are:

  • blue (Blue Teamer),
  • bugbounty (Bug Bounty Hunter),
  • cracker (Cracker Specialist),
  • dos (DoS Tester),
  • forensic (Forensic Specialist),
  • malware (Malware Analyst),
  • mobile (Mobile Specialist),
  • network (Network Specialist),
  • osint (OSINT Specialist),
  • red (Red Teamer),
  • student (Student),
  • web (Web Pentester)

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Sep 29, 2024
@D3vil0p3r D3vil0p3r marked this pull request as ready for review September 29, 2024 14:34
This module is used to install pentesting tools based on the chosen role. Options are:
* `blue` (Blue Teamer),
* `bugbounty` (Bug Bounty Hunter),
* `cracker` (Cracker Specialist),
* `dos` (DoS Tester),
* `forensic` (Forensic Specialist),
* `malware` (Malware Analyst),
* `mobile` (Mobile Specialist),
* `network` (Network Specialist),
* `osint` (OSINT Specialist),
* `red` (Red Teamer),
* `student` (Student),
* `web` (Web Pentester)
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Sep 29, 2024
@bcdarwin
Copy link
Member

Is there any precedent for using nixos modules for what is essentially a package collection (similar to what Debian calls a 'metapackage')? (Versus, say, a standalone repo/flake which just provides the attrset of package lists supplied by this module?)

@Letgamer
Copy link

I would propose to deny this pull request, I am not familiar with the governance and RFC's in Nix, but apparently Meta-Packages are not official features Discourse and would add another layer of complexity/maintaining to the repository.
This is not the place to discuss the edition of such a big feature.
Maybe you would be so kind to share your opinion SuperSandro2000

@D3vil0p3r
Copy link
Member Author

How manage "metapackages"-like?

@h7x4 h7x4 added the 8.has: module (new) This PR adds a module in `nixos/` label Sep 29, 2024
@kirillrdy
Copy link
Member

cc @SuperSandro2000 @wegank @NickCao

Copy link
Member

@oxzi oxzi left a comment

Choose a reason for hiding this comment

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

First, thanks for your effort and creating this great collection.

However, as already stated from others, I am unsure how fitting this collection is for the nixpkgs as meta-package. Maybe providing these roles outside of the nixpkgs would be more useful, e.g., in another repository or in the wiki.

Lastly, this may be just a personal or cultural thing, but the name "cyber" is a bit vague. Just call it pentesting-tools or the like.

Comment on lines +12 to +23
blue = import ./roles/blue.nix { inherit pkgs; };
bugbounty = import ./roles/bugbounty.nix { inherit pkgs; };
cracker = import ./roles/cracker.nix { inherit pkgs; };
dos = import ./roles/dos.nix { inherit pkgs; };
forensic = import ./roles/forensic.nix { inherit pkgs; };
malware = import ./roles/malware.nix { inherit pkgs; };
mobile = import ./roles/mobile.nix { inherit pkgs; };
network = import ./roles/network.nix { inherit pkgs; };
osint = import ./roles/osint.nix { inherit pkgs; };
red = import ./roles/red.nix { inherit pkgs; };
student = import ./roles/student.nix { inherit pkgs; };
web = import ./roles/web.nix { inherit pkgs; };
Copy link
Member

Choose a reason for hiding this comment

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

With no offense, I think the roles are a bit arbitrary and I am unsure that someone specially wants all tools from a one rule, and not select those tools necessary for the task at hand. Thus, I am unsure how helpful the whole idea of this PR is.

Copy link
Member Author

Choose a reason for hiding this comment

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

Instead of roles we can set categories (i.e., nix-wireless, nix-networking, nix-recon, and so on). I am open to change that name. About pentesting-tools, yes, even if there are some tools (i.e., for the part of the defense) that I dont think can be under the "pentesting" terms, despite they are used in the cyber security context (for Blue Team part).

Copy link
Member

Choose a reason for hiding this comment

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

Instead of roles we can set categories (i.e., nix-wireless, nix-networking, nix-recon, and so on).

Pardon, but what is the difference between roles and categories? I would think about smaller categories (to stick with the name), but then allow multiple categories, not just one.

Furthermore, it should be document what each category contains, as at the moment it just loads hundreds (!) of packages in your environment without really communicating what will be available. So the user will end up with lots of tools, but not known which or how to deal with them.

Btw, have you evaluated how much storage is necessary for the bigger categories?

Copy link
Member Author

@D3vil0p3r D3vil0p3r Sep 30, 2024

Choose a reason for hiding this comment

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

No, but I can try to do that. I mentioned categories just as occurs in other pentesting distros as Kali Linux or BlackArch.

@SuperSandro2000
Copy link
Member

Yeah, same. I don't think there is much point of those meta package lists and I don't think it is a good reason to do it because Kali installs does things by default or with a meta package. If people need a tool or specific set of tools for some specific project or task or course or something, then that should be tracked outside of nixpkgs.


but the name "cyber" is a bit vague

That reminds me of https://www.youtube.com/watch?v=WY6KkRsS26M :)

@D3vil0p3r
Copy link
Member Author

D3vil0p3r commented Sep 30, 2024

Thank you for your feedbacks. If you agree, and there is no a more efficient way or interest to organize pentesting tools, I can close this PR. Please let me know.

@fabaff
Copy link
Member

fabaff commented Sep 30, 2024

My simple way to track the toolset is https://github.com/fabaff/nix-security-box. There the packages are grouped at my personal discretion. The grouping is done not so much on a role-based model but more on tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: documentation 8.has: module (new) This PR adds a module in `nixos/` 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants