| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 |
|
| 26 | (define-module (gnu packages cybersecurity)
|
| 27 | #:use-module (guix download)
|
| 28 | #:use-module (guix gexp)
|
| 29 | #:use-module (guix git-download)
|
| 30 | #:use-module (guix packages)
|
| 31 | #:use-module ((guix licenses) #:prefix license:)
|
| 32 | #:use-module (guix build-system cmake)
|
| 33 | #:use-module (guix build-system pyproject)
|
| 34 | #:use-module (gnu packages build-tools)
|
| 35 | #:use-module (gnu packages databases)
|
| 36 | #:use-module (gnu packages check)
|
| 37 | #:use-module (gnu packages cpp)
|
| 38 | #:use-module (gnu packages engineering)
|
| 39 | #:use-module (gnu packages pkg-config)
|
| 40 | #:use-module (gnu packages python)
|
| 41 | #:use-module (gnu packages python-build)
|
| 42 | #:use-module (gnu packages python-compression)
|
| 43 | #:use-module (gnu packages python-crypto)
|
| 44 | #:use-module (gnu packages python-web)
|
| 45 | #:use-module (gnu packages python-xyz)
|
| 46 | #:use-module (gnu packages serialization)
|
| 47 | #:use-module (gnu packages time)
|
| 48 | #:use-module (gnu packages emulators))
|
| 49 |
|
| 50 | (define-public blacksmith
|
| 51 | (package
|
| 52 | (name "blacksmith")
|
| 53 | (version "0.0.2")
|
| 54 | (source (origin
|
| 55 | (method git-fetch)
|
| 56 | (uri (git-reference
|
| 57 | (url "https://github.com/comsec-group/blacksmith")
|
| 58 | (commit version)))
|
| 59 | (file-name (git-file-name name version))
|
| 60 | (sha256
|
| 61 | (base32
|
| 62 | "15ib0lal2sdjb4j2a4r3645w5axbd1a6j8w9f0pxr8v3ra9cjp5m"))
|
| 63 | (modules '((guix build utils)))
|
| 64 | (snippet `(begin
|
| 65 | (delete-file-recursively "external")
|
| 66 | (substitute* "CMakeLists.txt"
|
| 67 | (("add_subdirectory\\(external\\)") "")
|
| 68 | (("[ \t]*FetchContent_MakeAvailable\\(asmjit\\)")
|
| 69 | (string-append
|
| 70 | "find_package(asmjit)\n"
|
| 71 | "find_package(nlohmann_json)")))))))
|
| 72 | (build-system cmake-build-system)
|
| 73 | (arguments
|
| 74 | `(#:tests? #f |
| 75 | #:imported-modules
|
| 76 | ((guix build copy-build-system)
|
| 77 | ,@%cmake-build-system-modules)
|
| 78 | #:modules
|
| 79 | (((guix build copy-build-system) #:prefix copy:)
|
| 80 | (guix build cmake-build-system)
|
| 81 | (guix build utils))
|
| 82 | #:phases
|
| 83 | (modify-phases %standard-phases
|
| 84 | (add-after 'unpack 'fix-build
|
| 85 | (lambda _
|
| 86 | (substitute* "CMakeLists.txt"
|
| 87 | |
| 88 | (("cxx_std_17") "")
|
| 89 | |
| 90 | |
| 91 | (("argagg") ""))))
|
| 92 | (replace 'install
|
| 93 | (lambda args
|
| 94 | (apply (assoc-ref copy:%standard-phases 'install)
|
| 95 | #:install-plan
|
| 96 | '(("." "bin" #:include ("blacksmith"))
|
| 97 | ("." "lib" #:include-regexp ("\\.a$")))
|
| 98 | args))))))
|
| 99 | (native-inputs
|
| 100 | (list pkg-config))
|
| 101 | (inputs
|
| 102 | (list argagg asmjit nlohmann-json))
|
| 103 | (home-page "https://comsec.ethz.ch/research/dram/blacksmith")
|
| 104 | (synopsis "Rowhammer fuzzer with non-uniform and frequency-based patterns")
|
| 105 | (description
|
| 106 | "Blacksmith is an implementation of Rowhammer fuzzer that crafts novel
|
| 107 | non-uniform Rowhammer access patterns based on the concepts of frequency,
|
| 108 | phase, and amplitude. It is able to bypass recent @acronym{TRR, Target Row
|
| 109 | Refresh}in-DRAM mitigations effectively and as such can trigger bit flips.")
|
| 110 | (license license:expat)))
|
| 111 |
|
| 112 | (define-public gallia
|
| 113 | (package
|
| 114 | (name "gallia")
|
| 115 | (version "2.1.1")
|
| 116 | (source
|
| 117 | (origin
|
| 118 | (method git-fetch)
|
| 119 | (uri (git-reference
|
| 120 | (url "https://github.com/Fraunhofer-AISEC/gallia")
|
| 121 | (commit (string-append "v" version))))
|
| 122 | (file-name (git-file-name name version))
|
| 123 | (sha256
|
| 124 | (base32 "04xzh5fi18wrkjs7sqwlv344jf54njvnly042rhxq3x5jrvpvkdw"))))
|
| 125 | (build-system pyproject-build-system)
|
| 126 | (arguments
|
| 127 | (list
|
| 128 | |
| 129 | |
| 130 | |
| 131 | |
| 132 | #:test-flags #~(list "tests/pytest")))
|
| 133 | (native-inputs
|
| 134 | (list python-pytest
|
| 135 | python-pytest-asyncio
|
| 136 | python-uv-build))
|
| 137 | (inputs
|
| 138 | (list python-aiosqlite
|
| 139 | python-argcomplete
|
| 140 | python-boltons
|
| 141 | python-platformdirs
|
| 142 | python-pydantic
|
| 143 | python-tabulate
|
| 144 | python-wcwidth
|
| 145 | python-zstandard))
|
| 146 | (home-page "https://github.com/Fraunhofer-AISEC/gallia")
|
| 147 | (synopsis "Extendable Pentesting Framework")
|
| 148 | (description
|
| 149 | "Gallia is an extendable pentesting framework with the focus on the
|
| 150 | automotive domain. The scope of the toolchain is conducting penetration tests
|
| 151 | from a single ECU up to whole cars.")
|
| 152 | (license license:apsl2)))
|
| 153 |
|
| 154 | (define-public ropgadget
|
| 155 | (package
|
| 156 | (name "ropgadget")
|
| 157 | (version "7.7")
|
| 158 | (source
|
| 159 | (origin
|
| 160 | (method git-fetch)
|
| 161 | (uri (git-reference
|
| 162 | (url "https://github.com/JonathanSalwan/ROPgadget/")
|
| 163 | (commit (string-append "v" version))))
|
| 164 | (file-name (git-file-name name version))
|
| 165 | (sha256
|
| 166 | (base32 "0g87qz8hfiajl1v5z5rxama4531hi9gabzbgkhrbavjj7v3xgavw"))))
|
| 167 | (build-system pyproject-build-system)
|
| 168 | (arguments
|
| 169 | (list
|
| 170 | |
| 171 | |
| 172 | #:tests? #f
|
| 173 | #:phases
|
| 174 | #~(modify-phases %standard-phases
|
| 175 | (replace 'check
|
| 176 | (lambda* (#:key tests? #:allow-other-keys)
|
| 177 | (when tests?
|
| 178 | (with-directory-excursion "test-suite-binaries"
|
| 179 | (invoke "./test.sh"))))))))
|
| 180 | (native-inputs
|
| 181 | (list python-setuptools))
|
| 182 | (propagated-inputs
|
| 183 | (list python-capstone))
|
| 184 | (home-page "https://shell-storm.org/project/ROPgadget/")
|
| 185 | (synopsis "Semiautomatic return oriented programming")
|
| 186 | (description
|
| 187 | "This tool lets you search for @acronym{ROP, Return Oriented Programming}
|
| 188 | gadgets in binaries. Some facilities are included for automatically generating
|
| 189 | chains of gadgets to execute system calls.")
|
| 190 | (license license:bsd-3)))
|
| 191 |
|
| 192 | (define-public pwntools
|
| 193 | (package
|
| 194 | (name "pwntools")
|
| 195 | (version "4.15.0")
|
| 196 | (source
|
| 197 | (origin
|
| 198 | (method git-fetch)
|
| 199 | (uri (git-reference
|
| 200 | (url "https://github.com/Gallopsled/pwntools")
|
| 201 | (commit version)))
|
| 202 | (file-name (git-file-name name version))
|
| 203 | (sha256
|
| 204 | (base32 "0phi7gks9w9rim9rzs8cgwznc3xximdpxyj5vrafivziill51qnl"))))
|
| 205 | (build-system pyproject-build-system)
|
| 206 | (arguments
|
| 207 | (list
|
| 208 | #:tests? #f |
| 209 | #:phases
|
| 210 | '(modify-phases %standard-phases
|
| 211 | (add-after 'unpack 'relax-dependencies
|
| 212 | (lambda _
|
| 213 | (substitute* "pyproject.toml"
|
| 214 | (("^ *\"pip.*\",.*")
|
| 215 | "")))))))
|
| 216 | (propagated-inputs
|
| 217 | (list capstone
|
| 218 | python-colored-traceback
|
| 219 | python-dateutil
|
| 220 | python-intervaltree
|
| 221 | python-mako
|
| 222 | python-packaging
|
| 223 | python-paramiko
|
| 224 | python-psutil
|
| 225 | python-pyelftools
|
| 226 | python-pygments
|
| 227 | python-pyserial
|
| 228 | python-pysocks
|
| 229 | python-requests
|
| 230 | ropgadget
|
| 231 | python-rpyc
|
| 232 | python-six
|
| 233 | python-sortedcontainers
|
| 234 | python-unix-ar
|
| 235 | python-zstandard
|
| 236 | unicorn))
|
| 237 | (native-inputs
|
| 238 | (list python-setuptools python-toml))
|
| 239 | (home-page "https://github.com/Gallopsled/pwntools")
|
| 240 | (synopsis
|
| 241 | "Capture-the-flag (CTF) framework and exploit development library")
|
| 242 | (description
|
| 243 | "Pwntools is a capture-the-flag (CTF) framework and exploit development library.
|
| 244 | Written in Python, it is designed for rapid prototyping and development, and
|
| 245 | intended to make exploit writing as simple as possible.")
|
| 246 | (license license:expat)))
|