├── .git-blame-ignore-revs ├── .github ├── FUNDING.yml └── workflows │ ├── release.yml │ └── test.yml ├── .gitignore ├── LICENSE ├── README.md ├── poetry.lock ├── print-coverage.py ├── pyproject.toml ├── sigma ├── backends │ └── crowdstrike │ │ ├── __init__.py │ │ └── logscale.py └── pipelines │ └── crowdstrike │ ├── __init__.py │ └── crowdstrike.py └── tests ├── test_backend_logscale.py └── test_processing_pipelines.py /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # Reformatting with black 2 | 23e63d4e95a7b05aa4c30a265878294f210a4cda -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [thomaspatzke] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release to PyPI 2 | on: 3 | release: 4 | types: [published] 5 | push: 6 | tags: 7 | - v*.*.* 8 | 9 | jobs: 10 | build-and-publish: 11 | runs-on: ubuntu-20.04 12 | environment: release 13 | permissions: 14 | id-token: write 15 | steps: 16 | - uses: actions/checkout@v4 17 | - name: Set up Python 18 | uses: actions/setup-python@v5 19 | with: 20 | python-version: '3.11' 21 | - name: Install Poetry 22 | run: pipx install poetry 23 | - name: Verify versioning 24 | run: | 25 | [ "$(poetry version -s)" == "${GITHUB_REF#refs/tags/v}" ] 26 | - name: Install dependencies 27 | run: poetry install 28 | - name: Run tests 29 | run: poetry run pytest 30 | - name: Build packages 31 | run: poetry build 32 | - name: Publish to test PyPI 33 | if: ${{ github.event_name == 'push' }} 34 | uses: pypa/gh-action-pypi-publish@release/v1 35 | with: 36 | repository-url: https://test.pypi.org/legacy/ 37 | - name: Publish to PyPI 38 | if: ${{ github.event_name == 'release' }} 39 | uses: pypa/gh-action-pypi-publish@release/v1 -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Test 2 | on: 3 | push: 4 | branches: [ "*" ] 5 | pull_request: 6 | branches: [ "*" ] 7 | workflow_dispatch: 8 | 9 | jobs: 10 | test: 11 | strategy: 12 | matrix: 13 | os: [ 'ubuntu-20.04' ] 14 | python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] 15 | runs-on: ${{ matrix.os }} 16 | steps: 17 | - uses: actions/checkout@v4 18 | - name: Install Poetry 19 | run: pipx install poetry 20 | - name: Set up Python 21 | uses: actions/setup-python@v5 22 | with: 23 | python-version: ${{ matrix.python-version }} 24 | cache: poetry 25 | - name: Install dependencies 26 | run: poetry install 27 | - name: Run tests 28 | run: poetry run pytest --cov=sigma --cov-report term --cov-report xml:cov.xml -vv 29 | - name: Store coverage for badge 30 | if: ${{ runner.os == 'Linux' }} 31 | run: poetry run python print-coverage.py >> $GITHUB_ENV 32 | - name: Create coverage badge 33 | if: ${{ github.repository == 'SigmaHQ/pySigma-pipeline-crowdstrike' && github.event_name == 'push' && runner.os == 'Linux' }} 34 | uses: schneegans/dynamic-badges-action@v1.1.0 35 | with: 36 | auth: ${{ secrets.GIST_SECRET }} 37 | gistID: 46f41e1fcf5eaab808ff5742401ac42d 38 | filename: SigmaHQ-pySigma-backend-crowdstrike.json 39 | label: Coverage 40 | message: ${{ env.COVERAGE }} 41 | color: ${{ env.COVERAGE_COLOR }} 42 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .coverage* 2 | .vscode/ 3 | **/__pycache__ 4 | cov.xml 5 | dist/ 6 | docs/_build -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 2.1, February 1999 3 | 4 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | [This is the first released version of the Lesser GPL. It also counts 10 | as the successor of the GNU Library Public License, version 2, hence 11 | the version number 2.1.] 12 | 13 | Preamble 14 | 15 | The licenses for most software are designed to take away your 16 | freedom to share and change it. By contrast, the GNU General Public 17 | Licenses are intended to guarantee your freedom to share and change 18 | free software--to make sure the software is free for all its users. 19 | 20 | This license, the Lesser General Public License, applies to some 21 | specially designated software packages--typically libraries--of the 22 | Free Software Foundation and other authors who decide to use it. You 23 | can use it too, but we suggest you first think carefully about whether 24 | this license or the ordinary General Public License is the better 25 | strategy to use in any particular case, based on the explanations below. 26 | 27 | When we speak of free software, we are referring to freedom of use, 28 | not price. Our General Public Licenses are designed to make sure that 29 | you have the freedom to distribute copies of free software (and charge 30 | for this service if you wish); that you receive source code or can get 31 | it if you want it; that you can change the software and use pieces of 32 | it in new free programs; and that you are informed that you can do 33 | these things. 34 | 35 | To protect your rights, we need to make restrictions that forbid 36 | distributors to deny you these rights or to ask you to surrender these 37 | rights. These restrictions translate to certain responsibilities for 38 | you if you distribute copies of the library or if you modify it. 39 | 40 | For example, if you distribute copies of the library, whether gratis 41 | or for a fee, you must give the recipients all the rights that we gave 42 | you. You must make sure that they, too, receive or can get the source 43 | code. If you link other code with the library, you must provide 44 | complete object files to the recipients, so that they can relink them 45 | with the library after making changes to the library and recompiling 46 | it. And you must show them these terms so they know their rights. 47 | 48 | We protect your rights with a two-step method: (1) we copyright the 49 | library, and (2) we offer you this license, which gives you legal 50 | permission to copy, distribute and/or modify the library. 51 | 52 | To protect each distributor, we want to make it very clear that 53 | there is no warranty for the free library. Also, if the library is 54 | modified by someone else and passed on, the recipients should know 55 | that what they have is not the original version, so that the original 56 | author's reputation will not be affected by problems that might be 57 | introduced by others. 58 | 59 | Finally, software patents pose a constant threat to the existence of 60 | any free program. We wish to make sure that a company cannot 61 | effectively restrict the users of a free program by obtaining a 62 | restrictive license from a patent holder. Therefore, we insist that 63 | any patent license obtained for a version of the library must be 64 | consistent with the full freedom of use specified in this license. 65 | 66 | Most GNU software, including some libraries, is covered by the 67 | ordinary GNU General Public License. This license, the GNU Lesser 68 | General Public License, applies to certain designated libraries, and 69 | is quite different from the ordinary General Public License. We use 70 | this license for certain libraries in order to permit linking those 71 | libraries into non-free programs. 72 | 73 | When a program is linked with a library, whether statically or using 74 | a shared library, the combination of the two is legally speaking a 75 | combined work, a derivative of the original library. The ordinary 76 | General Public License therefore permits such linking only if the 77 | entire combination fits its criteria of freedom. The Lesser General 78 | Public License permits more lax criteria for linking other code with 79 | the library. 80 | 81 | We call this license the "Lesser" General Public License because it 82 | does Less to protect the user's freedom than the ordinary General 83 | Public License. It also provides other free software developers Less 84 | of an advantage over competing non-free programs. These disadvantages 85 | are the reason we use the ordinary General Public License for many 86 | libraries. However, the Lesser license provides advantages in certain 87 | special circumstances. 88 | 89 | For example, on rare occasions, there may be a special need to 90 | encourage the widest possible use of a certain library, so that it becomes 91 | a de-facto standard. To achieve this, non-free programs must be 92 | allowed to use the library. A more frequent case is that a free 93 | library does the same job as widely used non-free libraries. In this 94 | case, there is little to gain by limiting the free library to free 95 | software only, so we use the Lesser General Public License. 96 | 97 | In other cases, permission to use a particular library in non-free 98 | programs enables a greater number of people to use a large body of 99 | free software. For example, permission to use the GNU C Library in 100 | non-free programs enables many more people to use the whole GNU 101 | operating system, as well as its variant, the GNU/Linux operating 102 | system. 103 | 104 | Although the Lesser General Public License is Less protective of the 105 | users' freedom, it does ensure that the user of a program that is 106 | linked with the Library has the freedom and the wherewithal to run 107 | that program using a modified version of the Library. 108 | 109 | The precise terms and conditions for copying, distribution and 110 | modification follow. Pay close attention to the difference between a 111 | "work based on the library" and a "work that uses the library". The 112 | former contains code derived from the library, whereas the latter must 113 | be combined with the library in order to run. 114 | 115 | GNU LESSER GENERAL PUBLIC LICENSE 116 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 117 | 118 | 0. This License Agreement applies to any software library or other 119 | program which contains a notice placed by the copyright holder or 120 | other authorized party saying it may be distributed under the terms of 121 | this Lesser General Public License (also called "this License"). 122 | Each licensee is addressed as "you". 123 | 124 | A "library" means a collection of software functions and/or data 125 | prepared so as to be conveniently linked with application programs 126 | (which use some of those functions and data) to form executables. 127 | 128 | The "Library", below, refers to any such software library or work 129 | which has been distributed under these terms. A "work based on the 130 | Library" means either the Library or any derivative work under 131 | copyright law: that is to say, a work containing the Library or a 132 | portion of it, either verbatim or with modifications and/or translated 133 | straightforwardly into another language. (Hereinafter, translation is 134 | included without limitation in the term "modification".) 135 | 136 | "Source code" for a work means the preferred form of the work for 137 | making modifications to it. For a library, complete source code means 138 | all the source code for all modules it contains, plus any associated 139 | interface definition files, plus the scripts used to control compilation 140 | and installation of the library. 141 | 142 | Activities other than copying, distribution and modification are not 143 | covered by this License; they are outside its scope. The act of 144 | running a program using the Library is not restricted, and output from 145 | such a program is covered only if its contents constitute a work based 146 | on the Library (independent of the use of the Library in a tool for 147 | writing it). Whether that is true depends on what the Library does 148 | and what the program that uses the Library does. 149 | 150 | 1. You may copy and distribute verbatim copies of the Library's 151 | complete source code as you receive it, in any medium, provided that 152 | you conspicuously and appropriately publish on each copy an 153 | appropriate copyright notice and disclaimer of warranty; keep intact 154 | all the notices that refer to this License and to the absence of any 155 | warranty; and distribute a copy of this License along with the 156 | Library. 157 | 158 | You may charge a fee for the physical act of transferring a copy, 159 | and you may at your option offer warranty protection in exchange for a 160 | fee. 161 | 162 | 2. You may modify your copy or copies of the Library or any portion 163 | of it, thus forming a work based on the Library, and copy and 164 | distribute such modifications or work under the terms of Section 1 165 | above, provided that you also meet all of these conditions: 166 | 167 | a) The modified work must itself be a software library. 168 | 169 | b) You must cause the files modified to carry prominent notices 170 | stating that you changed the files and the date of any change. 171 | 172 | c) You must cause the whole of the work to be licensed at no 173 | charge to all third parties under the terms of this License. 174 | 175 | d) If a facility in the modified Library refers to a function or a 176 | table of data to be supplied by an application program that uses 177 | the facility, other than as an argument passed when the facility 178 | is invoked, then you must make a good faith effort to ensure that, 179 | in the event an application does not supply such function or 180 | table, the facility still operates, and performs whatever part of 181 | its purpose remains meaningful. 182 | 183 | (For example, a function in a library to compute square roots has 184 | a purpose that is entirely well-defined independent of the 185 | application. Therefore, Subsection 2d requires that any 186 | application-supplied function or table used by this function must 187 | be optional: if the application does not supply it, the square 188 | root function must still compute square roots.) 189 | 190 | These requirements apply to the modified work as a whole. If 191 | identifiable sections of that work are not derived from the Library, 192 | and can be reasonably considered independent and separate works in 193 | themselves, then this License, and its terms, do not apply to those 194 | sections when you distribute them as separate works. But when you 195 | distribute the same sections as part of a whole which is a work based 196 | on the Library, the distribution of the whole must be on the terms of 197 | this License, whose permissions for other licensees extend to the 198 | entire whole, and thus to each and every part regardless of who wrote 199 | it. 200 | 201 | Thus, it is not the intent of this section to claim rights or contest 202 | your rights to work written entirely by you; rather, the intent is to 203 | exercise the right to control the distribution of derivative or 204 | collective works based on the Library. 205 | 206 | In addition, mere aggregation of another work not based on the Library 207 | with the Library (or with a work based on the Library) on a volume of 208 | a storage or distribution medium does not bring the other work under 209 | the scope of this License. 210 | 211 | 3. You may opt to apply the terms of the ordinary GNU General Public 212 | License instead of this License to a given copy of the Library. To do 213 | this, you must alter all the notices that refer to this License, so 214 | that they refer to the ordinary GNU General Public License, version 2, 215 | instead of to this License. (If a newer version than version 2 of the 216 | ordinary GNU General Public License has appeared, then you can specify 217 | that version instead if you wish.) Do not make any other change in 218 | these notices. 219 | 220 | Once this change is made in a given copy, it is irreversible for 221 | that copy, so the ordinary GNU General Public License applies to all 222 | subsequent copies and derivative works made from that copy. 223 | 224 | This option is useful when you wish to copy part of the code of 225 | the Library into a program that is not a library. 226 | 227 | 4. You may copy and distribute the Library (or a portion or 228 | derivative of it, under Section 2) in object code or executable form 229 | under the terms of Sections 1 and 2 above provided that you accompany 230 | it with the complete corresponding machine-readable source code, which 231 | must be distributed under the terms of Sections 1 and 2 above on a 232 | medium customarily used for software interchange. 233 | 234 | If distribution of object code is made by offering access to copy 235 | from a designated place, then offering equivalent access to copy the 236 | source code from the same place satisfies the requirement to 237 | distribute the source code, even though third parties are not 238 | compelled to copy the source along with the object code. 239 | 240 | 5. A program that contains no derivative of any portion of the 241 | Library, but is designed to work with the Library by being compiled or 242 | linked with it, is called a "work that uses the Library". Such a 243 | work, in isolation, is not a derivative work of the Library, and 244 | therefore falls outside the scope of this License. 245 | 246 | However, linking a "work that uses the Library" with the Library 247 | creates an executable that is a derivative of the Library (because it 248 | contains portions of the Library), rather than a "work that uses the 249 | library". The executable is therefore covered by this License. 250 | Section 6 states terms for distribution of such executables. 251 | 252 | When a "work that uses the Library" uses material from a header file 253 | that is part of the Library, the object code for the work may be a 254 | derivative work of the Library even though the source code is not. 255 | Whether this is true is especially significant if the work can be 256 | linked without the Library, or if the work is itself a library. The 257 | threshold for this to be true is not precisely defined by law. 258 | 259 | If such an object file uses only numerical parameters, data 260 | structure layouts and accessors, and small macros and small inline 261 | functions (ten lines or less in length), then the use of the object 262 | file is unrestricted, regardless of whether it is legally a derivative 263 | work. (Executables containing this object code plus portions of the 264 | Library will still fall under Section 6.) 265 | 266 | Otherwise, if the work is a derivative of the Library, you may 267 | distribute the object code for the work under the terms of Section 6. 268 | Any executables containing that work also fall under Section 6, 269 | whether or not they are linked directly with the Library itself. 270 | 271 | 6. As an exception to the Sections above, you may also combine or 272 | link a "work that uses the Library" with the Library to produce a 273 | work containing portions of the Library, and distribute that work 274 | under terms of your choice, provided that the terms permit 275 | modification of the work for the customer's own use and reverse 276 | engineering for debugging such modifications. 277 | 278 | You must give prominent notice with each copy of the work that the 279 | Library is used in it and that the Library and its use are covered by 280 | this License. You must supply a copy of this License. If the work 281 | during execution displays copyright notices, you must include the 282 | copyright notice for the Library among them, as well as a reference 283 | directing the user to the copy of this License. Also, you must do one 284 | of these things: 285 | 286 | a) Accompany the work with the complete corresponding 287 | machine-readable source code for the Library including whatever 288 | changes were used in the work (which must be distributed under 289 | Sections 1 and 2 above); and, if the work is an executable linked 290 | with the Library, with the complete machine-readable "work that 291 | uses the Library", as object code and/or source code, so that the 292 | user can modify the Library and then relink to produce a modified 293 | executable containing the modified Library. (It is understood 294 | that the user who changes the contents of definitions files in the 295 | Library will not necessarily be able to recompile the application 296 | to use the modified definitions.) 297 | 298 | b) Use a suitable shared library mechanism for linking with the 299 | Library. A suitable mechanism is one that (1) uses at run time a 300 | copy of the library already present on the user's computer system, 301 | rather than copying library functions into the executable, and (2) 302 | will operate properly with a modified version of the library, if 303 | the user installs one, as long as the modified version is 304 | interface-compatible with the version that the work was made with. 305 | 306 | c) Accompany the work with a written offer, valid for at 307 | least three years, to give the same user the materials 308 | specified in Subsection 6a, above, for a charge no more 309 | than the cost of performing this distribution. 310 | 311 | d) If distribution of the work is made by offering access to copy 312 | from a designated place, offer equivalent access to copy the above 313 | specified materials from the same place. 314 | 315 | e) Verify that the user has already received a copy of these 316 | materials or that you have already sent this user a copy. 317 | 318 | For an executable, the required form of the "work that uses the 319 | Library" must include any data and utility programs needed for 320 | reproducing the executable from it. However, as a special exception, 321 | the materials to be distributed need not include anything that is 322 | normally distributed (in either source or binary form) with the major 323 | components (compiler, kernel, and so on) of the operating system on 324 | which the executable runs, unless that component itself accompanies 325 | the executable. 326 | 327 | It may happen that this requirement contradicts the license 328 | restrictions of other proprietary libraries that do not normally 329 | accompany the operating system. Such a contradiction means you cannot 330 | use both them and the Library together in an executable that you 331 | distribute. 332 | 333 | 7. You may place library facilities that are a work based on the 334 | Library side-by-side in a single library together with other library 335 | facilities not covered by this License, and distribute such a combined 336 | library, provided that the separate distribution of the work based on 337 | the Library and of the other library facilities is otherwise 338 | permitted, and provided that you do these two things: 339 | 340 | a) Accompany the combined library with a copy of the same work 341 | based on the Library, uncombined with any other library 342 | facilities. This must be distributed under the terms of the 343 | Sections above. 344 | 345 | b) Give prominent notice with the combined library of the fact 346 | that part of it is a work based on the Library, and explaining 347 | where to find the accompanying uncombined form of the same work. 348 | 349 | 8. You may not copy, modify, sublicense, link with, or distribute 350 | the Library except as expressly provided under this License. Any 351 | attempt otherwise to copy, modify, sublicense, link with, or 352 | distribute the Library is void, and will automatically terminate your 353 | rights under this License. However, parties who have received copies, 354 | or rights, from you under this License will not have their licenses 355 | terminated so long as such parties remain in full compliance. 356 | 357 | 9. You are not required to accept this License, since you have not 358 | signed it. However, nothing else grants you permission to modify or 359 | distribute the Library or its derivative works. These actions are 360 | prohibited by law if you do not accept this License. Therefore, by 361 | modifying or distributing the Library (or any work based on the 362 | Library), you indicate your acceptance of this License to do so, and 363 | all its terms and conditions for copying, distributing or modifying 364 | the Library or works based on it. 365 | 366 | 10. Each time you redistribute the Library (or any work based on the 367 | Library), the recipient automatically receives a license from the 368 | original licensor to copy, distribute, link with or modify the Library 369 | subject to these terms and conditions. You may not impose any further 370 | restrictions on the recipients' exercise of the rights granted herein. 371 | You are not responsible for enforcing compliance by third parties with 372 | this License. 373 | 374 | 11. If, as a consequence of a court judgment or allegation of patent 375 | infringement or for any other reason (not limited to patent issues), 376 | conditions are imposed on you (whether by court order, agreement or 377 | otherwise) that contradict the conditions of this License, they do not 378 | excuse you from the conditions of this License. If you cannot 379 | distribute so as to satisfy simultaneously your obligations under this 380 | License and any other pertinent obligations, then as a consequence you 381 | may not distribute the Library at all. For example, if a patent 382 | license would not permit royalty-free redistribution of the Library by 383 | all those who receive copies directly or indirectly through you, then 384 | the only way you could satisfy both it and this License would be to 385 | refrain entirely from distribution of the Library. 386 | 387 | If any portion of this section is held invalid or unenforceable under any 388 | particular circumstance, the balance of the section is intended to apply, 389 | and the section as a whole is intended to apply in other circumstances. 390 | 391 | It is not the purpose of this section to induce you to infringe any 392 | patents or other property right claims or to contest validity of any 393 | such claims; this section has the sole purpose of protecting the 394 | integrity of the free software distribution system which is 395 | implemented by public license practices. Many people have made 396 | generous contributions to the wide range of software distributed 397 | through that system in reliance on consistent application of that 398 | system; it is up to the author/donor to decide if he or she is willing 399 | to distribute software through any other system and a licensee cannot 400 | impose that choice. 401 | 402 | This section is intended to make thoroughly clear what is believed to 403 | be a consequence of the rest of this License. 404 | 405 | 12. If the distribution and/or use of the Library is restricted in 406 | certain countries either by patents or by copyrighted interfaces, the 407 | original copyright holder who places the Library under this License may add 408 | an explicit geographical distribution limitation excluding those countries, 409 | so that distribution is permitted only in or among countries not thus 410 | excluded. In such case, this License incorporates the limitation as if 411 | written in the body of this License. 412 | 413 | 13. The Free Software Foundation may publish revised and/or new 414 | versions of the Lesser General Public License from time to time. 415 | Such new versions will be similar in spirit to the present version, 416 | but may differ in detail to address new problems or concerns. 417 | 418 | Each version is given a distinguishing version number. If the Library 419 | specifies a version number of this License which applies to it and 420 | "any later version", you have the option of following the terms and 421 | conditions either of that version or of any later version published by 422 | the Free Software Foundation. If the Library does not specify a 423 | license version number, you may choose any version ever published by 424 | the Free Software Foundation. 425 | 426 | 14. If you wish to incorporate parts of the Library into other free 427 | programs whose distribution conditions are incompatible with these, 428 | write to the author to ask for permission. For software which is 429 | copyrighted by the Free Software Foundation, write to the Free 430 | Software Foundation; we sometimes make exceptions for this. Our 431 | decision will be guided by the two goals of preserving the free status 432 | of all derivatives of our free software and of promoting the sharing 433 | and reuse of software generally. 434 | 435 | NO WARRANTY 436 | 437 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO 438 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. 439 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR 440 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY 441 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE 442 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 443 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 444 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME 445 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 446 | 447 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN 448 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY 449 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU 450 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR 451 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE 452 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING 453 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A 454 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF 455 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 456 | DAMAGES. 457 | 458 | END OF TERMS AND CONDITIONS 459 | 460 | How to Apply These Terms to Your New Libraries 461 | 462 | If you develop a new library, and you want it to be of the greatest 463 | possible use to the public, we recommend making it free software that 464 | everyone can redistribute and change. You can do so by permitting 465 | redistribution under these terms (or, alternatively, under the terms of the 466 | ordinary General Public License). 467 | 468 | To apply these terms, attach the following notices to the library. It is 469 | safest to attach them to the start of each source file to most effectively 470 | convey the exclusion of warranty; and each file should have at least the 471 | "copyright" line and a pointer to where the full notice is found. 472 | 473 | 474 | Copyright (C) 475 | 476 | This library is free software; you can redistribute it and/or 477 | modify it under the terms of the GNU Lesser General Public 478 | License as published by the Free Software Foundation; either 479 | version 2.1 of the License, or (at your option) any later version. 480 | 481 | This library is distributed in the hope that it will be useful, 482 | but WITHOUT ANY WARRANTY; without even the implied warranty of 483 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 484 | Lesser General Public License for more details. 485 | 486 | You should have received a copy of the GNU Lesser General Public 487 | License along with this library; if not, write to the Free Software 488 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 489 | USA 490 | 491 | Also add information on how to contact you by electronic and paper mail. 492 | 493 | You should also get your employer (if you work as a programmer) or your 494 | school, if any, to sign a "copyright disclaimer" for the library, if 495 | necessary. Here is a sample; alter the names: 496 | 497 | Yoyodyne, Inc., hereby disclaims all copyright interest in the 498 | library `Frob' (a library for tweaking knobs) written by James Random 499 | Hacker. 500 | 501 | , 1 April 1990 502 | Ty Coon, President of Vice 503 | 504 | That's all there is to it! 505 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Tests](https://github.com/SigmaHQ/pySigma-pipeline-crowdstrike/actions/workflows/test.yml/badge.svg) 2 | ![Coverage Badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/thomaspatzke/46f41e1fcf5eaab808ff5742401ac42d/raw) 3 | ![Status](https://img.shields.io/badge/Status-pre--release-orange) 4 | 5 | # pySigma CrowdStrike Backend 6 | 7 | This is the CrowdStrike backend for pySigma. It provides the package `sigma.backends.crowdstrike` with the `LogScaleBackend` class. 8 | 9 | Further it contains the following processing pipelines under `sigma.pipelines.crowdstrike`: 10 | - `crowdstrike_fdr_pipeline` which was mainly written for the Falcon Data Replicator data but Splunk queries should work in the legacy CrowdStrike Splunk. The pipeline can also be used with other backends in case you ingest Falcon data to a different SIEM. 11 | - `crowdstrike_falcon_pipeline` which was written for data collected by the CrowdStrike Falcon Agent stored natively in CrowdStrike Logscale. It effectively translates rules to the CrowdStrike Query Language used by LogScale. This is designed to be used with the `LogScaleBackend`. 12 | 13 | ## Supported Rules 14 | ### Falcon Pipeline 15 | The following categories and products are supported by the pipelines: 16 | | category | product | CrowdStrike event_simpleName | 17 | |-|-|-| 18 | |`process_creation` | `windows`, `linux`| ProcessRollup2, SyntheticProcessRollup2 | 19 | |`network_connection` | `windows`| NetworkConnectIP4, NetworkReceiveAcceptIP4 | 20 | |`dns_query` | `windows`| DnsRequest | 21 | |`image_load` | `windows`| ClassifiedModuleLoad | 22 | |`driver_load` | `windows`| DriverLoad | 23 | |`ps_script` | `windows`| CommandHistory, ScriptControlScanTelemetry | 24 | 25 | There's likely more windows categories that can be supported by the pipelines; We will be adding support gradually as availability allows. 26 | 27 | ## Limitations and caveats: 28 | - **Full Paths**: 29 | Falcon agents do not capture drive names when logging paths. Instead, when drive letters are expected the device path is used. For example, `C:\Windows` results to `\Device\HarddiskVolume3\Windows` in the logs. To account for this, the pipeline replaces any drive letters in fields containing full path with `\Device\HarddiskVolume?\` (where '?' can be any single character). 30 | 31 | - **Parent Name**: 32 | Falcon `process_creation` events do not capture the full path of the parent. Hence, in such cases the transformation is configured to fail. 33 | 34 | - **DNS Query Results**: 35 | Falcon `dns_query` events return the IP records of a successful query in [semicolon-separated](https://github.com/CrowdStrike/logscale-community-content/blob/main/CrowdStrike-Query-Language-Map/CrowdStrike-Query-Language/concatArray.md) string. The pipeline handles this by enforcing a "contains" expression on the `QueryResults` field 36 | - **Unsupported fields**: 37 | Falcon does not always capture the same fields as sysmon for the categories supported. In cases where the rule requires unsupported fields, the transformation fails. 38 | 39 | - **PS Script Logging**: 40 | There is not a clean equivelant between the events Falcon generates and PowerShell Script Logging. Our transformation is a best-effort approach that contains multiple fields that might contain the value in the field. 41 | 42 | ## References 43 | - [LogScale Community Content](https://github.com/CrowdStrike/logscale-community-content) 44 | 45 | This backend is currently maintained by: 46 | 47 | * [Thomas Patzke](https://github.com/thomaspatzke/) 48 | * [Panos Moullotos](https://github.com/moullos) -------------------------------------------------------------------------------- /poetry.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. 2 | 3 | [[package]] 4 | name = "astroid" 5 | version = "3.2.4" 6 | description = "An abstract syntax tree for Python with inference support." 7 | optional = false 8 | python-versions = ">=3.8.0" 9 | files = [ 10 | {file = "astroid-3.2.4-py3-none-any.whl", hash = "sha256:413658a61eeca6202a59231abb473f932038fbcbf1666587f66d482083413a25"}, 11 | {file = "astroid-3.2.4.tar.gz", hash = "sha256:0e14202810b30da1b735827f78f5157be2bbd4a7a59b7707ca0bfc2fb4c0063a"}, 12 | ] 13 | 14 | [package.dependencies] 15 | typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.11\""} 16 | 17 | [[package]] 18 | name = "attrs" 19 | version = "24.2.0" 20 | description = "Classes Without Boilerplate" 21 | optional = false 22 | python-versions = ">=3.7" 23 | files = [ 24 | {file = "attrs-24.2.0-py3-none-any.whl", hash = "sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2"}, 25 | {file = "attrs-24.2.0.tar.gz", hash = "sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346"}, 26 | ] 27 | 28 | [package.extras] 29 | benchmark = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins", "pytest-xdist[psutil]"] 30 | cov = ["cloudpickle", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] 31 | dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] 32 | docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier (<24.7)"] 33 | tests = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] 34 | tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] 35 | 36 | [[package]] 37 | name = "black" 38 | version = "24.8.0" 39 | description = "The uncompromising code formatter." 40 | optional = false 41 | python-versions = ">=3.8" 42 | files = [ 43 | {file = "black-24.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:09cdeb74d494ec023ded657f7092ba518e8cf78fa8386155e4a03fdcc44679e6"}, 44 | {file = "black-24.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:81c6742da39f33b08e791da38410f32e27d632260e599df7245cccee2064afeb"}, 45 | {file = "black-24.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:707a1ca89221bc8a1a64fb5e15ef39cd755633daa672a9db7498d1c19de66a42"}, 46 | {file = "black-24.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:d6417535d99c37cee4091a2f24eb2b6d5ec42b144d50f1f2e436d9fe1916fe1a"}, 47 | {file = "black-24.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:fb6e2c0b86bbd43dee042e48059c9ad7830abd5c94b0bc518c0eeec57c3eddc1"}, 48 | {file = "black-24.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:837fd281f1908d0076844bc2b801ad2d369c78c45cf800cad7b61686051041af"}, 49 | {file = "black-24.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:62e8730977f0b77998029da7971fa896ceefa2c4c4933fcd593fa599ecbf97a4"}, 50 | {file = "black-24.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:72901b4913cbac8972ad911dc4098d5753704d1f3c56e44ae8dce99eecb0e3af"}, 51 | {file = "black-24.8.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:7c046c1d1eeb7aea9335da62472481d3bbf3fd986e093cffd35f4385c94ae368"}, 52 | {file = "black-24.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:649f6d84ccbae73ab767e206772cc2d7a393a001070a4c814a546afd0d423aed"}, 53 | {file = "black-24.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2b59b250fdba5f9a9cd9d0ece6e6d993d91ce877d121d161e4698af3eb9c1018"}, 54 | {file = "black-24.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:6e55d30d44bed36593c3163b9bc63bf58b3b30e4611e4d88a0c3c239930ed5b2"}, 55 | {file = "black-24.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:505289f17ceda596658ae81b61ebbe2d9b25aa78067035184ed0a9d855d18afd"}, 56 | {file = "black-24.8.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b19c9ad992c7883ad84c9b22aaa73562a16b819c1d8db7a1a1a49fb7ec13c7d2"}, 57 | {file = "black-24.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1f13f7f386f86f8121d76599114bb8c17b69d962137fc70efe56137727c7047e"}, 58 | {file = "black-24.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:f490dbd59680d809ca31efdae20e634f3fae27fba3ce0ba3208333b713bc3920"}, 59 | {file = "black-24.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:eab4dd44ce80dea27dc69db40dab62d4ca96112f87996bca68cd75639aeb2e4c"}, 60 | {file = "black-24.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3c4285573d4897a7610054af5a890bde7c65cb466040c5f0c8b732812d7f0e5e"}, 61 | {file = "black-24.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9e84e33b37be070ba135176c123ae52a51f82306def9f7d063ee302ecab2cf47"}, 62 | {file = "black-24.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:73bbf84ed136e45d451a260c6b73ed674652f90a2b3211d6a35e78054563a9bb"}, 63 | {file = "black-24.8.0-py3-none-any.whl", hash = "sha256:972085c618ee94f402da1af548a4f218c754ea7e5dc70acb168bfaca4c2542ed"}, 64 | {file = "black-24.8.0.tar.gz", hash = "sha256:2500945420b6784c38b9ee885af039f5e7471ef284ab03fa35ecdde4688cd83f"}, 65 | ] 66 | 67 | [package.dependencies] 68 | click = ">=8.0.0" 69 | mypy-extensions = ">=0.4.3" 70 | packaging = ">=22.0" 71 | pathspec = ">=0.9.0" 72 | platformdirs = ">=2" 73 | tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} 74 | typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} 75 | 76 | [package.extras] 77 | colorama = ["colorama (>=0.4.3)"] 78 | d = ["aiohttp (>=3.7.4)", "aiohttp (>=3.7.4,!=3.9.0)"] 79 | jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] 80 | uvloop = ["uvloop (>=0.15.2)"] 81 | 82 | [[package]] 83 | name = "certifi" 84 | version = "2024.8.30" 85 | description = "Python package for providing Mozilla's CA Bundle." 86 | optional = false 87 | python-versions = ">=3.6" 88 | files = [ 89 | {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, 90 | {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, 91 | ] 92 | 93 | [[package]] 94 | name = "charset-normalizer" 95 | version = "3.4.0" 96 | description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." 97 | optional = false 98 | python-versions = ">=3.7.0" 99 | files = [ 100 | {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4f9fc98dad6c2eaa32fc3af1417d95b5e3d08aff968df0cd320066def971f9a6"}, 101 | {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0de7b687289d3c1b3e8660d0741874abe7888100efe14bd0f9fd7141bcbda92b"}, 102 | {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5ed2e36c3e9b4f21dd9422f6893dec0abf2cca553af509b10cd630f878d3eb99"}, 103 | {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40d3ff7fc90b98c637bda91c89d51264a3dcf210cade3a2c6f838c7268d7a4ca"}, 104 | {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1110e22af8ca26b90bd6364fe4c763329b0ebf1ee213ba32b68c73de5752323d"}, 105 | {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:86f4e8cca779080f66ff4f191a685ced73d2f72d50216f7112185dc02b90b9b7"}, 106 | {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f683ddc7eedd742e2889d2bfb96d69573fde1d92fcb811979cdb7165bb9c7d3"}, 107 | {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:27623ba66c183eca01bf9ff833875b459cad267aeeb044477fedac35e19ba907"}, 108 | {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f606a1881d2663630ea5b8ce2efe2111740df4b687bd78b34a8131baa007f79b"}, 109 | {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0b309d1747110feb25d7ed6b01afdec269c647d382c857ef4663bbe6ad95a912"}, 110 | {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:136815f06a3ae311fae551c3df1f998a1ebd01ddd424aa5603a4336997629e95"}, 111 | {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:14215b71a762336254351b00ec720a8e85cada43b987da5a042e4ce3e82bd68e"}, 112 | {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:79983512b108e4a164b9c8d34de3992f76d48cadc9554c9e60b43f308988aabe"}, 113 | {file = "charset_normalizer-3.4.0-cp310-cp310-win32.whl", hash = "sha256:c94057af19bc953643a33581844649a7fdab902624d2eb739738a30e2b3e60fc"}, 114 | {file = "charset_normalizer-3.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:55f56e2ebd4e3bc50442fbc0888c9d8c94e4e06a933804e2af3e89e2f9c1c749"}, 115 | {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0d99dd8ff461990f12d6e42c7347fd9ab2532fb70e9621ba520f9e8637161d7c"}, 116 | {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c57516e58fd17d03ebe67e181a4e4e2ccab1168f8c2976c6a334d4f819fe5944"}, 117 | {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6dba5d19c4dfab08e58d5b36304b3f92f3bd5d42c1a3fa37b5ba5cdf6dfcbcee"}, 118 | {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf4475b82be41b07cc5e5ff94810e6a01f276e37c2d55571e3fe175e467a1a1c"}, 119 | {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce031db0408e487fd2775d745ce30a7cd2923667cf3b69d48d219f1d8f5ddeb6"}, 120 | {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ff4e7cdfdb1ab5698e675ca622e72d58a6fa2a8aa58195de0c0061288e6e3ea"}, 121 | {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3710a9751938947e6327ea9f3ea6332a09bf0ba0c09cae9cb1f250bd1f1549bc"}, 122 | {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82357d85de703176b5587dbe6ade8ff67f9f69a41c0733cf2425378b49954de5"}, 123 | {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47334db71978b23ebcf3c0f9f5ee98b8d65992b65c9c4f2d34c2eaf5bcaf0594"}, 124 | {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8ce7fd6767a1cc5a92a639b391891bf1c268b03ec7e021c7d6d902285259685c"}, 125 | {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f1a2f519ae173b5b6a2c9d5fa3116ce16e48b3462c8b96dfdded11055e3d6365"}, 126 | {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:63bc5c4ae26e4bc6be6469943b8253c0fd4e4186c43ad46e713ea61a0ba49129"}, 127 | {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bcb4f8ea87d03bc51ad04add8ceaf9b0f085ac045ab4d74e73bbc2dc033f0236"}, 128 | {file = "charset_normalizer-3.4.0-cp311-cp311-win32.whl", hash = "sha256:9ae4ef0b3f6b41bad6366fb0ea4fc1d7ed051528e113a60fa2a65a9abb5b1d99"}, 129 | {file = "charset_normalizer-3.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:cee4373f4d3ad28f1ab6290684d8e2ebdb9e7a1b74fdc39e4c211995f77bec27"}, 130 | {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0713f3adb9d03d49d365b70b84775d0a0d18e4ab08d12bc46baa6132ba78aaf6"}, 131 | {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:de7376c29d95d6719048c194a9cf1a1b0393fbe8488a22008610b0361d834ecf"}, 132 | {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4a51b48f42d9358460b78725283f04bddaf44a9358197b889657deba38f329db"}, 133 | {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b295729485b06c1a0683af02a9e42d2caa9db04a373dc38a6a58cdd1e8abddf1"}, 134 | {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ee803480535c44e7f5ad00788526da7d85525cfefaf8acf8ab9a310000be4b03"}, 135 | {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d59d125ffbd6d552765510e3f31ed75ebac2c7470c7274195b9161a32350284"}, 136 | {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cda06946eac330cbe6598f77bb54e690b4ca93f593dee1568ad22b04f347c15"}, 137 | {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07afec21bbbbf8a5cc3651aa96b980afe2526e7f048fdfb7f1014d84acc8b6d8"}, 138 | {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6b40e8d38afe634559e398cc32b1472f376a4099c75fe6299ae607e404c033b2"}, 139 | {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b8dcd239c743aa2f9c22ce674a145e0a25cb1566c495928440a181ca1ccf6719"}, 140 | {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:84450ba661fb96e9fd67629b93d2941c871ca86fc38d835d19d4225ff946a631"}, 141 | {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:44aeb140295a2f0659e113b31cfe92c9061622cadbc9e2a2f7b8ef6b1e29ef4b"}, 142 | {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1db4e7fefefd0f548d73e2e2e041f9df5c59e178b4c72fbac4cc6f535cfb1565"}, 143 | {file = "charset_normalizer-3.4.0-cp312-cp312-win32.whl", hash = "sha256:5726cf76c982532c1863fb64d8c6dd0e4c90b6ece9feb06c9f202417a31f7dd7"}, 144 | {file = "charset_normalizer-3.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:b197e7094f232959f8f20541ead1d9862ac5ebea1d58e9849c1bf979255dfac9"}, 145 | {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:dd4eda173a9fcccb5f2e2bd2a9f423d180194b1bf17cf59e3269899235b2a114"}, 146 | {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9e3c4c9e1ed40ea53acf11e2a386383c3304212c965773704e4603d589343ed"}, 147 | {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92a7e36b000bf022ef3dbb9c46bfe2d52c047d5e3f3343f43204263c5addc250"}, 148 | {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54b6a92d009cbe2fb11054ba694bc9e284dad30a26757b1e372a1fdddaf21920"}, 149 | {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ffd9493de4c922f2a38c2bf62b831dcec90ac673ed1ca182fe11b4d8e9f2a64"}, 150 | {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35c404d74c2926d0287fbd63ed5d27eb911eb9e4a3bb2c6d294f3cfd4a9e0c23"}, 151 | {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4796efc4faf6b53a18e3d46343535caed491776a22af773f366534056c4e1fbc"}, 152 | {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7fdd52961feb4c96507aa649550ec2a0d527c086d284749b2f582f2d40a2e0d"}, 153 | {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:92db3c28b5b2a273346bebb24857fda45601aef6ae1c011c0a997106581e8a88"}, 154 | {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ab973df98fc99ab39080bfb0eb3a925181454d7c3ac8a1e695fddfae696d9e90"}, 155 | {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4b67fdab07fdd3c10bb21edab3cbfe8cf5696f453afce75d815d9d7223fbe88b"}, 156 | {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:aa41e526a5d4a9dfcfbab0716c7e8a1b215abd3f3df5a45cf18a12721d31cb5d"}, 157 | {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ffc519621dce0c767e96b9c53f09c5d215578e10b02c285809f76509a3931482"}, 158 | {file = "charset_normalizer-3.4.0-cp313-cp313-win32.whl", hash = "sha256:f19c1585933c82098c2a520f8ec1227f20e339e33aca8fa6f956f6691b784e67"}, 159 | {file = "charset_normalizer-3.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:707b82d19e65c9bd28b81dde95249b07bf9f5b90ebe1ef17d9b57473f8a64b7b"}, 160 | {file = "charset_normalizer-3.4.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dbe03226baf438ac4fda9e2d0715022fd579cb641c4cf639fa40d53b2fe6f3e2"}, 161 | {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd9a8bd8900e65504a305bf8ae6fa9fbc66de94178c420791d0293702fce2df7"}, 162 | {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8831399554b92b72af5932cdbbd4ddc55c55f631bb13ff8fe4e6536a06c5c51"}, 163 | {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a14969b8691f7998e74663b77b4c36c0337cb1df552da83d5c9004a93afdb574"}, 164 | {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dcaf7c1524c0542ee2fc82cc8ec337f7a9f7edee2532421ab200d2b920fc97cf"}, 165 | {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:425c5f215d0eecee9a56cdb703203dda90423247421bf0d67125add85d0c4455"}, 166 | {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:d5b054862739d276e09928de37c79ddeec42a6e1bfc55863be96a36ba22926f6"}, 167 | {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:f3e73a4255342d4eb26ef6df01e3962e73aa29baa3124a8e824c5d3364a65748"}, 168 | {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:2f6c34da58ea9c1a9515621f4d9ac379871a8f21168ba1b5e09d74250de5ad62"}, 169 | {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:f09cb5a7bbe1ecae6e87901a2eb23e0256bb524a79ccc53eb0b7629fbe7677c4"}, 170 | {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:0099d79bdfcf5c1f0c2c72f91516702ebf8b0b8ddd8905f97a8aecf49712c621"}, 171 | {file = "charset_normalizer-3.4.0-cp37-cp37m-win32.whl", hash = "sha256:9c98230f5042f4945f957d006edccc2af1e03ed5e37ce7c373f00a5a4daa6149"}, 172 | {file = "charset_normalizer-3.4.0-cp37-cp37m-win_amd64.whl", hash = "sha256:62f60aebecfc7f4b82e3f639a7d1433a20ec32824db2199a11ad4f5e146ef5ee"}, 173 | {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:af73657b7a68211996527dbfeffbb0864e043d270580c5aef06dc4b659a4b578"}, 174 | {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cab5d0b79d987c67f3b9e9c53f54a61360422a5a0bc075f43cab5621d530c3b6"}, 175 | {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9289fd5dddcf57bab41d044f1756550f9e7cf0c8e373b8cdf0ce8773dc4bd417"}, 176 | {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b493a043635eb376e50eedf7818f2f322eabbaa974e948bd8bdd29eb7ef2a51"}, 177 | {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fa2566ca27d67c86569e8c85297aaf413ffab85a8960500f12ea34ff98e4c41"}, 178 | {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8e538f46104c815be19c975572d74afb53f29650ea2025bbfaef359d2de2f7f"}, 179 | {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fd30dc99682dc2c603c2b315bded2799019cea829f8bf57dc6b61efde6611c8"}, 180 | {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2006769bd1640bdf4d5641c69a3d63b71b81445473cac5ded39740a226fa88ab"}, 181 | {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:dc15e99b2d8a656f8e666854404f1ba54765871104e50c8e9813af8a7db07f12"}, 182 | {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:ab2e5bef076f5a235c3774b4f4028a680432cded7cad37bba0fd90d64b187d19"}, 183 | {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:4ec9dd88a5b71abfc74e9df5ebe7921c35cbb3b641181a531ca65cdb5e8e4dea"}, 184 | {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:43193c5cda5d612f247172016c4bb71251c784d7a4d9314677186a838ad34858"}, 185 | {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:aa693779a8b50cd97570e5a0f343538a8dbd3e496fa5dcb87e29406ad0299654"}, 186 | {file = "charset_normalizer-3.4.0-cp38-cp38-win32.whl", hash = "sha256:7706f5850360ac01d80c89bcef1640683cc12ed87f42579dab6c5d3ed6888613"}, 187 | {file = "charset_normalizer-3.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:c3e446d253bd88f6377260d07c895816ebf33ffffd56c1c792b13bff9c3e1ade"}, 188 | {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:980b4f289d1d90ca5efcf07958d3eb38ed9c0b7676bf2831a54d4f66f9c27dfa"}, 189 | {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f28f891ccd15c514a0981f3b9db9aa23d62fe1a99997512b0491d2ed323d229a"}, 190 | {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8aacce6e2e1edcb6ac625fb0f8c3a9570ccc7bfba1f63419b3769ccf6a00ed0"}, 191 | {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd7af3717683bea4c87acd8c0d3d5b44d56120b26fd3f8a692bdd2d5260c620a"}, 192 | {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5ff2ed8194587faf56555927b3aa10e6fb69d931e33953943bc4f837dfee2242"}, 193 | {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e91f541a85298cf35433bf66f3fab2a4a2cff05c127eeca4af174f6d497f0d4b"}, 194 | {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:309a7de0a0ff3040acaebb35ec45d18db4b28232f21998851cfa709eeff49d62"}, 195 | {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:285e96d9d53422efc0d7a17c60e59f37fbf3dfa942073f666db4ac71e8d726d0"}, 196 | {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:5d447056e2ca60382d460a604b6302d8db69476fd2015c81e7c35417cfabe4cd"}, 197 | {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:20587d20f557fe189b7947d8e7ec5afa110ccf72a3128d61a2a387c3313f46be"}, 198 | {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:130272c698667a982a5d0e626851ceff662565379baf0ff2cc58067b81d4f11d"}, 199 | {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:ab22fbd9765e6954bc0bcff24c25ff71dcbfdb185fcdaca49e81bac68fe724d3"}, 200 | {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7782afc9b6b42200f7362858f9e73b1f8316afb276d316336c0ec3bd73312742"}, 201 | {file = "charset_normalizer-3.4.0-cp39-cp39-win32.whl", hash = "sha256:2de62e8801ddfff069cd5c504ce3bc9672b23266597d4e4f50eda28846c322f2"}, 202 | {file = "charset_normalizer-3.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:95c3c157765b031331dd4db3c775e58deaee050a3042fcad72cbc4189d7c8dca"}, 203 | {file = "charset_normalizer-3.4.0-py3-none-any.whl", hash = "sha256:fe9f97feb71aa9896b81973a7bbada8c49501dc73e58a10fcef6663af95e5079"}, 204 | {file = "charset_normalizer-3.4.0.tar.gz", hash = "sha256:223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e"}, 205 | ] 206 | 207 | [[package]] 208 | name = "click" 209 | version = "8.1.7" 210 | description = "Composable command line interface toolkit" 211 | optional = false 212 | python-versions = ">=3.7" 213 | files = [ 214 | {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, 215 | {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, 216 | ] 217 | 218 | [package.dependencies] 219 | colorama = {version = "*", markers = "platform_system == \"Windows\""} 220 | 221 | [[package]] 222 | name = "colorama" 223 | version = "0.4.6" 224 | description = "Cross-platform colored terminal text." 225 | optional = false 226 | python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" 227 | files = [ 228 | {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, 229 | {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, 230 | ] 231 | 232 | [[package]] 233 | name = "coverage" 234 | version = "7.6.1" 235 | description = "Code coverage measurement for Python" 236 | optional = false 237 | python-versions = ">=3.8" 238 | files = [ 239 | {file = "coverage-7.6.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b06079abebbc0e89e6163b8e8f0e16270124c154dc6e4a47b413dd538859af16"}, 240 | {file = "coverage-7.6.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cf4b19715bccd7ee27b6b120e7e9dd56037b9c0681dcc1adc9ba9db3d417fa36"}, 241 | {file = "coverage-7.6.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61c0abb4c85b095a784ef23fdd4aede7a2628478e7baba7c5e3deba61070a02"}, 242 | {file = "coverage-7.6.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fd21f6ae3f08b41004dfb433fa895d858f3f5979e7762d052b12aef444e29afc"}, 243 | {file = "coverage-7.6.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f59d57baca39b32db42b83b2a7ba6f47ad9c394ec2076b084c3f029b7afca23"}, 244 | {file = "coverage-7.6.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a1ac0ae2b8bd743b88ed0502544847c3053d7171a3cff9228af618a068ed9c34"}, 245 | {file = "coverage-7.6.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e6a08c0be454c3b3beb105c0596ebdc2371fab6bb90c0c0297f4e58fd7e1012c"}, 246 | {file = "coverage-7.6.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f5796e664fe802da4f57a168c85359a8fbf3eab5e55cd4e4569fbacecc903959"}, 247 | {file = "coverage-7.6.1-cp310-cp310-win32.whl", hash = "sha256:7bb65125fcbef8d989fa1dd0e8a060999497629ca5b0efbca209588a73356232"}, 248 | {file = "coverage-7.6.1-cp310-cp310-win_amd64.whl", hash = "sha256:3115a95daa9bdba70aea750db7b96b37259a81a709223c8448fa97727d546fe0"}, 249 | {file = "coverage-7.6.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7dea0889685db8550f839fa202744652e87c60015029ce3f60e006f8c4462c93"}, 250 | {file = "coverage-7.6.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ed37bd3c3b063412f7620464a9ac1314d33100329f39799255fb8d3027da50d3"}, 251 | {file = "coverage-7.6.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d85f5e9a5f8b73e2350097c3756ef7e785f55bd71205defa0bfdaf96c31616ff"}, 252 | {file = "coverage-7.6.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bc572be474cafb617672c43fe989d6e48d3c83af02ce8de73fff1c6bb3c198d"}, 253 | {file = "coverage-7.6.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c0420b573964c760df9e9e86d1a9a622d0d27f417e1a949a8a66dd7bcee7bc6"}, 254 | {file = "coverage-7.6.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1f4aa8219db826ce6be7099d559f8ec311549bfc4046f7f9fe9b5cea5c581c56"}, 255 | {file = "coverage-7.6.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:fc5a77d0c516700ebad189b587de289a20a78324bc54baee03dd486f0855d234"}, 256 | {file = "coverage-7.6.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b48f312cca9621272ae49008c7f613337c53fadca647d6384cc129d2996d1133"}, 257 | {file = "coverage-7.6.1-cp311-cp311-win32.whl", hash = "sha256:1125ca0e5fd475cbbba3bb67ae20bd2c23a98fac4e32412883f9bcbaa81c314c"}, 258 | {file = "coverage-7.6.1-cp311-cp311-win_amd64.whl", hash = "sha256:8ae539519c4c040c5ffd0632784e21b2f03fc1340752af711f33e5be83a9d6c6"}, 259 | {file = "coverage-7.6.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:95cae0efeb032af8458fc27d191f85d1717b1d4e49f7cb226cf526ff28179778"}, 260 | {file = "coverage-7.6.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5621a9175cf9d0b0c84c2ef2b12e9f5f5071357c4d2ea6ca1cf01814f45d2391"}, 261 | {file = "coverage-7.6.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:260933720fdcd75340e7dbe9060655aff3af1f0c5d20f46b57f262ab6c86a5e8"}, 262 | {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07e2ca0ad381b91350c0ed49d52699b625aab2b44b65e1b4e02fa9df0e92ad2d"}, 263 | {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c44fee9975f04b33331cb8eb272827111efc8930cfd582e0320613263ca849ca"}, 264 | {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:877abb17e6339d96bf08e7a622d05095e72b71f8afd8a9fefc82cf30ed944163"}, 265 | {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3e0cadcf6733c09154b461f1ca72d5416635e5e4ec4e536192180d34ec160f8a"}, 266 | {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c3c02d12f837d9683e5ab2f3d9844dc57655b92c74e286c262e0fc54213c216d"}, 267 | {file = "coverage-7.6.1-cp312-cp312-win32.whl", hash = "sha256:e05882b70b87a18d937ca6768ff33cc3f72847cbc4de4491c8e73880766718e5"}, 268 | {file = "coverage-7.6.1-cp312-cp312-win_amd64.whl", hash = "sha256:b5d7b556859dd85f3a541db6a4e0167b86e7273e1cdc973e5b175166bb634fdb"}, 269 | {file = "coverage-7.6.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a4acd025ecc06185ba2b801f2de85546e0b8ac787cf9d3b06e7e2a69f925b106"}, 270 | {file = "coverage-7.6.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a6d3adcf24b624a7b778533480e32434a39ad8fa30c315208f6d3e5542aeb6e9"}, 271 | {file = "coverage-7.6.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0c212c49b6c10e6951362f7c6df3329f04c2b1c28499563d4035d964ab8e08c"}, 272 | {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e81d7a3e58882450ec4186ca59a3f20a5d4440f25b1cff6f0902ad890e6748a"}, 273 | {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78b260de9790fd81e69401c2dc8b17da47c8038176a79092a89cb2b7d945d060"}, 274 | {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a78d169acd38300060b28d600344a803628c3fd585c912cacc9ea8790fe96862"}, 275 | {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2c09f4ce52cb99dd7505cd0fc8e0e37c77b87f46bc9c1eb03fe3bc9991085388"}, 276 | {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6878ef48d4227aace338d88c48738a4258213cd7b74fd9a3d4d7582bb1d8a155"}, 277 | {file = "coverage-7.6.1-cp313-cp313-win32.whl", hash = "sha256:44df346d5215a8c0e360307d46ffaabe0f5d3502c8a1cefd700b34baf31d411a"}, 278 | {file = "coverage-7.6.1-cp313-cp313-win_amd64.whl", hash = "sha256:8284cf8c0dd272a247bc154eb6c95548722dce90d098c17a883ed36e67cdb129"}, 279 | {file = "coverage-7.6.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:d3296782ca4eab572a1a4eca686d8bfb00226300dcefdf43faa25b5242ab8a3e"}, 280 | {file = "coverage-7.6.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:502753043567491d3ff6d08629270127e0c31d4184c4c8d98f92c26f65019962"}, 281 | {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a89ecca80709d4076b95f89f308544ec8f7b4727e8a547913a35f16717856cb"}, 282 | {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a318d68e92e80af8b00fa99609796fdbcdfef3629c77c6283566c6f02c6d6704"}, 283 | {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13b0a73a0896988f053e4fbb7de6d93388e6dd292b0d87ee51d106f2c11b465b"}, 284 | {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:4421712dbfc5562150f7554f13dde997a2e932a6b5f352edcce948a815efee6f"}, 285 | {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:166811d20dfea725e2e4baa71fffd6c968a958577848d2131f39b60043400223"}, 286 | {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:225667980479a17db1048cb2bf8bfb39b8e5be8f164b8f6628b64f78a72cf9d3"}, 287 | {file = "coverage-7.6.1-cp313-cp313t-win32.whl", hash = "sha256:170d444ab405852903b7d04ea9ae9b98f98ab6d7e63e1115e82620807519797f"}, 288 | {file = "coverage-7.6.1-cp313-cp313t-win_amd64.whl", hash = "sha256:b9f222de8cded79c49bf184bdbc06630d4c58eec9459b939b4a690c82ed05657"}, 289 | {file = "coverage-7.6.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6db04803b6c7291985a761004e9060b2bca08da6d04f26a7f2294b8623a0c1a0"}, 290 | {file = "coverage-7.6.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f1adfc8ac319e1a348af294106bc6a8458a0f1633cc62a1446aebc30c5fa186a"}, 291 | {file = "coverage-7.6.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a95324a9de9650a729239daea117df21f4b9868ce32e63f8b650ebe6cef5595b"}, 292 | {file = "coverage-7.6.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b43c03669dc4618ec25270b06ecd3ee4fa94c7f9b3c14bae6571ca00ef98b0d3"}, 293 | {file = "coverage-7.6.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8929543a7192c13d177b770008bc4e8119f2e1f881d563fc6b6305d2d0ebe9de"}, 294 | {file = "coverage-7.6.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:a09ece4a69cf399510c8ab25e0950d9cf2b42f7b3cb0374f95d2e2ff594478a6"}, 295 | {file = "coverage-7.6.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:9054a0754de38d9dbd01a46621636689124d666bad1936d76c0341f7d71bf569"}, 296 | {file = "coverage-7.6.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0dbde0f4aa9a16fa4d754356a8f2e36296ff4d83994b2c9d8398aa32f222f989"}, 297 | {file = "coverage-7.6.1-cp38-cp38-win32.whl", hash = "sha256:da511e6ad4f7323ee5702e6633085fb76c2f893aaf8ce4c51a0ba4fc07580ea7"}, 298 | {file = "coverage-7.6.1-cp38-cp38-win_amd64.whl", hash = "sha256:3f1156e3e8f2872197af3840d8ad307a9dd18e615dc64d9ee41696f287c57ad8"}, 299 | {file = "coverage-7.6.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:abd5fd0db5f4dc9289408aaf34908072f805ff7792632250dcb36dc591d24255"}, 300 | {file = "coverage-7.6.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:547f45fa1a93154bd82050a7f3cddbc1a7a4dd2a9bf5cb7d06f4ae29fe94eaf8"}, 301 | {file = "coverage-7.6.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:645786266c8f18a931b65bfcefdbf6952dd0dea98feee39bd188607a9d307ed2"}, 302 | {file = "coverage-7.6.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9e0b2df163b8ed01d515807af24f63de04bebcecbd6c3bfeff88385789fdf75a"}, 303 | {file = "coverage-7.6.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:609b06f178fe8e9f89ef676532760ec0b4deea15e9969bf754b37f7c40326dbc"}, 304 | {file = "coverage-7.6.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:702855feff378050ae4f741045e19a32d57d19f3e0676d589df0575008ea5004"}, 305 | {file = "coverage-7.6.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:2bdb062ea438f22d99cba0d7829c2ef0af1d768d1e4a4f528087224c90b132cb"}, 306 | {file = "coverage-7.6.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:9c56863d44bd1c4fe2abb8a4d6f5371d197f1ac0ebdee542f07f35895fc07f36"}, 307 | {file = "coverage-7.6.1-cp39-cp39-win32.whl", hash = "sha256:6e2cd258d7d927d09493c8df1ce9174ad01b381d4729a9d8d4e38670ca24774c"}, 308 | {file = "coverage-7.6.1-cp39-cp39-win_amd64.whl", hash = "sha256:06a737c882bd26d0d6ee7269b20b12f14a8704807a01056c80bb881a4b2ce6ca"}, 309 | {file = "coverage-7.6.1-pp38.pp39.pp310-none-any.whl", hash = "sha256:e9a6e0eb86070e8ccaedfbd9d38fec54864f3125ab95419970575b42af7541df"}, 310 | {file = "coverage-7.6.1.tar.gz", hash = "sha256:953510dfb7b12ab69d20135a0662397f077c59b1e6379a768e97c59d852ee51d"}, 311 | ] 312 | 313 | [package.dependencies] 314 | tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""} 315 | 316 | [package.extras] 317 | toml = ["tomli"] 318 | 319 | [[package]] 320 | name = "dill" 321 | version = "0.3.9" 322 | description = "serialize all of Python" 323 | optional = false 324 | python-versions = ">=3.8" 325 | files = [ 326 | {file = "dill-0.3.9-py3-none-any.whl", hash = "sha256:468dff3b89520b474c0397703366b7b95eebe6303f108adf9b19da1f702be87a"}, 327 | {file = "dill-0.3.9.tar.gz", hash = "sha256:81aa267dddf68cbfe8029c42ca9ec6a4ab3b22371d1c450abc54422577b4512c"}, 328 | ] 329 | 330 | [package.extras] 331 | graph = ["objgraph (>=1.7.2)"] 332 | profile = ["gprof2dot (>=2022.7.29)"] 333 | 334 | [[package]] 335 | name = "exceptiongroup" 336 | version = "1.2.2" 337 | description = "Backport of PEP 654 (exception groups)" 338 | optional = false 339 | python-versions = ">=3.7" 340 | files = [ 341 | {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, 342 | {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, 343 | ] 344 | 345 | [package.extras] 346 | test = ["pytest (>=6)"] 347 | 348 | [[package]] 349 | name = "filelock" 350 | version = "3.16.1" 351 | description = "A platform independent file lock." 352 | optional = false 353 | python-versions = ">=3.8" 354 | files = [ 355 | {file = "filelock-3.16.1-py3-none-any.whl", hash = "sha256:2082e5703d51fbf98ea75855d9d5527e33d8ff23099bec374a134febee6946b0"}, 356 | {file = "filelock-3.16.1.tar.gz", hash = "sha256:c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435"}, 357 | ] 358 | 359 | [package.extras] 360 | docs = ["furo (>=2024.8.6)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4.1)"] 361 | testing = ["covdefaults (>=2.3)", "coverage (>=7.6.1)", "diff-cover (>=9.2)", "pytest (>=8.3.3)", "pytest-asyncio (>=0.24)", "pytest-cov (>=5)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.26.4)"] 362 | typing = ["typing-extensions (>=4.12.2)"] 363 | 364 | [[package]] 365 | name = "idna" 366 | version = "3.10" 367 | description = "Internationalized Domain Names in Applications (IDNA)" 368 | optional = false 369 | python-versions = ">=3.6" 370 | files = [ 371 | {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, 372 | {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, 373 | ] 374 | 375 | [package.extras] 376 | all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] 377 | 378 | [[package]] 379 | name = "iniconfig" 380 | version = "2.0.0" 381 | description = "brain-dead simple config-ini parsing" 382 | optional = false 383 | python-versions = ">=3.7" 384 | files = [ 385 | {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, 386 | {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, 387 | ] 388 | 389 | [[package]] 390 | name = "isort" 391 | version = "5.13.2" 392 | description = "A Python utility / library to sort Python imports." 393 | optional = false 394 | python-versions = ">=3.8.0" 395 | files = [ 396 | {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"}, 397 | {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"}, 398 | ] 399 | 400 | [package.extras] 401 | colors = ["colorama (>=0.4.6)"] 402 | 403 | [[package]] 404 | name = "jinja2" 405 | version = "3.1.4" 406 | description = "A very fast and expressive template engine." 407 | optional = false 408 | python-versions = ">=3.7" 409 | files = [ 410 | {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, 411 | {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, 412 | ] 413 | 414 | [package.dependencies] 415 | MarkupSafe = ">=2.0" 416 | 417 | [package.extras] 418 | i18n = ["Babel (>=2.7)"] 419 | 420 | [[package]] 421 | name = "markupsafe" 422 | version = "2.1.5" 423 | description = "Safely add untrusted strings to HTML/XML markup." 424 | optional = false 425 | python-versions = ">=3.7" 426 | files = [ 427 | {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc"}, 428 | {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5"}, 429 | {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46"}, 430 | {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f"}, 431 | {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900"}, 432 | {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff"}, 433 | {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad"}, 434 | {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd"}, 435 | {file = "MarkupSafe-2.1.5-cp310-cp310-win32.whl", hash = "sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4"}, 436 | {file = "MarkupSafe-2.1.5-cp310-cp310-win_amd64.whl", hash = "sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5"}, 437 | {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f"}, 438 | {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2"}, 439 | {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced"}, 440 | {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5"}, 441 | {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c"}, 442 | {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f"}, 443 | {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a"}, 444 | {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f"}, 445 | {file = "MarkupSafe-2.1.5-cp311-cp311-win32.whl", hash = "sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906"}, 446 | {file = "MarkupSafe-2.1.5-cp311-cp311-win_amd64.whl", hash = "sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617"}, 447 | {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1"}, 448 | {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4"}, 449 | {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee"}, 450 | {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5"}, 451 | {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b"}, 452 | {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a"}, 453 | {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f"}, 454 | {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169"}, 455 | {file = "MarkupSafe-2.1.5-cp312-cp312-win32.whl", hash = "sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad"}, 456 | {file = "MarkupSafe-2.1.5-cp312-cp312-win_amd64.whl", hash = "sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb"}, 457 | {file = "MarkupSafe-2.1.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c8b29db45f8fe46ad280a7294f5c3ec36dbac9491f2d1c17345be8e69cc5928f"}, 458 | {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ec6a563cff360b50eed26f13adc43e61bc0c04d94b8be985e6fb24b81f6dcfdf"}, 459 | {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a549b9c31bec33820e885335b451286e2969a2d9e24879f83fe904a5ce59d70a"}, 460 | {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4f11aa001c540f62c6166c7726f71f7573b52c68c31f014c25cc7901deea0b52"}, 461 | {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7b2e5a267c855eea6b4283940daa6e88a285f5f2a67f2220203786dfa59b37e9"}, 462 | {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2d2d793e36e230fd32babe143b04cec8a8b3eb8a3122d2aceb4a371e6b09b8df"}, 463 | {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ce409136744f6521e39fd8e2a24c53fa18ad67aa5bc7c2cf83645cce5b5c4e50"}, 464 | {file = "MarkupSafe-2.1.5-cp37-cp37m-win32.whl", hash = "sha256:4096e9de5c6fdf43fb4f04c26fb114f61ef0bf2e5604b6ee3019d51b69e8c371"}, 465 | {file = "MarkupSafe-2.1.5-cp37-cp37m-win_amd64.whl", hash = "sha256:4275d846e41ecefa46e2015117a9f491e57a71ddd59bbead77e904dc02b1bed2"}, 466 | {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a"}, 467 | {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46"}, 468 | {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532"}, 469 | {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab"}, 470 | {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68"}, 471 | {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0"}, 472 | {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4"}, 473 | {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3"}, 474 | {file = "MarkupSafe-2.1.5-cp38-cp38-win32.whl", hash = "sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff"}, 475 | {file = "MarkupSafe-2.1.5-cp38-cp38-win_amd64.whl", hash = "sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029"}, 476 | {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf"}, 477 | {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2"}, 478 | {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8"}, 479 | {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3"}, 480 | {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465"}, 481 | {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e"}, 482 | {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea"}, 483 | {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6"}, 484 | {file = "MarkupSafe-2.1.5-cp39-cp39-win32.whl", hash = "sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf"}, 485 | {file = "MarkupSafe-2.1.5-cp39-cp39-win_amd64.whl", hash = "sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5"}, 486 | {file = "MarkupSafe-2.1.5.tar.gz", hash = "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b"}, 487 | ] 488 | 489 | [[package]] 490 | name = "mccabe" 491 | version = "0.7.0" 492 | description = "McCabe checker, plugin for flake8" 493 | optional = false 494 | python-versions = ">=3.6" 495 | files = [ 496 | {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, 497 | {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, 498 | ] 499 | 500 | [[package]] 501 | name = "mypy" 502 | version = "1.11.2" 503 | description = "Optional static typing for Python" 504 | optional = false 505 | python-versions = ">=3.8" 506 | files = [ 507 | {file = "mypy-1.11.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d42a6dd818ffce7be66cce644f1dff482f1d97c53ca70908dff0b9ddc120b77a"}, 508 | {file = "mypy-1.11.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:801780c56d1cdb896eacd5619a83e427ce436d86a3bdf9112527f24a66618fef"}, 509 | {file = "mypy-1.11.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:41ea707d036a5307ac674ea172875f40c9d55c5394f888b168033177fce47383"}, 510 | {file = "mypy-1.11.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:6e658bd2d20565ea86da7d91331b0eed6d2eee22dc031579e6297f3e12c758c8"}, 511 | {file = "mypy-1.11.2-cp310-cp310-win_amd64.whl", hash = "sha256:478db5f5036817fe45adb7332d927daa62417159d49783041338921dcf646fc7"}, 512 | {file = "mypy-1.11.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:75746e06d5fa1e91bfd5432448d00d34593b52e7e91a187d981d08d1f33d4385"}, 513 | {file = "mypy-1.11.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a976775ab2256aadc6add633d44f100a2517d2388906ec4f13231fafbb0eccca"}, 514 | {file = "mypy-1.11.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cd953f221ac1379050a8a646585a29574488974f79d8082cedef62744f0a0104"}, 515 | {file = "mypy-1.11.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:57555a7715c0a34421013144a33d280e73c08df70f3a18a552938587ce9274f4"}, 516 | {file = "mypy-1.11.2-cp311-cp311-win_amd64.whl", hash = "sha256:36383a4fcbad95f2657642a07ba22ff797de26277158f1cc7bd234821468b1b6"}, 517 | {file = "mypy-1.11.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:e8960dbbbf36906c5c0b7f4fbf2f0c7ffb20f4898e6a879fcf56a41a08b0d318"}, 518 | {file = "mypy-1.11.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:06d26c277962f3fb50e13044674aa10553981ae514288cb7d0a738f495550b36"}, 519 | {file = "mypy-1.11.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6e7184632d89d677973a14d00ae4d03214c8bc301ceefcdaf5c474866814c987"}, 520 | {file = "mypy-1.11.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:3a66169b92452f72117e2da3a576087025449018afc2d8e9bfe5ffab865709ca"}, 521 | {file = "mypy-1.11.2-cp312-cp312-win_amd64.whl", hash = "sha256:969ea3ef09617aff826885a22ece0ddef69d95852cdad2f60c8bb06bf1f71f70"}, 522 | {file = "mypy-1.11.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:37c7fa6121c1cdfcaac97ce3d3b5588e847aa79b580c1e922bb5d5d2902df19b"}, 523 | {file = "mypy-1.11.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4a8a53bc3ffbd161b5b2a4fff2f0f1e23a33b0168f1c0778ec70e1a3d66deb86"}, 524 | {file = "mypy-1.11.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2ff93107f01968ed834f4256bc1fc4475e2fecf6c661260066a985b52741ddce"}, 525 | {file = "mypy-1.11.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:edb91dded4df17eae4537668b23f0ff6baf3707683734b6a818d5b9d0c0c31a1"}, 526 | {file = "mypy-1.11.2-cp38-cp38-win_amd64.whl", hash = "sha256:ee23de8530d99b6db0573c4ef4bd8f39a2a6f9b60655bf7a1357e585a3486f2b"}, 527 | {file = "mypy-1.11.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:801ca29f43d5acce85f8e999b1e431fb479cb02d0e11deb7d2abb56bdaf24fd6"}, 528 | {file = "mypy-1.11.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:af8d155170fcf87a2afb55b35dc1a0ac21df4431e7d96717621962e4b9192e70"}, 529 | {file = "mypy-1.11.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f7821776e5c4286b6a13138cc935e2e9b6fde05e081bdebf5cdb2bb97c9df81d"}, 530 | {file = "mypy-1.11.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:539c570477a96a4e6fb718b8d5c3e0c0eba1f485df13f86d2970c91f0673148d"}, 531 | {file = "mypy-1.11.2-cp39-cp39-win_amd64.whl", hash = "sha256:3f14cd3d386ac4d05c5a39a51b84387403dadbd936e17cb35882134d4f8f0d24"}, 532 | {file = "mypy-1.11.2-py3-none-any.whl", hash = "sha256:b499bc07dbdcd3de92b0a8b29fdf592c111276f6a12fe29c30f6c417dd546d12"}, 533 | {file = "mypy-1.11.2.tar.gz", hash = "sha256:7f9993ad3e0ffdc95c2a14b66dee63729f021968bff8ad911867579c65d13a79"}, 534 | ] 535 | 536 | [package.dependencies] 537 | mypy-extensions = ">=1.0.0" 538 | tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} 539 | typing-extensions = ">=4.6.0" 540 | 541 | [package.extras] 542 | dmypy = ["psutil (>=4.0)"] 543 | install-types = ["pip"] 544 | mypyc = ["setuptools (>=50)"] 545 | reports = ["lxml"] 546 | 547 | [[package]] 548 | name = "mypy-extensions" 549 | version = "1.0.0" 550 | description = "Type system extensions for programs checked with the mypy type checker." 551 | optional = false 552 | python-versions = ">=3.5" 553 | files = [ 554 | {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, 555 | {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, 556 | ] 557 | 558 | [[package]] 559 | name = "packaging" 560 | version = "24.1" 561 | description = "Core utilities for Python packages" 562 | optional = false 563 | python-versions = ">=3.8" 564 | files = [ 565 | {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, 566 | {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, 567 | ] 568 | 569 | [[package]] 570 | name = "pathspec" 571 | version = "0.12.1" 572 | description = "Utility library for gitignore style pattern matching of file paths." 573 | optional = false 574 | python-versions = ">=3.8" 575 | files = [ 576 | {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, 577 | {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, 578 | ] 579 | 580 | [[package]] 581 | name = "platformdirs" 582 | version = "4.3.6" 583 | description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." 584 | optional = false 585 | python-versions = ">=3.8" 586 | files = [ 587 | {file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"}, 588 | {file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"}, 589 | ] 590 | 591 | [package.extras] 592 | docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4)"] 593 | test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.2)", "pytest-cov (>=5)", "pytest-mock (>=3.14)"] 594 | type = ["mypy (>=1.11.2)"] 595 | 596 | [[package]] 597 | name = "pluggy" 598 | version = "1.5.0" 599 | description = "plugin and hook calling mechanisms for python" 600 | optional = false 601 | python-versions = ">=3.8" 602 | files = [ 603 | {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, 604 | {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, 605 | ] 606 | 607 | [package.extras] 608 | dev = ["pre-commit", "tox"] 609 | testing = ["pytest", "pytest-benchmark"] 610 | 611 | [[package]] 612 | name = "pylint" 613 | version = "3.2.7" 614 | description = "python code static checker" 615 | optional = false 616 | python-versions = ">=3.8.0" 617 | files = [ 618 | {file = "pylint-3.2.7-py3-none-any.whl", hash = "sha256:02f4aedeac91be69fb3b4bea997ce580a4ac68ce58b89eaefeaf06749df73f4b"}, 619 | {file = "pylint-3.2.7.tar.gz", hash = "sha256:1b7a721b575eaeaa7d39db076b6e7743c993ea44f57979127c517c6c572c803e"}, 620 | ] 621 | 622 | [package.dependencies] 623 | astroid = ">=3.2.4,<=3.3.0-dev0" 624 | colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} 625 | dill = [ 626 | {version = ">=0.3.7", markers = "python_version >= \"3.12\""}, 627 | {version = ">=0.3.6", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, 628 | {version = ">=0.2", markers = "python_version < \"3.11\""}, 629 | ] 630 | isort = ">=4.2.5,<5.13.0 || >5.13.0,<6" 631 | mccabe = ">=0.6,<0.8" 632 | platformdirs = ">=2.2.0" 633 | tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} 634 | tomlkit = ">=0.10.1" 635 | typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""} 636 | 637 | [package.extras] 638 | spelling = ["pyenchant (>=3.2,<4.0)"] 639 | testutils = ["gitpython (>3)"] 640 | 641 | [[package]] 642 | name = "pyparsing" 643 | version = "3.1.4" 644 | description = "pyparsing module - Classes and methods to define and execute parsing grammars" 645 | optional = false 646 | python-versions = ">=3.6.8" 647 | files = [ 648 | {file = "pyparsing-3.1.4-py3-none-any.whl", hash = "sha256:a6a7ee4235a3f944aa1fa2249307708f893fe5717dc603503c6c7969c070fb7c"}, 649 | {file = "pyparsing-3.1.4.tar.gz", hash = "sha256:f86ec8d1a83f11977c9a6ea7598e8c27fc5cddfa5b07ea2241edbbde1d7bc032"}, 650 | ] 651 | 652 | [package.extras] 653 | diagrams = ["jinja2", "railroad-diagrams"] 654 | 655 | [[package]] 656 | name = "pysigma" 657 | version = "0.11.16" 658 | description = "Sigma rule processing and conversion tools" 659 | optional = false 660 | python-versions = "<4.0,>=3.8" 661 | files = [ 662 | {file = "pysigma-0.11.16-py3-none-any.whl", hash = "sha256:f4c703f568443f4a696e515cf189ec164dcb1040e02867d15d400a877a2e51ac"}, 663 | {file = "pysigma-0.11.16.tar.gz", hash = "sha256:dd98d105276efa1d082d96798009f859da3de8d4c8a968b7da46ba2dd7745872"}, 664 | ] 665 | 666 | [package.dependencies] 667 | jinja2 = ">=3.1,<4.0" 668 | packaging = ">=24.1,<25.0" 669 | pyparsing = ">=3.1,<4.0" 670 | pyyaml = ">=6.0,<7.0" 671 | requests = ">=2.31,<3.0" 672 | 673 | [[package]] 674 | name = "pytest" 675 | version = "8.3.3" 676 | description = "pytest: simple powerful testing with Python" 677 | optional = false 678 | python-versions = ">=3.8" 679 | files = [ 680 | {file = "pytest-8.3.3-py3-none-any.whl", hash = "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2"}, 681 | {file = "pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181"}, 682 | ] 683 | 684 | [package.dependencies] 685 | colorama = {version = "*", markers = "sys_platform == \"win32\""} 686 | exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} 687 | iniconfig = "*" 688 | packaging = "*" 689 | pluggy = ">=1.5,<2" 690 | tomli = {version = ">=1", markers = "python_version < \"3.11\""} 691 | 692 | [package.extras] 693 | dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] 694 | 695 | [[package]] 696 | name = "pytest-cov" 697 | version = "5.0.0" 698 | description = "Pytest plugin for measuring coverage." 699 | optional = false 700 | python-versions = ">=3.8" 701 | files = [ 702 | {file = "pytest-cov-5.0.0.tar.gz", hash = "sha256:5837b58e9f6ebd335b0f8060eecce69b662415b16dc503883a02f45dfeb14857"}, 703 | {file = "pytest_cov-5.0.0-py3-none-any.whl", hash = "sha256:4f0764a1219df53214206bf1feea4633c3b558a2925c8b59f144f682861ce652"}, 704 | ] 705 | 706 | [package.dependencies] 707 | coverage = {version = ">=5.2.1", extras = ["toml"]} 708 | pytest = ">=4.6" 709 | 710 | [package.extras] 711 | testing = ["fields", "hunter", "process-tests", "pytest-xdist", "virtualenv"] 712 | 713 | [[package]] 714 | name = "pytest-mypy" 715 | version = "0.10.3" 716 | description = "Mypy static type checker plugin for Pytest" 717 | optional = false 718 | python-versions = ">=3.6" 719 | files = [ 720 | {file = "pytest-mypy-0.10.3.tar.gz", hash = "sha256:f8458f642323f13a2ca3e2e61509f7767966b527b4d8adccd5032c3e7b4fd3db"}, 721 | {file = "pytest_mypy-0.10.3-py3-none-any.whl", hash = "sha256:7638d0d3906848fc1810cb2f5cc7fceb4cc5c98524aafcac58f28620e3102053"}, 722 | ] 723 | 724 | [package.dependencies] 725 | attrs = ">=19.0" 726 | filelock = ">=3.0" 727 | mypy = [ 728 | {version = ">=0.900", markers = "python_version >= \"3.11\""}, 729 | {version = ">=0.780", markers = "python_version >= \"3.9\" and python_version < \"3.11\""}, 730 | {version = ">=0.700", markers = "python_version >= \"3.8\" and python_version < \"3.9\""}, 731 | ] 732 | pytest = [ 733 | {version = ">=6.2", markers = "python_version >= \"3.10\""}, 734 | {version = ">=4.6", markers = "python_version >= \"3.6\" and python_version < \"3.10\""}, 735 | ] 736 | 737 | [[package]] 738 | name = "pytoolconfig" 739 | version = "1.3.1" 740 | description = "Python tool configuration" 741 | optional = false 742 | python-versions = ">=3.8" 743 | files = [ 744 | {file = "pytoolconfig-1.3.1-py3-none-any.whl", hash = "sha256:5d8cea8ae1996938ec3eaf44567bbc5ef1bc900742190c439a44a704d6e1b62b"}, 745 | {file = "pytoolconfig-1.3.1.tar.gz", hash = "sha256:51e6bd1a6f108238ae6aab6a65e5eed5e75d456be1c2bf29b04e5c1e7d7adbae"}, 746 | ] 747 | 748 | [package.dependencies] 749 | packaging = ">=23.2" 750 | platformdirs = {version = ">=3.11.0", optional = true, markers = "extra == \"global\""} 751 | tomli = {version = ">=2.0.1", markers = "python_version < \"3.11\""} 752 | 753 | [package.extras] 754 | doc = ["sphinx (>=7.1.2)", "tabulate (>=0.9.0)"] 755 | gendocs = ["pytoolconfig[doc]", "sphinx (>=7.1.2)", "sphinx-autodoc-typehints (>=1.25.2)", "sphinx-rtd-theme (>=2.0.0)"] 756 | global = ["platformdirs (>=3.11.0)"] 757 | validation = ["pydantic (>=2.5.3)"] 758 | 759 | [[package]] 760 | name = "pyyaml" 761 | version = "6.0.2" 762 | description = "YAML parser and emitter for Python" 763 | optional = false 764 | python-versions = ">=3.8" 765 | files = [ 766 | {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, 767 | {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, 768 | {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237"}, 769 | {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b"}, 770 | {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed"}, 771 | {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180"}, 772 | {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68"}, 773 | {file = "PyYAML-6.0.2-cp310-cp310-win32.whl", hash = "sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99"}, 774 | {file = "PyYAML-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e"}, 775 | {file = "PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774"}, 776 | {file = "PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee"}, 777 | {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c"}, 778 | {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317"}, 779 | {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85"}, 780 | {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4"}, 781 | {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e"}, 782 | {file = "PyYAML-6.0.2-cp311-cp311-win32.whl", hash = "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5"}, 783 | {file = "PyYAML-6.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44"}, 784 | {file = "PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab"}, 785 | {file = "PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725"}, 786 | {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5"}, 787 | {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425"}, 788 | {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476"}, 789 | {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48"}, 790 | {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b"}, 791 | {file = "PyYAML-6.0.2-cp312-cp312-win32.whl", hash = "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4"}, 792 | {file = "PyYAML-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8"}, 793 | {file = "PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba"}, 794 | {file = "PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1"}, 795 | {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133"}, 796 | {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484"}, 797 | {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5"}, 798 | {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc"}, 799 | {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652"}, 800 | {file = "PyYAML-6.0.2-cp313-cp313-win32.whl", hash = "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183"}, 801 | {file = "PyYAML-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563"}, 802 | {file = "PyYAML-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a"}, 803 | {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5"}, 804 | {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d"}, 805 | {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083"}, 806 | {file = "PyYAML-6.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706"}, 807 | {file = "PyYAML-6.0.2-cp38-cp38-win32.whl", hash = "sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a"}, 808 | {file = "PyYAML-6.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff"}, 809 | {file = "PyYAML-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d"}, 810 | {file = "PyYAML-6.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f"}, 811 | {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290"}, 812 | {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12"}, 813 | {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19"}, 814 | {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e"}, 815 | {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725"}, 816 | {file = "PyYAML-6.0.2-cp39-cp39-win32.whl", hash = "sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631"}, 817 | {file = "PyYAML-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8"}, 818 | {file = "pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e"}, 819 | ] 820 | 821 | [[package]] 822 | name = "requests" 823 | version = "2.32.3" 824 | description = "Python HTTP for Humans." 825 | optional = false 826 | python-versions = ">=3.8" 827 | files = [ 828 | {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, 829 | {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, 830 | ] 831 | 832 | [package.dependencies] 833 | certifi = ">=2017.4.17" 834 | charset-normalizer = ">=2,<4" 835 | idna = ">=2.5,<4" 836 | urllib3 = ">=1.21.1,<3" 837 | 838 | [package.extras] 839 | socks = ["PySocks (>=1.5.6,!=1.5.7)"] 840 | use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] 841 | 842 | [[package]] 843 | name = "rope" 844 | version = "1.13.0" 845 | description = "a python refactoring library..." 846 | optional = false 847 | python-versions = ">=3.8" 848 | files = [ 849 | {file = "rope-1.13.0-py3-none-any.whl", hash = "sha256:b435a0c0971244fdcd8741676a9fae697ae614c20cc36003678a7782f25c0d6c"}, 850 | {file = "rope-1.13.0.tar.gz", hash = "sha256:51437d2decc8806cd5e9dd1fd9c1306a6d9075ecaf78d191af85fc1dfface880"}, 851 | ] 852 | 853 | [package.dependencies] 854 | pytoolconfig = {version = ">=1.2.2", extras = ["global"]} 855 | 856 | [package.extras] 857 | dev = ["build (>=0.7.0)", "pre-commit (>=2.20.0)", "pytest (>=7.0.1)", "pytest-cov (>=4.1.0)", "pytest-timeout (>=2.1.0)"] 858 | doc = ["pytoolconfig[doc]", "sphinx (>=4.5.0)", "sphinx-autodoc-typehints (>=1.18.1)", "sphinx-rtd-theme (>=1.0.0)"] 859 | release = ["pip-tools (>=6.12.1)", "toml (>=0.10.2)", "twine (>=4.0.2)"] 860 | 861 | [[package]] 862 | name = "tomli" 863 | version = "2.0.2" 864 | description = "A lil' TOML parser" 865 | optional = false 866 | python-versions = ">=3.8" 867 | files = [ 868 | {file = "tomli-2.0.2-py3-none-any.whl", hash = "sha256:2ebe24485c53d303f690b0ec092806a085f07af5a5aa1464f3931eec36caaa38"}, 869 | {file = "tomli-2.0.2.tar.gz", hash = "sha256:d46d457a85337051c36524bc5349dd91b1877838e2979ac5ced3e710ed8a60ed"}, 870 | ] 871 | 872 | [[package]] 873 | name = "tomlkit" 874 | version = "0.13.2" 875 | description = "Style preserving TOML library" 876 | optional = false 877 | python-versions = ">=3.8" 878 | files = [ 879 | {file = "tomlkit-0.13.2-py3-none-any.whl", hash = "sha256:7a974427f6e119197f670fbbbeae7bef749a6c14e793db934baefc1b5f03efde"}, 880 | {file = "tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79"}, 881 | ] 882 | 883 | [[package]] 884 | name = "typing-extensions" 885 | version = "4.12.2" 886 | description = "Backported and Experimental Type Hints for Python 3.8+" 887 | optional = false 888 | python-versions = ">=3.8" 889 | files = [ 890 | {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, 891 | {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, 892 | ] 893 | 894 | [[package]] 895 | name = "urllib3" 896 | version = "2.2.3" 897 | description = "HTTP library with thread-safe connection pooling, file post, and more." 898 | optional = false 899 | python-versions = ">=3.8" 900 | files = [ 901 | {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"}, 902 | {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"}, 903 | ] 904 | 905 | [package.extras] 906 | brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] 907 | h2 = ["h2 (>=4,<5)"] 908 | socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] 909 | zstd = ["zstandard (>=0.18.0)"] 910 | 911 | [metadata] 912 | lock-version = "2.0" 913 | python-versions = "^3.8" 914 | content-hash = "f6d0425e92e3e50a8a0c85ebdc6fd6bbf6e56df5e5acff38a4d1a61ea307a7bb" 915 | -------------------------------------------------------------------------------- /print-coverage.py: -------------------------------------------------------------------------------- 1 | # Prints code testing coverage as percentage for badge generation. 2 | import xml.etree.ElementTree as et 3 | 4 | tree = et.parse("cov.xml") 5 | root = tree.getroot() 6 | coverage = float(root.attrib["line-rate"]) * 100 7 | print(f"COVERAGE={coverage:3.4}%") 8 | if coverage >= 95.0: 9 | print("COVERAGE_COLOR=green") 10 | elif coverage >= 90.0: 11 | print("COVERAGE_COLOR=yellow") 12 | elif coverage >= 85.0: 13 | print("COVERAGE_COLOR=orange") 14 | else: 15 | print("COVERAGE_COLOR=red") 16 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "pysigma-backend-crowdstrike" 3 | version = "2.0.1" 4 | description = "pySigma CrowdStrike Logscale backend and processing pipelines for the Falcon data model." 5 | readme = "README.md" 6 | authors = ["Panos Moullotos", "Thomas Patzke "] 7 | license = "LGPL-2.1-only" 8 | repository = "https://github.com/SigmaHQ/pySigma-backend-crowdstrike" 9 | packages = [ 10 | { include = "sigma" } 11 | ] 12 | 13 | [tool.poetry.dependencies] 14 | python = "^3.8" 15 | pysigma = "^0.11.13" 16 | 17 | [tool.poetry.group.dev.dependencies] 18 | black = "^24.4.2" 19 | pytest = "^8.3.3" 20 | pytest-cov = "^5.0.0" 21 | pytest-mypy = "^0.10.3" 22 | pylint = "^3.2.7" 23 | rope = "^1.13.0" 24 | 25 | [build-system] 26 | requires = ["poetry-core>=1.0.0"] 27 | build-backend = "poetry.core.masonry.api" 28 | -------------------------------------------------------------------------------- /sigma/backends/crowdstrike/__init__.py: -------------------------------------------------------------------------------- 1 | from .logscale import LogScaleBackend 2 | 3 | backends = { # Mapping between backend identifiers and classes. This is used by the pySigma plugin system to recognize backends and expose them with the identifier. 4 | "CrowdStrike Logscale": LogScaleBackend, 5 | } 6 | -------------------------------------------------------------------------------- /sigma/backends/crowdstrike/logscale.py: -------------------------------------------------------------------------------- 1 | from sigma.conversion.state import ConversionState 2 | from sigma.conversion.base import TextQueryBackend 3 | from sigma.conditions import ( 4 | ConditionItem, 5 | ConditionAND, 6 | ConditionOR, 7 | ConditionNOT, 8 | ConditionFieldEqualsValueExpression, 9 | ) 10 | from sigma.conversion.deferred import ( 11 | DeferredQueryExpression, 12 | DeferredTextQueryExpression, 13 | ) 14 | from sigma.types import ( 15 | SigmaCompareExpression, 16 | SigmaRegularExpressionFlag, 17 | SpecialChars, 18 | SigmaString, 19 | ) 20 | from sigma.exceptions import SigmaFeatureNotSupportedByBackendError 21 | import sigma 22 | import re 23 | from typing import ClassVar, Dict, Tuple, Pattern, Optional, Union 24 | 25 | 26 | class LogScaleDeferredEqualsOperator(DeferredTextQueryExpression): 27 | template = "{field}{op}/{value}/i" 28 | operators = { 29 | True: "!=", 30 | False: "=", 31 | } 32 | 33 | 34 | class LogScaleDeferredTestOperator(DeferredQueryExpression): 35 | template = "test({field1}=={field2})" 36 | 37 | 38 | class LogScaleDeferredInOperator(DeferredTextQueryExpression): 39 | template = "{op}in({field}, ignoreCase=true, values=[{value}])" 40 | operators = { 41 | True: "!", 42 | False: "", 43 | } 44 | 45 | 46 | class LogScaleDeferredCIDRExpression(DeferredTextQueryExpression): 47 | template = "{op}cidr({field}, subnet={value})" 48 | operators = { 49 | True: "!", 50 | False: "", 51 | } 52 | 53 | 54 | class LogScaleDeferredRegularExpression(DeferredTextQueryExpression): 55 | template = "{op}regex(field={field},{value})" 56 | operators = {True: "!", False: ""} 57 | 58 | 59 | class LogScaleBackend(TextQueryBackend): 60 | """CrowdStrike LogScale backend.""" 61 | 62 | # Operator precedence: tuple of Condition{AND,OR,NOT} in order of precedence. 63 | # The backend generates grouping if required 64 | name: ClassVar[str] = "CrowdStrike LogScale backend" 65 | formats: Dict[str, str] = { 66 | "default": "CrowdStrike LogScale queries", 67 | } 68 | requires_pipeline: bool = True 69 | 70 | # Operator precedence: tuple of Condition{AND,OR,NOT} in order of precedence. 71 | precedence: ClassVar[Tuple[ConditionItem, ConditionItem, ConditionItem]] = ( 72 | ConditionNOT, 73 | ConditionOR, 74 | ConditionAND, 75 | ) 76 | group_expression: ClassVar[str] = "({expr})" 77 | 78 | # Generated query tokens 79 | token_separator: str = " " 80 | or_token: ClassVar[str] = "or" 81 | and_token: ClassVar[str] = " " 82 | not_token: ClassVar[str] = "not" 83 | eq_token: ClassVar[str] = "=" 84 | 85 | # String output 86 | ## Fields 87 | ### Quoting 88 | field_quote: ClassVar[str] = '"' 89 | field_quote_pattern: ClassVar[Pattern] = re.compile( 90 | r"^[@|#]?[\w.]+$" 91 | ) # Some logscale fields start with # or @ 92 | field_quote_pattern_negation: ClassVar[bool] = True 93 | 94 | ### Escaping 95 | # fields in LogScale are defined directly by CrowdStrike so this is probably unnecessary but let's do it anyway 96 | field_escape: ClassVar[str] = "\\" 97 | field_escape_quote: ClassVar[bool] = True 98 | 99 | ## Values 100 | ## This is unused by the backend because {field}={value} is case sensitive in logscale. All values are treated as regular expressions 101 | ## https://library.humio.com/data-analysis/writing-queries-operations.html#writing-queries-operations-strings-case-insensitive 102 | str_quote: ClassVar[str] = ( 103 | '"' # string quoting character (added as escaping character) 104 | ) 105 | str_quote_pattern_negation = False 106 | escape_char: ClassVar[str] = ( 107 | "\\" # Escaping character for special characrers inside string 108 | ) 109 | wildcard_multi: ClassVar[str] = ".*" # Character used as multi-character wildcard 110 | wildcard_single: ClassVar[str] = "." # Character used as single-character wildcard 111 | add_escaped: ClassVar[str] = ( 112 | "\\" # Characters quoted in addition to wildcards and string quote 113 | ) 114 | filter_chars: ClassVar[str] = "" # Characters filtered 115 | bool_values: ClassVar[Dict[bool, str]] = ( 116 | { # Values to which boolean values are mapped. 117 | True: "true", 118 | False: "false", 119 | } 120 | ) 121 | 122 | ## Special Regex Values for LogScale 123 | str_quote_re: ClassVar[str] = "" 124 | escape_char_re: ClassVar[str] = "\\" 125 | wildcard_multi_re: ClassVar[str] = ".*" 126 | wildcard_single_re: ClassVar[str] = "." 127 | add_escaped_re: ClassVar[str] = "*$^.|?()[]+/{}" 128 | filter_chars_re: ClassVar[str] = "" 129 | bool_values_re: ClassVar[Dict[bool, str]] = { 130 | True: "true", 131 | False: "false", 132 | } 133 | 134 | # Regular expressions 135 | # Regular expression query as format string with placeholders {field}, {regex}, {flag_x} where x 136 | # is one of the flags shortcuts supported by Sigma (currently i, m and s) and refers to the 137 | # token stored in the class variable re_flags. 138 | re_expression: ClassVar[str] = "{field}=/{regex}/{flag_i}{flag_m}{flag_s}" 139 | re_exact_match: ClassVar[str] = "{field}=/^{regex}$/{flag_i}{flag_m}{flag_s}" 140 | re_escape_char: ClassVar[str] = "\\" 141 | re_escape: ClassVar[Tuple[str]] = '"' 142 | re_escape_escape_char: bool = False 143 | re_flag_prefix: bool = False 144 | re_flags: Dict[SigmaRegularExpressionFlag, str] = { 145 | SigmaRegularExpressionFlag.IGNORECASE: "i", 146 | SigmaRegularExpressionFlag.MULTILINE: "m", 147 | SigmaRegularExpressionFlag.DOTALL: "s", 148 | } 149 | 150 | # case sensitive match is just {field}={value} in logscale 151 | case_sensitive_match_expression: ClassVar[str] = "{field}={value}" 152 | 153 | # wildcards could have been used here as well but we went with the regex format without the case insensitivity flag 154 | case_sensitive_startswith_expression: ClassVar[str] = "{field}=/^{value}/" 155 | case_sensitive_endswith_expression: ClassVar[str] = "{field}=/{value}$/" 156 | case_sensitive_contains_expression: ClassVar[str] = "{field}=/{value}/" 157 | 158 | # also handled as regex. Look at the convert_condition_field_eq_val_str method 159 | startswith_expression: ClassVar[str] = "{field}=/^{regex}/{flag_i}{flag_m}{flag_s}" 160 | endswith_expression: ClassVar[str] = "{field}=/{regex}$/{flag_i}{flag_m}{flag_s}" 161 | contains_expression: ClassVar[str] = "{field}=/{regex}/{flag_i}{flag_m}{flag_s}" 162 | 163 | # https://library.humio.com/data-analysis/functions-cidr.html 164 | # Convert method is overloaded below 165 | cidr_expression: ClassVar[Optional[str]] = "{value}" 166 | 167 | # Numeric comparison operators 168 | compare_op_expression: ClassVar[str] = ( 169 | "{field}{operator}{value}" # Compare operation query as format string with placeholders {field}, {operator} and {value} 170 | ) 171 | # https://library.humio.com/data-analysis/syntax-operators.html 172 | compare_operators: ClassVar[Dict[SigmaCompareExpression.CompareOperators, str]] = { 173 | SigmaCompareExpression.CompareOperators.LT: "<", 174 | SigmaCompareExpression.CompareOperators.LTE: "<=", 175 | SigmaCompareExpression.CompareOperators.GT: ">", 176 | SigmaCompareExpression.CompareOperators.GTE: ">=", 177 | } 178 | 179 | # Null/None expressions 180 | # https://library.humio.com/kb/kb-empty-fields.html 181 | field_null_expression: ClassVar[str] = ( 182 | "{field}!=*" # Expression for field has null value as format string with {field} placeholder for field name 183 | ) 184 | 185 | # Field existence condition expressions. 186 | # I dont think humio can do the below 187 | # field_exists_expression : ClassVar[str] = "exists({field})" # Expression for field existence as format string with {field} placeholder for field name 188 | # field_not_exists_expression : ClassVar[str] = "notexists({field})" # Expression for field non-existence as format string with {field} placeholder for field name. If not set, field_exists_expression is negated with boolean NOT. 189 | 190 | # https://library.humio.com/data-analysis/functions-in.html """ 191 | # Logscale does not support 'or' with in statements so we decided not to use it. However the logic is here if this changes 192 | convert_or_as_in: ClassVar[bool] = False # Convert OR as in-expression 193 | convert_and_as_in: ClassVar[bool] = False # Convert AND as in-expression 194 | in_expressions_allow_wildcards: ClassVar[bool] = ( 195 | True # Values in list can contain wildcards. If set to False (default) only plain values are converted into in-expressions. 196 | ) 197 | 198 | field_in_list_expression: ClassVar[str] = ( 199 | "{list}" # Expression for field in list of values as format string with placeholders {field}, {op} and {list} 200 | ) 201 | or_in_operator: ClassVar[str] = ( 202 | "in" # Operator used to convert OR into in-expressions. Must be set if convert_or_as_in is set 203 | ) 204 | list_separator: ClassVar[str] = ", " # List element separator 205 | 206 | # Value not bound to a field 207 | # We want these to be case insensivitive so use the regex representation again 208 | unbound_value_str_expression: ClassVar[str] = ( 209 | "/{value}/i" # Expression for string value not bound to a field as format string with placeholder {value} 210 | ) 211 | unbound_value_num_expression: ClassVar[str] = ( 212 | "/{value}/i" # Expression for number value not bound to a field as format string with placeholder {value} 213 | ) 214 | unbound_value_re_expression: ClassVar[str] = ( 215 | "/{value}/{flag_i}{flag_m}{flag_s}" # Expression for regular expression not bound to a field as format string with placeholder {value} and {flag_x} as described for re_expression 216 | ) 217 | 218 | # Query finalization: appending and concatenating deferred query part 219 | deferred_start: ClassVar[str] = ( 220 | "| " # String used as separator between main query and deferred parts 221 | ) 222 | deferred_separator: ClassVar[str] = ( 223 | "| " # String used to join multiple deferred query parts 224 | ) 225 | deferred_only_query: ClassVar[str] = ( 226 | "" # String used as query if final query only contains deferred expression 227 | ) 228 | 229 | def __init__( 230 | self, 231 | processing_pipeline: Optional[ 232 | "sigma.processing.pipeline.ProcessingPipeline" 233 | ] = None, 234 | collect_errors: bool = False, 235 | **kwargs, 236 | ): 237 | super().__init__(processing_pipeline, collect_errors, **kwargs) 238 | 239 | def convert_condition_field_eq_val_cidr( 240 | self, 241 | cond: ConditionFieldEqualsValueExpression, 242 | state: ConversionState, 243 | ) -> LogScaleDeferredCIDRExpression: 244 | """Defer CIDR network range matching to pipelined where cidrmatch command after main search expression.""" 245 | if cond.parent_condition_chain_contains(ConditionOR): 246 | raise SigmaFeatureNotSupportedByBackendError( 247 | "ORing CIDR matching is not yet supported by LogScale backend", 248 | source=cond.source, 249 | ) 250 | return LogScaleDeferredCIDRExpression( 251 | state, cond.field, super().convert_condition_field_eq_val_cidr(cond, state) 252 | ).postprocess(None, cond) 253 | 254 | def convert_condition_field_eq_val_str( 255 | self, cond: ConditionFieldEqualsValueExpression, state: ConversionState 256 | ) -> Union[str, DeferredQueryExpression]: 257 | """Conversion of field = string value expressions. In logscale we handle everything as regexs""" 258 | try: 259 | if ( # contains: string starts and ends with wildcard 260 | self.contains_expression is not None 261 | and cond.value.startswith(SpecialChars.WILDCARD_MULTI) 262 | and cond.value.endswith(SpecialChars.WILDCARD_MULTI) 263 | ): 264 | expr = self.contains_expression 265 | value = cond.value[1:-1] 266 | elif ( # Same as above but for 'endswith' operator: string starts with wildcard 267 | self.endswith_expression is not None 268 | and cond.value.startswith(SpecialChars.WILDCARD_MULTI) 269 | ): 270 | expr = self.endswith_expression 271 | value = cond.value[1:] 272 | 273 | elif ( # Same as above but for 'startswith' operator: string ends with wildcard 274 | self.startswith_expression 275 | is not None # 'startswith' operator is defined in backend 276 | and cond.value.endswith( 277 | SpecialChars.WILDCARD_MULTI 278 | ) 279 | ): 280 | expr = self.startswith_expression 281 | # If all conditions are fulfilled, use 'startswith' operator instead of equal token 282 | value = cond.value[:-1] 283 | else: 284 | expr = self.re_exact_match 285 | value = cond.value 286 | return expr.format( 287 | field=self.escape_and_quote_field(cond.field), 288 | regex=self.convert_value_str_re(value, state), 289 | flag_i="i", 290 | flag_m="", 291 | flag_s="", 292 | ) 293 | except TypeError: # pragma: no cover 294 | raise NotImplementedError( 295 | "Field equals string value expressions with strings are not supported by the backend." 296 | ) 297 | 298 | def convert_value_str_re(self, s: SigmaString, state: ConversionState) -> str: 299 | converted = s.convert( 300 | escape_char=self.escape_char_re, 301 | wildcard_multi=self.wildcard_multi_re, 302 | wildcard_single=self.wildcard_single_re, 303 | add_escaped=self.str_quote_re + self.add_escaped_re + self.escape_char_re, 304 | filter_chars=self.filter_chars_re, 305 | ) 306 | return converted 307 | -------------------------------------------------------------------------------- /sigma/pipelines/crowdstrike/__init__.py: -------------------------------------------------------------------------------- 1 | from .crowdstrike import crowdstrike_fdr_pipeline 2 | from .crowdstrike import crowdstrike_falcon_pipeline 3 | 4 | pipelines = { 5 | "crowdstrike_fdr": crowdstrike_fdr_pipeline, 6 | "crowdstrike_falcon": crowdstrike_falcon_pipeline, 7 | } 8 | -------------------------------------------------------------------------------- /sigma/pipelines/crowdstrike/crowdstrike.py: -------------------------------------------------------------------------------- 1 | from sigma.pipelines.common import ( 2 | logsource_windows_ps_script, 3 | logsource_windows_driver_load, 4 | logsource_windows_dns_query, 5 | logsource_windows_image_load, 6 | logsource_windows_process_creation, 7 | logsource_linux_process_creation, 8 | logsource_windows_network_connection, 9 | logsource_windows_network_connection_initiated, 10 | ) 11 | from sigma.processing.transformations import ( 12 | ReplaceStringTransformation, 13 | AddConditionTransformation, 14 | ChangeLogsourceTransformation, 15 | DropDetectionItemTransformation, 16 | FieldMappingTransformation, 17 | DetectionItemFailureTransformation, 18 | MapStringTransformation, 19 | ) 20 | from sigma.processing.conditions import ( 21 | RuleContainsDetectionItemCondition, 22 | IncludeFieldCondition, 23 | MatchStringCondition, 24 | ) 25 | from sigma.processing.pipeline import ProcessingItem, ProcessingPipeline 26 | from sigma.processing.finalization import ConcatenateQueriesFinalizer 27 | 28 | 29 | cond_field_parentbasefilename = IncludeFieldCondition(fields=["ParentBaseFileName"]) 30 | cond_field_contextbasefilename = IncludeFieldCondition(fields=["ContextBaseFileName"]) 31 | 32 | 33 | def generate_unsupported_process_field_processing_item(field): 34 | return ProcessingItem( 35 | identifier=f"cql_fail_process_start_{field}", 36 | transformation=DetectionItemFailureTransformation( 37 | f"Crowdstrike Query Language does not support the {field} field" 38 | ), 39 | rule_conditions=[logsource_windows_process_creation()], 40 | field_name_conditions=[IncludeFieldCondition(fields=[field])], 41 | ) 42 | 43 | 44 | def generate_unsupported_network_field_processing_item(field): 45 | return ProcessingItem( 46 | identifier=f"cql_fail_network_event_{field}", 47 | transformation=DetectionItemFailureTransformation( 48 | f"CrowdStrike Query Language does not support the {field} field" 49 | ), 50 | rule_conditions=[logsource_windows_network_connection()], 51 | field_name_conditions=[IncludeFieldCondition(fields=[field])], 52 | ) 53 | 54 | 55 | def generate_unsupported_dns_field_processing_item(field): 56 | return ProcessingItem( 57 | identifier=f"cql_fail_dns_event_{field}", 58 | transformation=DetectionItemFailureTransformation( 59 | f"CrowdStrike Query Language does not support the {field} field" 60 | ), 61 | rule_conditions=[logsource_windows_dns_query()], 62 | field_name_conditions=[IncludeFieldCondition(fields=[field])], 63 | ) 64 | 65 | 66 | def generate_unsupported_image_load_field_processing_item(field): 67 | return ProcessingItem( 68 | identifier=f"cql_fail_imageload_event_{field}", 69 | transformation=DetectionItemFailureTransformation( 70 | f"CrowdStrike Query Language does not support the {field} field" 71 | ), 72 | rule_conditions=[logsource_windows_image_load()], 73 | field_name_conditions=[IncludeFieldCondition(fields=[field])], 74 | ) 75 | 76 | 77 | def generate_unsupported_driverload_field_processing_item(field): 78 | return ProcessingItem( 79 | identifier=f"cql_fail_driverload_event_{field}", 80 | transformation=DetectionItemFailureTransformation( 81 | f"CrowdStrike Query Language does not support the {field} field" 82 | ), 83 | rule_conditions=[logsource_windows_driver_load()], 84 | field_name_conditions=[IncludeFieldCondition(fields=[field])], 85 | ) 86 | 87 | def common_processing_items(): 88 | return [ 89 | ProcessingItem( 90 | identifier="cql_win", 91 | transformation=AddConditionTransformation({"event_platform": "Win"}), 92 | rule_conditions=[ 93 | logsource_windows_process_creation(), 94 | logsource_windows_dns_query(), 95 | logsource_windows_driver_load(), 96 | logsource_windows_image_load(), 97 | logsource_windows_ps_script(), 98 | ], 99 | rule_condition_linking=any, 100 | ), 101 | ProcessingItem( 102 | identifier="cql_process_creation_nix", 103 | transformation=AddConditionTransformation({"event_platform": "Lin"}), 104 | rule_conditions=[ 105 | logsource_linux_process_creation(), 106 | ], 107 | ), 108 | ProcessingItem( 109 | identifier="cql_process_creation_fieldmaping", 110 | transformation=FieldMappingTransformation( 111 | { 112 | "Image": "ImageFileName", 113 | "ParentImage": "ParentBaseFileName", 114 | "User": "UserName", 115 | "ProcessId": "RawProcessId", 116 | "sha256": "SHA256HashData", 117 | "Computer": "ComputerName", 118 | "OriginalFileName": "OriginalFilename", 119 | } 120 | ), 121 | rule_conditions=[ 122 | logsource_windows_process_creation(), 123 | logsource_linux_process_creation(), 124 | ], 125 | rule_condition_linking=any, 126 | ), 127 | # Handle unsupported process start events 128 | generate_unsupported_process_field_processing_item("CurrentDirectory"), 129 | generate_unsupported_process_field_processing_item("imphash"), 130 | generate_unsupported_process_field_processing_item("md5"), 131 | generate_unsupported_process_field_processing_item("sha1"), 132 | generate_unsupported_process_field_processing_item("ParentCommandLine"), 133 | generate_unsupported_process_field_processing_item("FileVersion"), 134 | generate_unsupported_process_field_processing_item("Description"), 135 | generate_unsupported_process_field_processing_item("Product"), 136 | generate_unsupported_process_field_processing_item("Company"), 137 | generate_unsupported_process_field_processing_item("LogonGuid"), 138 | generate_unsupported_process_field_processing_item("ParentProcessGuid"), 139 | generate_unsupported_process_field_processing_item("ParentProcessId"), 140 | ProcessingItem( 141 | identifier="crowdstrike_process_creation_logsource", 142 | transformation=ChangeLogsourceTransformation( 143 | category="process_creation", 144 | product="windows", 145 | service="crowdstrike", 146 | ), 147 | rule_conditions=[ 148 | logsource_windows_process_creation(), 149 | ], 150 | ), 151 | # ParentBaseFileName handling 152 | ProcessingItem( 153 | identifier="cql_parentbasefilename_fail_completepath", 154 | transformation=DetectionItemFailureTransformation( 155 | "Only file name of parent image is available in CrowdStrike Query Language events." 156 | ), 157 | field_name_conditions=[ 158 | cond_field_parentbasefilename, 159 | ], 160 | detection_item_conditions=[ 161 | MatchStringCondition( 162 | cond="any", 163 | pattern="^\\*\\\\?[^\\\\]+$", 164 | negate=True, 165 | ), 166 | ], 167 | ), 168 | ProcessingItem( 169 | identifier="cql_parentbasefilename_executable_only", 170 | transformation=ReplaceStringTransformation( 171 | regex="^\\*\\\\([^\\\\]+)$", 172 | replacement="\\1", 173 | ), 174 | field_name_conditions=[ 175 | cond_field_parentbasefilename, 176 | ], 177 | ), 178 | # IntegrityLevel handling 179 | ProcessingItem( 180 | identifier="cql_imagefilename_unknown_integrity_level", 181 | transformation=DetectionItemFailureTransformation( 182 | "Integrity Level needs to be one of Protected,System,High,Medium_Plus,Medium,Low,Untrusted" 183 | ), 184 | field_name_conditions=[ 185 | IncludeFieldCondition(fields=["IntegrityLevel"]) 186 | ], 187 | rule_conditions=[ 188 | RuleContainsDetectionItemCondition( 189 | field="IntegrityLevel", value="Protected" 190 | ), 191 | RuleContainsDetectionItemCondition( 192 | field="IntegrityLevel", value="System" 193 | ), 194 | RuleContainsDetectionItemCondition( 195 | field="IntegrityLevel", value="High" 196 | ), 197 | RuleContainsDetectionItemCondition( 198 | field="IntegrityLevel", value="Medium_Plus" 199 | ), 200 | RuleContainsDetectionItemCondition( 201 | field="IntegrityLevel", value="Medium" 202 | ), 203 | RuleContainsDetectionItemCondition( 204 | field="IntegrityLevel", value="Low" 205 | ), 206 | RuleContainsDetectionItemCondition( 207 | field="IntegrityLevel", value="Untrusted" 208 | ), 209 | ], 210 | rule_condition_linking=any, 211 | rule_condition_negation=True, 212 | ), 213 | ProcessingItem( 214 | identifier="cql_imagefilename_replace_integrity_level", 215 | transformation=MapStringTransformation( 216 | { 217 | "Protected": "20480", 218 | "System": "16384", 219 | "High": "12288", 220 | "Medium_Plus": "8448", 221 | "Medium": "8192", 222 | "Low": "4096", 223 | "Untrusted": "0", 224 | } 225 | ), 226 | field_name_conditions=[ 227 | IncludeFieldCondition(fields=["IntegrityLevel"]) 228 | ], 229 | ), 230 | # Network Connection Common Processing Items 231 | ProcessingItem( 232 | identifier="cql_network_connection_fieldmapping", 233 | transformation=FieldMappingTransformation( 234 | { 235 | "DestinationIp": "RemoteAddressIP4", 236 | "DestinationPort": "RemotePort", 237 | "Image": "ContextBaseFileName", 238 | "SourcePort": "LocalPort", 239 | } 240 | ), 241 | rule_conditions=[ 242 | logsource_windows_network_connection(), 243 | ], 244 | ), 245 | ProcessingItem( 246 | identifier="cql_network_connection_drop_initiated", 247 | transformation=DropDetectionItemTransformation(), 248 | rule_conditions=[ 249 | logsource_windows_network_connection(), 250 | ], 251 | field_name_conditions=[ 252 | IncludeFieldCondition(fields=["Initiated"]), 253 | ], 254 | ), 255 | ProcessingItem( 256 | identifier="crowdstrike_network_connection_logsource", 257 | transformation=ChangeLogsourceTransformation( 258 | category="network_connection", 259 | product="windows", 260 | service="crowdstrike", 261 | ), 262 | rule_conditions=[ 263 | logsource_windows_network_connection(), 264 | ], 265 | ), 266 | generate_unsupported_network_field_processing_item('DetectionHostName'), 267 | # DNS Request Common Processing Items 268 | ProcessingItem( 269 | identifier="cql_dns_query_fieldmapping", 270 | transformation=FieldMappingTransformation( 271 | { 272 | "QueryName": "DomainName", 273 | "record_type": "RequestType", 274 | "Image": "ContextBaseFileName", 275 | "QueryResults": ["IP4Records", "IP6Records"], 276 | } 277 | ), 278 | rule_conditions=[ 279 | logsource_windows_dns_query(), 280 | ], 281 | ), 282 | ProcessingItem( 283 | identifier="cql_dns_query_logsource", 284 | transformation=ChangeLogsourceTransformation( 285 | category="dns_query", 286 | product="windows", 287 | service="crowdstrike", 288 | ), 289 | rule_conditions=[ 290 | logsource_windows_dns_query(), 291 | ], 292 | ), 293 | # Request Type handling 294 | ProcessingItem( 295 | identifier="cql_dns_unknown_request_type", 296 | transformation=DetectionItemFailureTransformation( 297 | "record_type needs to be one of A,NS,CNAME,PTR,MX,TXT,AAAA,ANY" 298 | ), 299 | field_name_conditions=[IncludeFieldCondition(fields=["RequestType"])], 300 | rule_conditions=[ 301 | RuleContainsDetectionItemCondition(field="RequestType", value="A"), 302 | RuleContainsDetectionItemCondition(field="RequestType", value="NS"), 303 | RuleContainsDetectionItemCondition( 304 | field="RequestType", value="CNAME" 305 | ), 306 | RuleContainsDetectionItemCondition( 307 | field="RequestType", value="PTR" 308 | ), 309 | RuleContainsDetectionItemCondition(field="RequestType", value="MX"), 310 | RuleContainsDetectionItemCondition( 311 | field="RequestType", value="TXT" 312 | ), 313 | RuleContainsDetectionItemCondition( 314 | field="RequestType", value="AAAA" 315 | ), 316 | RuleContainsDetectionItemCondition( 317 | field="RequestType", value="ANY" 318 | ), 319 | ], 320 | rule_condition_linking=any, 321 | rule_condition_negation=True, 322 | ), 323 | ProcessingItem( 324 | identifier="cql_dns_replace_request_type", 325 | transformation=MapStringTransformation( 326 | { 327 | "A": "1", 328 | "NS": "2", 329 | "CNAME": "5", 330 | "PTR": "12", 331 | "MX": "15", 332 | "TXT": "16", 333 | "AAAA": "28", 334 | "ANY": "255", 335 | } 336 | ), 337 | field_name_conditions=[IncludeFieldCondition(fields=["RequestType"])], 338 | field_name_condition_linking=any, 339 | ), 340 | # Query Results Handling 341 | # We wanna handle Query Results to always be evaluated as contains 342 | # This is because CrowdStrike returns the results in a semicolor seperated string 343 | ProcessingItem( 344 | identifier="cql_dns_wildcard_query_results", 345 | transformation=ReplaceStringTransformation( 346 | regex="(.*)", replacement="*\\1" 347 | ), 348 | field_name_conditions=[ 349 | IncludeFieldCondition(fields="IP4Records"), 350 | IncludeFieldCondition(fields="IP6Records"), 351 | ], 352 | field_name_condition_linking=any, 353 | rule_conditions=[logsource_windows_dns_query()], 354 | rule_condition_linking=any, 355 | ), 356 | # Handle unsupported DNS query fields 357 | generate_unsupported_dns_field_processing_item("ProcessId"), 358 | generate_unsupported_dns_field_processing_item("QueryStatus"), 359 | generate_unsupported_dns_field_processing_item("answer"), 360 | # Image Load Common Processing Items 361 | ProcessingItem( 362 | identifier="cql_imageload_fieldmapping", 363 | transformation=FieldMappingTransformation( 364 | { 365 | "Image": "TargetImageFileName", 366 | "ImageLoaded": "ImageFileName", 367 | "sha256": "SHA256HashData", 368 | "md5": "MD5HashData", 369 | } 370 | ), 371 | rule_conditions=[ 372 | logsource_windows_image_load(), 373 | ], 374 | ), 375 | generate_unsupported_image_load_field_processing_item("OriginalFileName"), 376 | generate_unsupported_image_load_field_processing_item("Description"), 377 | generate_unsupported_image_load_field_processing_item( 378 | "Signed" 379 | ), # partially supported but not consistently 380 | generate_unsupported_image_load_field_processing_item("Imphash"), 381 | generate_unsupported_image_load_field_processing_item("CommandLine"), 382 | # Driver Load Common Processing Items 383 | ProcessingItem( 384 | identifier="cql_driverload_fieldmapping", 385 | transformation=FieldMappingTransformation( 386 | { 387 | "ImageLoaded": "ImageFileName", 388 | "sha256": "SHA256HashData", 389 | "md5": "MD5HashData", 390 | "OriginalFileName": "OriginalFilename", 391 | } 392 | ), 393 | rule_conditions=[ 394 | logsource_windows_driver_load(), 395 | ], 396 | ), 397 | generate_unsupported_driverload_field_processing_item("Hashes"), 398 | generate_unsupported_driverload_field_processing_item("Imphash"), 399 | generate_unsupported_driverload_field_processing_item("Image"), 400 | # PowerShell Scripts Common Processing Items 401 | ProcessingItem( 402 | identifier="cql_powershell_script_fieldmapping", 403 | transformation=FieldMappingTransformation( 404 | { 405 | "Payload": ["CommandHistory", "ScriptContent"], 406 | "ScriptBlockText": ["CommandHistory", "ScriptContent"], 407 | } 408 | ), 409 | rule_conditions=[logsource_windows_ps_script()], 410 | rule_condition_linking=any, 411 | ), 412 | # ContextBaseFileName handling 413 | ProcessingItem( 414 | identifier="cql_contextbasefilename_fail_completepath", 415 | transformation=DetectionItemFailureTransformation( 416 | "Only file name of image is available in CrowdStrike Query Language events." 417 | ), 418 | field_name_conditions=[ 419 | cond_field_contextbasefilename, 420 | ], 421 | detection_item_conditions=[ 422 | MatchStringCondition( 423 | cond="any", 424 | pattern="^\\*\\\\?[^\\\\]+$", 425 | negate=True, 426 | ), 427 | ], 428 | ), 429 | ProcessingItem( 430 | identifier="cql_contextbasefilename_executable_only", 431 | transformation=ReplaceStringTransformation( 432 | regex="^\\*\\\\([^\\\\]+)$", 433 | replacement="\\1", 434 | ), 435 | field_name_conditions=[ 436 | cond_field_contextbasefilename, 437 | ], 438 | ), 439 | # ImageFileName full path handling 440 | ProcessingItem( 441 | identifier="cql_imagefilename_replace_disk_name", 442 | transformation=ReplaceStringTransformation( 443 | regex="[C-Z]:", replacement="\\\\Device\\\\HarddiskVolume?", skip_special=True, interpret_special=True 444 | ), 445 | field_name_conditions=[ 446 | IncludeFieldCondition(fields=["ImageFileName"]), 447 | IncludeFieldCondition(fields=["TargetImageFileName"]), 448 | ], 449 | field_name_condition_linking=any, 450 | ), 451 | ProcessingItem( 452 | identifier="cql_imagefilename_replace_disk_name", 453 | transformation=ReplaceStringTransformation(regex=":", replacement="", skip_special=True), 454 | field_name_conditions=[ 455 | IncludeFieldCondition(fields=["ImageFileName"]), 456 | IncludeFieldCondition(fields=["TargetImageFileName"]), 457 | ], 458 | field_name_condition_linking=any, 459 | ), 460 | ] 461 | 462 | def crowdstrike_fdr_pipeline() -> ProcessingPipeline: 463 | return ProcessingPipeline( 464 | name="Generic Log Sources to CrowdStrike Falcon Data Replicator (FDR) Transformation", 465 | priority=10, 466 | items=[ 467 | # Process Creation 468 | ProcessingItem( 469 | identifier="cs_process_creation_eventtype", 470 | transformation=AddConditionTransformation( 471 | { 472 | "event_simpleName": [ 473 | "ProcessRollup2", 474 | "SyntheticProcessRollup2", 475 | ], 476 | } 477 | ), 478 | rule_conditions=[ 479 | logsource_windows_process_creation(), 480 | ], 481 | ), 482 | # DNS Request 483 | ProcessingItem( 484 | identifier="cql_dns_query_eventtype", 485 | transformation=AddConditionTransformation( 486 | { 487 | "event_simpleName": "DnsRequest", 488 | } 489 | ), 490 | rule_conditions=[logsource_windows_dns_query()], 491 | ), 492 | # Network Connections 493 | ProcessingItem( 494 | identifier="cql_network_connection_eventtype_connect", 495 | transformation=AddConditionTransformation( 496 | {"event_simpleName": "NetworkConnectIP4"} 497 | ), 498 | rule_conditions=[ 499 | logsource_windows_network_connection(), 500 | logsource_windows_network_connection_initiated(True), 501 | ], 502 | ), 503 | ProcessingItem( 504 | identifier="cql_network_connection_eventtype_accept", 505 | transformation=AddConditionTransformation( 506 | { 507 | "event_simpleName": "NetworkReceiveAcceptIP4", 508 | } 509 | ), 510 | rule_conditions=[ 511 | logsource_windows_network_connection(), 512 | logsource_windows_network_connection_initiated(False), 513 | ], 514 | ), 515 | # Driver Load 516 | ProcessingItem( 517 | identifier="cql_driverload_eventtype", 518 | transformation=AddConditionTransformation( 519 | {"event_simpleName": "DriverLoad"} 520 | ), 521 | rule_conditions=[logsource_windows_driver_load()], 522 | ), 523 | # Image Load 524 | ProcessingItem( 525 | identifier="cql_imageload_eventtype", 526 | transformation=AddConditionTransformation( 527 | {"event_simpleName": "ClassifiedModuleLoad"} 528 | ), 529 | rule_conditions=[logsource_windows_image_load()], 530 | rule_condition_linking=any, 531 | ), 532 | # Powershell Scripting 533 | ProcessingItem( 534 | identifier="cql_powershell_script_eventtype", 535 | transformation=AddConditionTransformation( 536 | { 537 | "event_simpleName": [ 538 | "CommandHistory", 539 | "ScriptControlScanTelemetry", 540 | ] 541 | } 542 | ), 543 | rule_conditions=[ 544 | logsource_windows_ps_script(), 545 | ], 546 | ), 547 | ] + common_processing_items(), 548 | ) 549 | 550 | def crowdstrike_falcon_pipeline() -> ProcessingPipeline: 551 | return ProcessingPipeline( 552 | name="CrowdStrike Falcon Pipeline", 553 | priority=10, 554 | items=[ 555 | # Process Creation 556 | ProcessingItem( 557 | identifier="cql_process_creation_eventtype", 558 | transformation=AddConditionTransformation( 559 | {"#event_simpleName": ["ProcessRollup2", "SyntheticProcessRollup2"]} 560 | ), 561 | rule_conditions=[ 562 | logsource_windows_process_creation(), 563 | logsource_linux_process_creation(), 564 | ], 565 | rule_condition_linking=any, 566 | ), 567 | # DNS Request 568 | ProcessingItem( 569 | identifier="cql_dns_query_eventtype", 570 | transformation=AddConditionTransformation( 571 | { 572 | "#event_simpleName": "DnsRequest", 573 | } 574 | ), 575 | rule_conditions=[logsource_windows_dns_query()], 576 | ), 577 | # Network Connections 578 | ProcessingItem( 579 | identifier="cql_network_connection_eventtype_connect", 580 | transformation=AddConditionTransformation( 581 | {"#event_simpleName": "NetworkConnectIP4"} 582 | ), 583 | rule_conditions=[ 584 | logsource_windows_network_connection(), 585 | logsource_windows_network_connection_initiated(True), 586 | ], 587 | ), 588 | ProcessingItem( 589 | identifier="cql_network_connection_eventtype_accept", 590 | transformation=AddConditionTransformation( 591 | { 592 | "#event_simpleName": "NetworkReceiveAcceptIP4", 593 | } 594 | ), 595 | rule_conditions=[ 596 | logsource_windows_network_connection(), 597 | logsource_windows_network_connection_initiated(False), 598 | ], 599 | ), 600 | # Driver Load 601 | ProcessingItem( 602 | identifier="cql_driverload_eventtype", 603 | transformation=AddConditionTransformation( 604 | {"#event_simpleName": "DriverLoad"} 605 | ), 606 | rule_conditions=[logsource_windows_driver_load()], 607 | ), 608 | # Image Load 609 | ProcessingItem( 610 | identifier="cql_imageload_eventtype", 611 | transformation=AddConditionTransformation( 612 | {"#event_simpleName": "ClassifiedModuleLoad"} 613 | ), 614 | rule_conditions=[logsource_windows_image_load()], 615 | rule_condition_linking=any, 616 | ), 617 | # Powershell Scripting 618 | ProcessingItem( 619 | identifier="cql_powershell_script_eventtype", 620 | transformation=AddConditionTransformation( 621 | { 622 | "#event_simpleName": [ 623 | "CommandHistory", 624 | "ScriptControlScanTelemetry", 625 | ] 626 | } 627 | ), 628 | rule_conditions=[ 629 | logsource_windows_ps_script(), 630 | ], 631 | ), 632 | ] + common_processing_items(), 633 | finalizers=[ConcatenateQueriesFinalizer()], 634 | ) 635 | -------------------------------------------------------------------------------- /tests/test_backend_logscale.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | from sigma.collection import SigmaCollection 3 | from sigma.backends.crowdstrike import LogScaleBackend 4 | from sigma.exceptions import SigmaFeatureNotSupportedByBackendError 5 | 6 | 7 | @pytest.fixture 8 | def logscale_backend(): 9 | return LogScaleBackend() 10 | 11 | 12 | def test_crowdstrikelogscale_and_expression(logscale_backend: LogScaleBackend): 13 | assert ( 14 | logscale_backend.convert( 15 | SigmaCollection.from_yaml( 16 | """ 17 | title: Test 18 | status: test 19 | logsource: 20 | category: test_category 21 | product: test_product 22 | detection: 23 | sel: 24 | fieldA: valueA 25 | fieldB: valueB 26 | condition: sel 27 | """ 28 | ) 29 | ) 30 | == ["fieldA=/^valueA$/i fieldB=/^valueB$/i"] 31 | ) 32 | 33 | 34 | def test_crowdstrikelogscale_special_chars(logscale_backend: LogScaleBackend): 35 | assert ( 36 | logscale_backend.convert( 37 | SigmaCollection.from_yaml( 38 | """ 39 | title: Test 40 | status: test 41 | logsource: 42 | category: test_category 43 | product: test_product 44 | detection: 45 | sel: 46 | fieldA: valueA*$^.|?()[]+/{} 47 | condition: sel 48 | """ 49 | ) 50 | ) 51 | == ["fieldA=/^valueA.*\\$\\^\\.\\|.\\(\\)\\[\\]\\+\\/\\{\\}$/i"] 52 | ) 53 | 54 | 55 | def test_crowdstrikelogscale_escaped_wildcards(logscale_backend: LogScaleBackend): 56 | assert ( 57 | logscale_backend.convert( 58 | SigmaCollection.from_yaml( 59 | """ 60 | title: Test 61 | status: test 62 | logsource: 63 | category: test_category 64 | product: test_product 65 | detection: 66 | sel: 67 | fieldA: valueA\\? 68 | fieldB: valueB\\* 69 | condition: sel 70 | """ 71 | ) 72 | ) 73 | == ["fieldA=/^valueA\\?$/i fieldB=/^valueB\\*$/i"] 74 | ) 75 | 76 | 77 | def test_crowdstrikelogscale_and_expression_startswith( 78 | logscale_backend: LogScaleBackend, 79 | ): 80 | assert ( 81 | logscale_backend.convert( 82 | SigmaCollection.from_yaml( 83 | """ 84 | title: Test 85 | status: test 86 | logsource: 87 | category: test_category 88 | product: test_product 89 | detection: 90 | sel: 91 | fieldA|startswith: valueA 92 | fieldB|endswith: valueB 93 | fieldC|contains: valueC 94 | fieldD: valueD 95 | condition: sel 96 | """ 97 | ) 98 | ) 99 | == ["fieldA=/^valueA/i fieldB=/valueB$/i fieldC=/valueC/i fieldD=/^valueD$/i"] 100 | ) 101 | 102 | 103 | def test_crowdstrikelogscale_or_expression(logscale_backend: LogScaleBackend): 104 | assert ( 105 | logscale_backend.convert( 106 | SigmaCollection.from_yaml( 107 | """ 108 | title: Test 109 | status: test 110 | logsource: 111 | category: test_category 112 | product: test_product 113 | detection: 114 | sel1: 115 | fieldA: valueA 116 | sel2: 117 | fieldB: valueB 118 | condition: 1 of sel* 119 | """ 120 | ) 121 | ) 122 | == ["fieldA=/^valueA$/i or fieldB=/^valueB$/i"] 123 | ) 124 | 125 | 126 | def test_crowdstrikelogscale_and_or_expression(logscale_backend: LogScaleBackend): 127 | assert ( 128 | logscale_backend.convert( 129 | SigmaCollection.from_yaml( 130 | """ 131 | title: Test 132 | status: test 133 | logsource: 134 | category: test_category 135 | product: test_product 136 | detection: 137 | sel: 138 | fieldA: 139 | - valueA1 140 | - valueA2 141 | fieldB: 142 | - valueB1 143 | - valueB2 144 | condition: sel 145 | """ 146 | ) 147 | ) 148 | == [ 149 | "fieldA=/^valueA1$/i or fieldA=/^valueA2$/i fieldB=/^valueB1$/i or fieldB=/^valueB2$/i" 150 | ] 151 | ) 152 | 153 | 154 | def test_crowdstrikelogscale_or_and_expression(logscale_backend: LogScaleBackend): 155 | assert ( 156 | logscale_backend.convert( 157 | SigmaCollection.from_yaml( 158 | """ 159 | title: Test 160 | status: test 161 | logsource: 162 | category: test_category 163 | product: test_product 164 | detection: 165 | sel1: 166 | fieldA: valueA1 167 | fieldB: valueB1 168 | sel2: 169 | fieldA: valueA2 170 | fieldB: valueB2 171 | condition: 1 of sel* 172 | """ 173 | ) 174 | ) 175 | == [ 176 | "(fieldA=/^valueA1$/i fieldB=/^valueB1$/i) or (fieldA=/^valueA2$/i fieldB=/^valueB2$/i)" 177 | ] 178 | ) 179 | 180 | 181 | def test_crowdstrikelogscale_or_and_expression_with_dots( 182 | logscale_backend: LogScaleBackend, 183 | ): 184 | assert ( 185 | logscale_backend.convert( 186 | SigmaCollection.from_yaml( 187 | """ 188 | title: Test 189 | status: test 190 | logsource: 191 | category: test_category 192 | product: test_product 193 | detection: 194 | sel1: 195 | fieldA: valueA1.exe 196 | fieldB: valueB1.exe 197 | sel2: 198 | fieldA: valueA2.exe 199 | fieldB: valueB2.exe 200 | condition: 1 of sel* 201 | """ 202 | ) 203 | ) 204 | == [ 205 | "(fieldA=/^valueA1\\.exe$/i fieldB=/^valueB1\\.exe$/i) or (fieldA=/^valueA2\\.exe$/i fieldB=/^valueB2\\.exe$/i)" 206 | ] 207 | ) 208 | 209 | 210 | def test_crowdstrikelogscale_and_wildcard(logscale_backend: LogScaleBackend): 211 | assert ( 212 | logscale_backend.convert( 213 | SigmaCollection.from_yaml( 214 | """ 215 | title: Test 216 | status: test 217 | logsource: 218 | category: test_category 219 | product: test_product 220 | detection: 221 | sel: 222 | fieldA: 223 | - value*A 224 | - valueB 225 | - valueC* 226 | condition: sel 227 | """ 228 | ) 229 | ) 230 | == ["fieldA=/^value.*A$/i or fieldA=/^valueB$/i or fieldA=/^valueC/i"] 231 | ) 232 | 233 | 234 | def test_crowdstrikelogscale_expression_with_dots(logscale_backend: LogScaleBackend): 235 | assert ( 236 | logscale_backend.convert( 237 | SigmaCollection.from_yaml( 238 | """ 239 | title: Test 240 | status: test 241 | logsource: 242 | category: test_category 243 | product: test_product 244 | detection: 245 | sel: 246 | fieldA: 247 | - valueA.exe 248 | - valueB.exe 249 | - valueC*.exe 250 | condition: sel 251 | """ 252 | ) 253 | ) 254 | == [ 255 | "fieldA=/^valueA\\.exe$/i or fieldA=/^valueB\\.exe$/i or fieldA=/^valueC.*\\.exe$/i" 256 | ] 257 | ) 258 | 259 | 260 | def test_crowdstrikelogscale_expression_with_or(logscale_backend: LogScaleBackend): 261 | assert ( 262 | logscale_backend.convert( 263 | SigmaCollection.from_yaml( 264 | """ 265 | title: Test 266 | status: test 267 | logsource: 268 | category: test_category 269 | product: test_product 270 | detection: 271 | sel1: 272 | fieldA: 273 | - valueA1 274 | - valueA2 275 | sel2: 276 | fieldB: 277 | - valueB1 278 | - valueB2 279 | condition: 1 of sel* 280 | """ 281 | ) 282 | ) 283 | == [ 284 | "fieldA=/^valueA1$/i or fieldA=/^valueA2$/i or fieldB=/^valueB1$/i or fieldB=/^valueB2$/i" 285 | ] 286 | ) 287 | 288 | 289 | def test_crowdstrikelogscale_regex_query(logscale_backend: LogScaleBackend): 290 | assert ( 291 | logscale_backend.convert( 292 | SigmaCollection.from_yaml( 293 | """ 294 | title: Test 295 | status: test 296 | logsource: 297 | category: test_category 298 | product: test_product 299 | detection: 300 | sel: 301 | fieldA|re: foo.*bar 302 | fieldB: foo 303 | condition: sel 304 | """ 305 | ) 306 | ) 307 | == ["fieldA=/foo.*bar/ fieldB=/^foo$/i"] 308 | ) 309 | 310 | 311 | def test_crowdstrikelogscale_regex_query_special_characters( 312 | logscale_backend: LogScaleBackend, 313 | ): 314 | assert ( 315 | logscale_backend.convert( 316 | SigmaCollection.from_yaml( 317 | """ 318 | title: Test 319 | status: test 320 | logsource: 321 | category: test_category 322 | product: test_product 323 | detection: 324 | sel: 325 | fieldA|re: foo.*bar\\d 326 | fieldB: foo 327 | condition: sel 328 | """ 329 | ) 330 | ) 331 | == ["fieldA=/foo.*bar\\d/ fieldB=/^foo$/i"] 332 | ) 333 | 334 | 335 | def test_crowdstrikelogscale_cidr_or(logscale_backend: LogScaleBackend): 336 | with pytest.raises(SigmaFeatureNotSupportedByBackendError, match="ORing"): 337 | logscale_backend.convert( 338 | SigmaCollection.from_yaml( 339 | """ 340 | title: Test 341 | status: test 342 | logsource: 343 | category: test_category 344 | product: test_product 345 | detection: 346 | sel: 347 | fieldA|cidr: 348 | - 192.168.0.0/16 349 | - 10.0.0.0/8 350 | fieldB: foo 351 | fieldC: bar 352 | condition: sel 353 | """ 354 | ) 355 | ) 356 | 357 | 358 | def test_crowdstrikelogscale_cidr_query(logscale_backend: LogScaleBackend): 359 | assert ( 360 | logscale_backend.convert( 361 | SigmaCollection.from_yaml( 362 | """ 363 | title: Test 364 | status: test 365 | logsource: 366 | category: test_category 367 | product: test_product 368 | detection: 369 | sel: 370 | fieldA|cidr: 192.168.0.0/16 371 | condition: sel 372 | """ 373 | ) 374 | ) 375 | == ["| cidr(fieldA, subnet=192.168.0.0/16)"] 376 | ) 377 | 378 | 379 | def test_crowdstrikelogscale_field_name_with_whitespace( 380 | logscale_backend: LogScaleBackend, 381 | ): 382 | assert ( 383 | logscale_backend.convert( 384 | SigmaCollection.from_yaml( 385 | """ 386 | title: Test 387 | status: test 388 | logsource: 389 | category: test_category 390 | product: test_product 391 | detection: 392 | sel: 393 | field name: value 394 | condition: sel 395 | """ 396 | ) 397 | ) 398 | == ['"field name"=/^value$/i'] 399 | ) 400 | -------------------------------------------------------------------------------- /tests/test_processing_pipelines.py: -------------------------------------------------------------------------------- 1 | from sigma.collection import SigmaCollection 2 | from sigma.exceptions import SigmaTransformationError 3 | from sigma.backends.test import TextQueryTestBackend 4 | from sigma.processing.resolver import ProcessingPipelineResolver 5 | from sigma.processing.pipeline import ProcessingPipeline, ProcessingItem 6 | from sigma.processing.transformations import ValueListPlaceholderTransformation 7 | from sigma.pipelines.crowdstrike import ( 8 | crowdstrike_fdr_pipeline, 9 | crowdstrike_falcon_pipeline, 10 | ) 11 | from sigma.backends.crowdstrike import LogScaleBackend 12 | import pytest 13 | 14 | unsupported_process_creation_fields = [ 15 | "CurrentDirectory", 16 | "imphash", 17 | "md5", 18 | "sha1", 19 | "ParentCommandLine", 20 | "FileVersion", 21 | "Description", 22 | "Product", 23 | "Company", 24 | "LogonGuid", 25 | "ParentProcessGuid", 26 | "ParentProcessId", 27 | ] 28 | 29 | 30 | @pytest.fixture 31 | def resolver(): 32 | return ProcessingPipelineResolver( 33 | { 34 | "crowdstrike_fdr": crowdstrike_fdr_pipeline, 35 | "crowdstrike_falcon": crowdstrike_falcon_pipeline, 36 | } 37 | ) 38 | 39 | 40 | @pytest.fixture 41 | def process_creation_sigma_rule(): 42 | return SigmaCollection.from_yaml( 43 | """ 44 | title: Process Creation Test 45 | status: test 46 | logsource: 47 | category: process_creation 48 | product: windows 49 | detection: 50 | sel: 51 | CommandLine: "test.exe foo bar" 52 | Image: "*\\\\test.exe" 53 | condition: sel 54 | """ 55 | ) 56 | 57 | 58 | @pytest.fixture 59 | def process_creation_sigma_rule_all_fields(): 60 | return SigmaCollection.from_yaml( 61 | """ 62 | title: Test 63 | status: test 64 | logsource: 65 | category: process_creation 66 | product: windows 67 | detection: 68 | sel: 69 | Image: test 70 | User: test 71 | Image: test 72 | ProcessId: test 73 | sha256: test 74 | Computer: test 75 | condition: sel 76 | """ 77 | ) 78 | 79 | 80 | @pytest.fixture 81 | def process_creation_sigma_rule_all_fields_nix(): 82 | return SigmaCollection.from_yaml( 83 | """ 84 | title: Test 85 | status: test 86 | logsource: 87 | category: process_creation 88 | product: linux 89 | detection: 90 | sel: 91 | Image: test 92 | User: test 93 | Image: test 94 | ProcessId: test 95 | sha256: test 96 | Computer: test 97 | condition: sel 98 | """ 99 | ) 100 | 101 | 102 | @pytest.fixture 103 | def process_creation_sigma_rule_parentimage(): 104 | return SigmaCollection.from_yaml( 105 | """ 106 | title: Process Creation Test 107 | status: test 108 | logsource: 109 | category: process_creation 110 | product: windows 111 | detection: 112 | sel: 113 | CommandLine: "test.exe foo bar" 114 | ParentImage: "*\\\\parent.exe" 115 | condition: sel 116 | """ 117 | ) 118 | 119 | 120 | @pytest.fixture 121 | def process_creation_sigma_rule_integrity_level(): 122 | return SigmaCollection.from_yaml( 123 | """ 124 | title: Integrity Level Test 125 | status: test 126 | logsource: 127 | category: process_creation 128 | product: windows 129 | detection: 130 | sel: 131 | IntegrityLevel: System 132 | 133 | condition: sel 134 | """ 135 | ) 136 | 137 | 138 | @pytest.fixture 139 | def process_creation_sigma_rule_unknown_integrity_level(): 140 | return SigmaCollection.from_yaml( 141 | """ 142 | title: Integrity Level Test 143 | status: test 144 | logsource: 145 | category: process_creation 146 | product: windows 147 | detection: 148 | sel: 149 | IntegrityLevel: NonExistant 150 | condition: sel 151 | """ 152 | ) 153 | 154 | 155 | @pytest.fixture 156 | def process_creation_sigma_rule_parentimage_without_slash(): 157 | return SigmaCollection.from_yaml( 158 | """ 159 | title: Process Creation Test 160 | status: test 161 | logsource: 162 | category: process_creation 163 | product: windows 164 | detection: 165 | sel: 166 | CommandLine: "test.exe foo bar" 167 | ParentImage: "*parent.exe" 168 | condition: sel 169 | """ 170 | ) 171 | 172 | 173 | @pytest.fixture 174 | def process_creation_sigma_rule_parentimage_path(): 175 | return SigmaCollection.from_yaml( 176 | """ 177 | title: Process Creation Test 178 | status: test 179 | logsource: 180 | category: process_creation 181 | product: windows 182 | detection: 183 | sel: 184 | CommandLine: "test.exe foo bar" 185 | ParentImage: "*\\\\Windows\\\\System32\\\\parent.exe" 186 | condition: sel 187 | """ 188 | ) 189 | 190 | 191 | @pytest.fixture 192 | def process_creation_sigma_rule_fullimage_path(): 193 | return SigmaCollection.from_yaml( 194 | """ 195 | title: Process Creation Test 196 | status: test 197 | logsource: 198 | category: process_creation 199 | product: windows 200 | detection: 201 | sel: 202 | CommandLine: "test.exe foo bar" 203 | Image: "C:\\\\Windows\\\\System32\\\\cmd.exe" 204 | condition: sel 205 | """ 206 | ) 207 | 208 | 209 | @pytest.fixture 210 | def process_creation_sigma_rule_disk_name_colon(): 211 | return SigmaCollection.from_yaml( 212 | """ 213 | title: Process Creation Test 214 | status: test 215 | logsource: 216 | category: process_creation 217 | product: windows 218 | detection: 219 | sel: 220 | CommandLine: "test.exe foo bar" 221 | Image|endswith: ":\\\\Windows\\\\System32\\\\cmd.exe" 222 | condition: sel 223 | """ 224 | ) 225 | 226 | @pytest.fixture 227 | def process_creation_sigma_rule_disk_name_contains(): 228 | return SigmaCollection.from_yaml( 229 | """ 230 | title: Process Creation Test 231 | status: test 232 | logsource: 233 | category: process_creation 234 | product: windows 235 | detection: 236 | sel: 237 | CommandLine: "test.exe foo bar" 238 | Image|contains: "C:\\\\Windows\\\\System32\\\\cmd.exe" 239 | condition: sel 240 | """ 241 | ) 242 | 243 | @pytest.fixture 244 | def process_creation_sigma_rule_disk_name_startswith(): 245 | return SigmaCollection.from_yaml( 246 | """ 247 | title: Process Creation Test 248 | status: test 249 | logsource: 250 | category: process_creation 251 | product: windows 252 | detection: 253 | sel: 254 | CommandLine: "test.exe foo bar" 255 | Image|startswith: "C:\\\\Windows\\\\System32\\\\cmd.exe" 256 | condition: sel 257 | """ 258 | ) 259 | 260 | @pytest.fixture 261 | def process_creation_sigma_rule_disk_name_endswith(): 262 | return SigmaCollection.from_yaml( 263 | """ 264 | title: Process Creation Test 265 | status: test 266 | logsource: 267 | category: process_creation 268 | product: windows 269 | detection: 270 | sel: 271 | CommandLine: "test.exe foo bar" 272 | Image|endswith: "C:\\\\Windows\\\\System32\\\\cmd.exe" 273 | condition: sel 274 | """ 275 | ) 276 | 277 | @pytest.fixture 278 | def process_creation_sigma_rule_unsupported_field(field): 279 | return SigmaCollection.from_yaml( 280 | f""" 281 | title: Test 282 | status: test 283 | logsource: 284 | category: process_creation 285 | product: windows 286 | detection: 287 | sel: 288 | {field}: test 289 | condition: sel 290 | """ 291 | ) 292 | 293 | 294 | @pytest.fixture 295 | def network_connection_sigma_rule(): 296 | return SigmaCollection.from_yaml( 297 | """ 298 | title: Network Connection Test 299 | status: test 300 | logsource: 301 | category: network_connection 302 | product: windows 303 | detection: 304 | sel: 305 | Initiated: "true" 306 | DestinationIp: "1.2.3.4" 307 | condition: sel 308 | """ 309 | ) 310 | 311 | 312 | @pytest.fixture 313 | def incoming_network_connection_sigma_rule(): 314 | return SigmaCollection.from_yaml( 315 | """ 316 | title: Incoming Network Connection Test 317 | status: test 318 | logsource: 319 | category: network_connection 320 | product: windows 321 | detection: 322 | sel: 323 | Initiated: "false" 324 | DestinationIp: "1.2.3.4" 325 | condition: sel 326 | """ 327 | ) 328 | 329 | 330 | @pytest.fixture 331 | def dns_query_sigma_rule(): 332 | return SigmaCollection.from_yaml( 333 | """ 334 | title: DNS Query Test 335 | status: test 336 | logsource: 337 | category: dns_query 338 | product: windows 339 | detection: 340 | sel: 341 | QueryName: test.invalid 342 | record_type: 343 | - A 344 | - NS 345 | - CNAME 346 | - PTR 347 | - MX 348 | - TXT 349 | - AAAA 350 | - ANY 351 | QueryResults : 1.1.1.1 352 | Image: "*\\\\parent.exe" 353 | condition: sel 354 | """ 355 | ) 356 | 357 | 358 | @pytest.fixture 359 | def dns_query_sigma_rule_invalid_request(): 360 | return SigmaCollection.from_yaml( 361 | """ 362 | title: DNS Query Test 363 | status: test 364 | logsource: 365 | category: dns_query 366 | product: windows 367 | detection: 368 | sel: 369 | QueryName: test.invalid 370 | record_type: NonValid 371 | QueryResults : 1.1.1.1 372 | condition: sel 373 | """ 374 | ) 375 | 376 | 377 | @pytest.fixture 378 | def dns_query_sigma_rule_full_image_path(): 379 | return SigmaCollection.from_yaml( 380 | """ 381 | title: DNS Query Test 382 | status: test 383 | logsource: 384 | category: dns_query 385 | product: windows 386 | detection: 387 | sel: 388 | QueryName: test.invalid 389 | record_type: A 390 | Image: "*\\\\Windows\\\\System32\\\\parent.exe" 391 | condition: sel 392 | """ 393 | ) 394 | 395 | 396 | @pytest.fixture 397 | def driver_load_sigma_rule_simple(): 398 | return SigmaCollection.from_yaml( 399 | """ 400 | title: Driver Load Test 401 | status: test 402 | logsource: 403 | category: driver_load 404 | product: windows 405 | detection: 406 | sel: 407 | ImageLoaded: imageloaded.exe 408 | sha256: test 409 | md5: test 410 | condition: sel 411 | """ 412 | ) 413 | 414 | 415 | @pytest.fixture 416 | def driver_load_sigma_rule_driver_load_full_path(): 417 | return SigmaCollection.from_yaml( 418 | """ 419 | title: Driver Load Test 420 | status: test 421 | logsource: 422 | category: driver_load 423 | product: windows 424 | detection: 425 | sel: 426 | ImageLoaded: C:\\Windows\\test.sys 427 | sha256: test 428 | md5: test 429 | condition: sel 430 | """ 431 | ) 432 | 433 | 434 | @pytest.fixture 435 | def image_load_sigma_rule(): 436 | return SigmaCollection.from_yaml( 437 | """ 438 | title: Image Load Test 439 | status: test 440 | logsource: 441 | category: image_load 442 | product: windows 443 | detection: 444 | sel: 445 | ImageLoaded: C:\\Windows\\test.sys 446 | Image: C:\\Windows\\test.exe 447 | sha256: test 448 | md5: test 449 | condition: sel 450 | """ 451 | ) 452 | 453 | 454 | @pytest.fixture 455 | def ps_script_sigma_rule(): 456 | return SigmaCollection.from_yaml( 457 | """ 458 | title: Image Load Test 459 | status: test 460 | logsource: 461 | category: ps_script 462 | product: windows 463 | detection: 464 | sel: 465 | ScriptBlockText|contains: 'test' 466 | condition: sel 467 | """ 468 | ) 469 | 470 | 471 | def convert_falcon(rule: SigmaCollection, resolver): 472 | pipeline = resolver.resolve_pipeline("crowdstrike_falcon") 473 | backend = LogScaleBackend(pipeline) 474 | return backend.convert(rule) 475 | 476 | 477 | ### FALCON TESTS ### 478 | def test_crowdstrike_falcon_pipeline_process_creation( 479 | resolver: ProcessingPipelineResolver, process_creation_sigma_rule 480 | ): 481 | assert ( 482 | convert_falcon(process_creation_sigma_rule, resolver) 483 | == "event_platform=/^Win$/i #event_simpleName=/^ProcessRollup2$/i or #event_simpleName=/^SyntheticProcessRollup2$/i CommandLine=/^test\\.exe foo bar$/i ImageFileName=/\\\\test\\.exe$/i" 484 | ) 485 | 486 | def test_crowdstrike_falcon_image_with_placeholder(resolver : ProcessingPipelineResolver): 487 | sigma_rule = SigmaCollection.from_yaml(""" 488 | title: Image with Placeholder Test 489 | status: test 490 | logsource: 491 | category: process_creation 492 | product: windows 493 | detection: 494 | sel: 495 | Image|expand: "%var%" 496 | condition: sel 497 | """) 498 | pipeline = resolver.resolve_pipeline("crowdstrike_falcon") + ProcessingPipeline( 499 | items=[ 500 | ProcessingItem(transformation=ValueListPlaceholderTransformation()) 501 | ], 502 | vars={"var": ["foo.exe", "bar.exe", "test.exe"]}, 503 | ) 504 | backend = LogScaleBackend(pipeline) 505 | assert backend.convert(sigma_rule) == "event_platform=/^Win$/i #event_simpleName=/^ProcessRollup2$/i or #event_simpleName=/^SyntheticProcessRollup2$/i ImageFileName=/^foo\\.exe$/i or ImageFileName=/^bar\\.exe$/i or ImageFileName=/^test\\.exe$/i" 506 | 507 | def test_crowdstrike_falcon_image_contains_with_trailing_backslash(resolver : ProcessingPipelineResolver): 508 | sigma_rule = SigmaCollection.from_yaml(""" 509 | title: Image with Placeholder Test 510 | status: test 511 | logsource: 512 | category: process_creation 513 | product: windows 514 | detection: 515 | sel: 516 | Image|contains: ":\\\\Windows\\\\System32\\\\" 517 | condition: sel 518 | """) 519 | pipeline = resolver.resolve_pipeline("crowdstrike_falcon") 520 | backend = LogScaleBackend(pipeline) 521 | assert "ImageFileName=/\\\\Windows\\\\System32\\\\/i" in backend.convert(sigma_rule) 522 | 523 | 524 | def test_crowdstrike_falcon_pipeline_parentimage( 525 | resolver: ProcessingPipelineResolver, process_creation_sigma_rule_parentimage 526 | ): 527 | assert ( 528 | convert_falcon(process_creation_sigma_rule_parentimage, resolver) 529 | == "event_platform=/^Win$/i #event_simpleName=/^ProcessRollup2$/i or #event_simpleName=/^SyntheticProcessRollup2$/i CommandLine=/^test\\.exe foo bar$/i ParentBaseFileName=/^parent\\.exe$/i" 530 | ) 531 | 532 | 533 | def test_crowdstrike_falcon_pipeline_process_creation_all_fields( 534 | resolver: ProcessingPipelineResolver, process_creation_sigma_rule_all_fields 535 | ): 536 | assert ( 537 | convert_falcon(process_creation_sigma_rule_all_fields, resolver) 538 | == "event_platform=/^Win$/i #event_simpleName=/^ProcessRollup2$/i or #event_simpleName=/^SyntheticProcessRollup2$/i ImageFileName=/^test$/i UserName=/^test$/i RawProcessId=/^test$/i SHA256HashData=/^test$/i ComputerName=/^test$/i" 539 | ) 540 | 541 | 542 | def test_crowdstrike_falcon_pipeline_process_creation_all_fields_nix( 543 | resolver: ProcessingPipelineResolver, process_creation_sigma_rule_all_fields_nix 544 | ): 545 | assert ( 546 | convert_falcon(process_creation_sigma_rule_all_fields_nix, resolver) 547 | == "event_platform=/^Lin$/i #event_simpleName=/^ProcessRollup2$/i or #event_simpleName=/^SyntheticProcessRollup2$/i ImageFileName=/^test$/i UserName=/^test$/i RawProcessId=/^test$/i SHA256HashData=/^test$/i ComputerName=/^test$/i" 548 | ) 549 | 550 | 551 | def test_crowdstrike_falcon_pipeline_integrity_level( 552 | resolver: ProcessingPipelineResolver, process_creation_sigma_rule_integrity_level 553 | ): 554 | assert ( 555 | convert_falcon(process_creation_sigma_rule_integrity_level, resolver) 556 | == "event_platform=/^Win$/i #event_simpleName=/^ProcessRollup2$/i or #event_simpleName=/^SyntheticProcessRollup2$/i IntegrityLevel=/^16384$/i" 557 | ) 558 | 559 | 560 | def test_crowdstrike_falcon_pipeline_unknown_integrity_level( 561 | resolver: ProcessingPipelineResolver, 562 | process_creation_sigma_rule_unknown_integrity_level, 563 | ): 564 | with pytest.raises( 565 | SigmaTransformationError, 566 | match="Integrity Level needs to be one of Protected,System,High,Medium_Plus,Medium,Low,Untrusted", 567 | ): 568 | convert_falcon(process_creation_sigma_rule_unknown_integrity_level, resolver) 569 | 570 | 571 | def test_crowdstrike_falcon_pipeline_parentimage_path( 572 | resolver: ProcessingPipelineResolver, process_creation_sigma_rule_parentimage_path 573 | ): 574 | with pytest.raises( 575 | SigmaTransformationError, 576 | match="Only file name of parent image is available in CrowdStrike Query Language events.", 577 | ): 578 | convert_falcon(process_creation_sigma_rule_parentimage_path, resolver) 579 | 580 | 581 | def test_crowdstrike_falcon_pipeline_replace_disk_name( 582 | resolver: ProcessingPipelineResolver, process_creation_sigma_rule_fullimage_path 583 | ): 584 | assert ( 585 | convert_falcon(process_creation_sigma_rule_fullimage_path, resolver) 586 | == "event_platform=/^Win$/i #event_simpleName=/^ProcessRollup2$/i or #event_simpleName=/^SyntheticProcessRollup2$/i CommandLine=/^test\\.exe foo bar$/i ImageFileName=/^\\\\Device\\\\HarddiskVolume.\\\\Windows\\\\System32\\\\cmd\\.exe$/i" 587 | ) 588 | 589 | 590 | def test_crowdstrike_falcon_pipeline_replace_disk_name_colon( 591 | resolver: ProcessingPipelineResolver, process_creation_sigma_rule_disk_name_colon 592 | ): 593 | assert ( 594 | convert_falcon(process_creation_sigma_rule_disk_name_colon, resolver) 595 | == "event_platform=/^Win$/i #event_simpleName=/^ProcessRollup2$/i or #event_simpleName=/^SyntheticProcessRollup2$/i CommandLine=/^test\\.exe foo bar$/i ImageFileName=/\\\\Windows\\\\System32\\\\cmd\\.exe$/i" 596 | ) 597 | 598 | def test_crowdstrike_falcon_pipeline_replace_disk_name_contains( 599 | resolver: ProcessingPipelineResolver, process_creation_sigma_rule_disk_name_contains 600 | ): 601 | assert ( 602 | convert_falcon(process_creation_sigma_rule_disk_name_contains, resolver) 603 | == "event_platform=/^Win$/i #event_simpleName=/^ProcessRollup2$/i or #event_simpleName=/^SyntheticProcessRollup2$/i CommandLine=/^test\\.exe foo bar$/i ImageFileName=/\\\\Device\\\\HarddiskVolume.\\\\Windows\\\\System32\\\\cmd\\.exe/i" 604 | ) 605 | 606 | def test_crowdstrike_falcon_pipeline_replace_disk_name_startswith( 607 | resolver: ProcessingPipelineResolver, process_creation_sigma_rule_disk_name_startswith 608 | ): 609 | assert ( 610 | convert_falcon(process_creation_sigma_rule_disk_name_startswith, resolver) 611 | == "event_platform=/^Win$/i #event_simpleName=/^ProcessRollup2$/i or #event_simpleName=/^SyntheticProcessRollup2$/i CommandLine=/^test\\.exe foo bar$/i ImageFileName=/^\\\\Device\\\\HarddiskVolume.\\\\Windows\\\\System32\\\\cmd\\.exe/i" 612 | ) 613 | 614 | def test_crowdstrike_falcon_pipeline_replace_disk_name_endswith( 615 | resolver: ProcessingPipelineResolver, process_creation_sigma_rule_disk_name_endswith 616 | ): 617 | assert ( 618 | convert_falcon(process_creation_sigma_rule_disk_name_endswith, resolver) 619 | == "event_platform=/^Win$/i #event_simpleName=/^ProcessRollup2$/i or #event_simpleName=/^SyntheticProcessRollup2$/i CommandLine=/^test\\.exe foo bar$/i ImageFileName=/\\\\Device\\\\HarddiskVolume.\\\\Windows\\\\System32\\\\cmd\\.exe$/i" 620 | ) 621 | 622 | @pytest.mark.parametrize("field", unsupported_process_creation_fields) 623 | def test_crowdstrike_falcon_pipeline_unsupported_field( 624 | resolver: ProcessingPipelineResolver, process_creation_sigma_rule_unsupported_field 625 | ): 626 | with pytest.raises( 627 | SigmaTransformationError, 628 | match="Crowdstrike Query Language does not support the", 629 | ): 630 | convert_falcon(process_creation_sigma_rule_unsupported_field, resolver) 631 | 632 | 633 | def test_crowdstrike_falcon_pipeline_network_connect( 634 | resolver: ProcessingPipelineResolver, network_connection_sigma_rule 635 | ): 636 | assert ( 637 | convert_falcon(network_connection_sigma_rule, resolver) 638 | == "#event_simpleName=/^NetworkConnectIP4$/i RemoteAddressIP4=/^1\\.2\\.3\\.4$/i" 639 | ) 640 | 641 | 642 | def test_crowdstrike_falcon_pipeline_network_incoming_connect( 643 | resolver: ProcessingPipelineResolver, incoming_network_connection_sigma_rule 644 | ): 645 | assert ( 646 | convert_falcon(incoming_network_connection_sigma_rule, resolver) 647 | == "#event_simpleName=/^NetworkReceiveAcceptIP4$/i RemoteAddressIP4=/^1\\.2\\.3\\.4$/i" 648 | ) 649 | 650 | 651 | def test_crowdstrike_falcon_pipeline_network_incoming_connect( 652 | resolver: ProcessingPipelineResolver, incoming_network_connection_sigma_rule 653 | ): 654 | assert ( 655 | convert_falcon(incoming_network_connection_sigma_rule, resolver) 656 | == "#event_simpleName=/^NetworkReceiveAcceptIP4$/i RemoteAddressIP4=/^1\\.2\\.3\\.4$/i" 657 | ) 658 | 659 | 660 | def test_crowdstrike_falcon_dns_query( 661 | resolver: ProcessingPipelineResolver, dns_query_sigma_rule 662 | ): 663 | assert ( 664 | convert_falcon(dns_query_sigma_rule, resolver) 665 | == "event_platform=/^Win$/i #event_simpleName=/^DnsRequest$/i DomainName=/^test\\.invalid$/i RequestType=/^1$/i or RequestType=/^2$/i or RequestType=/^5$/i or RequestType=/^12$/i or RequestType=/^15$/i or RequestType=/^16$/i or RequestType=/^28$/i or RequestType=/^255$/i IP4Records=/1\\.1\\.1\\.1/i or IP6Records=/1\\.1\\.1\\.1/i ContextBaseFileName=/^parent\\.exe$/i" 666 | ) 667 | 668 | 669 | def test_crowdstrike_falcon_dns_invalid_request_type( 670 | resolver: ProcessingPipelineResolver, dns_query_sigma_rule_invalid_request 671 | ): 672 | with pytest.raises( 673 | SigmaTransformationError, 674 | match="record_type needs to be one of A,NS,CNAME,PTR,MX,TXT,AAAA,ANY", 675 | ): 676 | convert_falcon(dns_query_sigma_rule_invalid_request, resolver) 677 | 678 | 679 | def test_crowdstrike_falcon_dns_invalid_request_type( 680 | resolver: ProcessingPipelineResolver, dns_query_sigma_rule_full_image_path 681 | ): 682 | with pytest.raises(SigmaTransformationError, match="file name of image"): 683 | convert_falcon(dns_query_sigma_rule_full_image_path, resolver) 684 | 685 | 686 | def test_crowdstrike_falcon_pipeline_driver_load_simple( 687 | resolver: ProcessingPipelineResolver, driver_load_sigma_rule_simple 688 | ): 689 | assert ( 690 | convert_falcon(driver_load_sigma_rule_simple, resolver) 691 | == "event_platform=/^Win$/i #event_simpleName=/^DriverLoad$/i ImageFileName=/^imageloaded\\.exe$/i SHA256HashData=/^test$/i MD5HashData=/^test$/i" 692 | ) 693 | 694 | 695 | def test_crowdstrike_falcon_pipeline_driver_load_full_path( 696 | resolver: ProcessingPipelineResolver, driver_load_sigma_rule_driver_load_full_path 697 | ): 698 | assert ( 699 | convert_falcon(driver_load_sigma_rule_driver_load_full_path, resolver) 700 | == "event_platform=/^Win$/i #event_simpleName=/^DriverLoad$/i ImageFileName=/^\\\\Device\\\\HarddiskVolume.\\\\Windows\\\\test\\.sys$/i SHA256HashData=/^test$/i MD5HashData=/^test$/i" 701 | ) 702 | 703 | 704 | def test_crowdstrike_falcon_pipeline_driver_load_image_full_path( 705 | resolver: ProcessingPipelineResolver, driver_load_sigma_rule_driver_load_full_path 706 | ): 707 | assert ( 708 | convert_falcon(driver_load_sigma_rule_driver_load_full_path, resolver) 709 | == "event_platform=/^Win$/i #event_simpleName=/^DriverLoad$/i ImageFileName=/^\\\\Device\\\\HarddiskVolume.\\\\Windows\\\\test\\.sys$/i SHA256HashData=/^test$/i MD5HashData=/^test$/i" 710 | ) 711 | 712 | 713 | def test_crowdstrike_falcon_pipeline_image_load_full_path( 714 | resolver: ProcessingPipelineResolver, image_load_sigma_rule 715 | ): 716 | assert ( 717 | convert_falcon(image_load_sigma_rule, resolver) 718 | == "event_platform=/^Win$/i #event_simpleName=/^ClassifiedModuleLoad$/i ImageFileName=/^\\\\Device\\\\HarddiskVolume.\\\\Windows\\\\test\\.sys$/i TargetImageFileName=/^\\\\Device\\\\HarddiskVolume.\\\\Windows\\\\test\\.exe$/i SHA256HashData=/^test$/i MD5HashData=/^test$/i" 719 | ) 720 | 721 | 722 | def test_crowdstrike_falcon_pipeline_ps_script( 723 | resolver: ProcessingPipelineResolver, ps_script_sigma_rule 724 | ): 725 | assert ( 726 | convert_falcon(ps_script_sigma_rule, resolver) 727 | == "event_platform=/^Win$/i #event_simpleName=/^CommandHistory$/i or #event_simpleName=/^ScriptControlScanTelemetry$/i CommandHistory=/test/i or ScriptContent=/test/i" 728 | ) 729 | 730 | 731 | ### FDR TESTS ### 732 | def test_crowdstrike_fdr_pipeline_parentimage( 733 | resolver: ProcessingPipelineResolver, process_creation_sigma_rule_parentimage 734 | ): 735 | pipeline = resolver.resolve_pipeline("crowdstrike_fdr") 736 | backend = TextQueryTestBackend(pipeline) 737 | assert ( 738 | backend.convert(process_creation_sigma_rule_parentimage) 739 | == 'event_platform="Win" and (event_simpleName in ("ProcessRollup2", "SyntheticProcessRollup2")) and CommandLine="test.exe foo bar" and ParentBaseFileName="parent.exe"' 740 | ) 741 | 742 | 743 | def test_crowdstrike_fdr_pipeline_process_creation( 744 | resolver: ProcessingPipelineResolver, process_creation_sigma_rule 745 | ): 746 | pipeline = resolver.resolve_pipeline("crowdstrike_fdr") 747 | backend = TextQueryTestBackend(pipeline) 748 | assert backend.convert(process_creation_sigma_rule) == [ 749 | 'event_platform="Win" and (event_simpleName in ("ProcessRollup2", "SyntheticProcessRollup2")) and CommandLine="test.exe foo bar" and ImageFileName endswith "\\test.exe"' 750 | ] 751 | 752 | 753 | def test_crowdstrike_fdr_pipeline_parentimage( 754 | resolver: ProcessingPipelineResolver, process_creation_sigma_rule_parentimage 755 | ): 756 | pipeline = resolver.resolve_pipeline("crowdstrike_fdr") 757 | backend = TextQueryTestBackend(pipeline) 758 | assert backend.convert(process_creation_sigma_rule_parentimage) == [ 759 | 'event_platform="Win" and (event_simpleName in ("ProcessRollup2", "SyntheticProcessRollup2")) and CommandLine="test.exe foo bar" and ParentBaseFileName="parent.exe"' 760 | ] 761 | 762 | 763 | def test_crowdstrike_fdr_pipeline_parentimage_without_slash( 764 | resolver: ProcessingPipelineResolver, 765 | process_creation_sigma_rule_parentimage_without_slash, 766 | ): 767 | pipeline = resolver.resolve_pipeline("crowdstrike_fdr") 768 | backend = TextQueryTestBackend(pipeline) 769 | assert backend.convert(process_creation_sigma_rule_parentimage_without_slash) == [ 770 | 'event_platform="Win" and (event_simpleName in ("ProcessRollup2", "SyntheticProcessRollup2")) and CommandLine="test.exe foo bar" and ParentBaseFileName endswith "parent.exe"' 771 | ] 772 | 773 | 774 | def test_crowdstrike_fdr_pipeline_parentimage_path( 775 | resolver: ProcessingPipelineResolver, process_creation_sigma_rule_parentimage_path 776 | ): 777 | pipeline = resolver.resolve_pipeline("crowdstrike_fdr") 778 | backend = TextQueryTestBackend(pipeline) 779 | with pytest.raises(SigmaTransformationError, match="CrowdStrike"): 780 | backend.convert(process_creation_sigma_rule_parentimage_path) 781 | 782 | 783 | def test_crowdstrike_fdr_network_connect( 784 | resolver: ProcessingPipelineResolver, network_connection_sigma_rule 785 | ): 786 | pipeline = resolver.resolve_pipeline("crowdstrike_fdr") 787 | backend = TextQueryTestBackend(pipeline) 788 | assert backend.convert(network_connection_sigma_rule) == [ 789 | 'event_simpleName="NetworkConnectIP4" and RemoteAddressIP4="1.2.3.4"' 790 | ] 791 | 792 | 793 | def test_crowdstrike_fdr_network_connect_incoming( 794 | resolver: ProcessingPipelineResolver, incoming_network_connection_sigma_rule 795 | ): 796 | pipeline = resolver.resolve_pipeline("crowdstrike_fdr") 797 | backend = TextQueryTestBackend(pipeline) 798 | assert backend.convert(incoming_network_connection_sigma_rule) == [ 799 | 'event_simpleName="NetworkReceiveAcceptIP4" and RemoteAddressIP4="1.2.3.4"' 800 | ] 801 | 802 | 803 | def test_crowdstrike_fdr_dns_query( 804 | resolver: ProcessingPipelineResolver, dns_query_sigma_rule 805 | ): 806 | pipeline = resolver.resolve_pipeline("crowdstrike_fdr") 807 | backend = TextQueryTestBackend(pipeline) 808 | assert backend.convert(dns_query_sigma_rule) == [ 809 | 'event_platform="Win" and event_simpleName="DnsRequest" and DomainName="test.invalid" and (RequestType in ("1", "2", "5", "12", "15", "16", "28", "255")) and (IP4Records contains "1.1.1.1" or IP6Records contains "1.1.1.1") and ContextBaseFileName="parent.exe"' 810 | ] 811 | --------------------------------------------------------------------------------