├── LICENSE ├── README.md ├── docs └── img │ ├── cutter_fullscreen.png │ └── plugin_closeup.png ├── install.ps1 ├── libs ├── yara.cp36-win_amd64.pyd └── yara_python-3.11.0.dist-info │ ├── DESCRIPTION.rst │ ├── INSTALLER │ ├── LICENSE.txt │ ├── METADATA │ ├── RECORD │ ├── WHEEL │ ├── metadata.json │ └── top_level.txt ├── rules ├── Crypto │ └── crypto_signatures.yar ├── Crypto_index.yar ├── Packers │ ├── JJencode.yar │ ├── Javascript_exploit_and_obfuscation.yar │ ├── packer.yar │ ├── packer_compiler_signatures.yar │ └── peid.yar └── Packers_index.yar └── yara_plugin.py /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Yara Cutter Plugin 2 | 3 | ![cutter overview](docs/img/cutter_fullscreen.png) 4 | 5 | 6 | ## About 7 | 8 | Extension to use [YARA](https://github.com/VirusTotal/yara) rules on [Cutter](https://github.com/radareorg/cutter) projects. 9 | Simply paste your rule files in the "rules" directory to apply them at start. 10 | 11 | ![plugin closeup](docs/img/plugin_closeup.png) 12 | 13 | ## Installation 14 | 15 | This plugin relies on [yara-python](https://github.com/VirusTotal/yara-python). 16 | To make it work you need to install it into the cutter embedded python version. 17 | 18 | - For windows systems you can run the provided powershell file. (Don't forget to edit the path!) 19 | - For nix operating systems simply install yara-python, locate the files with ```pip show``` and copy the module files to the python directory of cutter. 20 | - Now copy the cutter plugin files to the cutter plugin directory (on windows usually found at ```%USERPROFILE%\AppData\Roaming\RadareOrg\Cutter\plugins\python\```) 21 | - Finally add some rules to the "rules" directory 22 | 23 | ### Example Usecases 24 | 25 | - [Packer detection](https://github.com/Yara-Rules/rules/blob/master/Packers_index.yar) 26 | Detect matching packers to replace tools like PEiD or DiE. 27 | - [Malware attribution](https://github.com/Yara-Rules/rules/blob/master/malware_index.yar) 28 | Detect known malware signatures. 29 | - [Crypto detection](https://github.com/Yara-Rules/rules/blob/master/Crypto_index.yar) 30 | Detect various crypto constants. -------------------------------------------------------------------------------- /docs/img/cutter_fullscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JannisKirschner/Cutter-Yara-Plugin/d03bf57c8258055b6f6f9e389b7c29a17041d4ac/docs/img/cutter_fullscreen.png -------------------------------------------------------------------------------- /docs/img/plugin_closeup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JannisKirschner/Cutter-Yara-Plugin/d03bf57c8258055b6f6f9e389b7c29a17041d4ac/docs/img/plugin_closeup.png -------------------------------------------------------------------------------- /install.ps1: -------------------------------------------------------------------------------- 1 | $cutter_location = "C:\Path\To\Cutter-Dir\python36\" 2 | 3 | py -m pip install yara-python 4 | $plugin_info = py -m pip show yara-python 5 | $plugin_location = $plugin_info | Where-Object {$_ | Select-String "Location: "} 6 | $location_header, $plugin_location = $plugin_location.Split(" ") 7 | $files = Get-ChildItem -Path "$plugin_location" 8 | 9 | $pydfile = Get-ChildItem -Path "$plugin_location" -Filter "yara*.pyd" | Select-Object -expandproperty fullname 10 | $distfiles = Get-ChildItem -Path "$plugin_location" -Filter "yara*dist-info" | Select-Object -expandproperty fullname 11 | 12 | copy-item -Path $pydfile -Destination "$cutter_location" 13 | copy-item -Path $distfiles -Destination "$cutter_location\site-packages" -------------------------------------------------------------------------------- /libs/yara.cp36-win_amd64.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JannisKirschner/Cutter-Yara-Plugin/d03bf57c8258055b6f6f9e389b7c29a17041d4ac/libs/yara.cp36-win_amd64.pyd -------------------------------------------------------------------------------- /libs/yara_python-3.11.0.dist-info/DESCRIPTION.rst: -------------------------------------------------------------------------------- 1 | .. image:: https://travis-ci.org/VirusTotal/yara-python.svg 2 | :target: https://travis-ci.org/VirusTotal/yara-python 3 | .. image:: https://ci.appveyor.com/api/projects/status/gidnb9ulj3rje5s2?svg=true 4 | :target: https://ci.appveyor.com/project/plusvic/yara-python 5 | 6 | yara-python 7 | =========== 8 | 9 | With this library you can use `YARA `_ from 10 | your Python programs. It covers all YARA's features, from compiling, saving 11 | and loading rules to scanning files, strings and processes. 12 | 13 | Here it goes a little example: 14 | 15 | .. code-block:: python 16 | 17 | >>> import yara 18 | >>> rule = yara.compile(source='rule foo: bar {strings: $a = "lmn" condition: $a}') 19 | >>> matches = rule.match(data='abcdefgjiklmnoprstuvwxyz') 20 | >>> print(matches) 21 | [foo] 22 | >>> print(matches[0].rule) 23 | foo 24 | >>> print(matches[0].tags) 25 | ['bar'] 26 | >>> print(matches[0].strings) 27 | [(10L, '$a', 'lmn')] 28 | 29 | 30 | Installation 31 | ------------ 32 | 33 | The easiest way of installing YARA is by using ``pip``: 34 | 35 | .. code-block:: bash 36 | 37 | $ pip install yara-python 38 | 39 | But you can also get the source from GitHub and compile it yourself: 40 | 41 | .. code-block:: bash 42 | 43 | $ git clone --recursive https://github.com/VirusTotal/yara-python 44 | $ cd yara-python 45 | $ python setup.py build 46 | $ sudo python setup.py install 47 | 48 | Notice the ``--recursive`` option used with ``git``. This is important because 49 | we need to download the ``yara`` subproject containing the source code for 50 | ``libyara`` (the core YARA library). It's also important to note that the two 51 | methods above link ``libyara`` statically into yara-python. If you want to link 52 | dynamically against a shared ``libyara`` library use: 53 | 54 | .. code-block:: bash 55 | 56 | $ sudo python setup.py install --dynamic-linking 57 | 58 | For this option to work you must build and install 59 | `YARA `_ separately before installing 60 | ``yara-python``. 61 | 62 | 63 | Documentation 64 | ------------- 65 | 66 | Find more information about how to use yara-python at 67 | https://yara.readthedocs.org/en/latest/yarapython.html. 68 | 69 | 70 | -------------------------------------------------------------------------------- /libs/yara_python-3.11.0.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /libs/yara_python-3.11.0.dist-info/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /libs/yara_python-3.11.0.dist-info/METADATA: -------------------------------------------------------------------------------- 1 | Metadata-Version: 2.0 2 | Name: yara-python 3 | Version: 3.11.0 4 | Summary: Python interface for YARA 5 | Home-page: https://github.com/VirusTotal/yara-python 6 | Author: Victor M. Alvarez 7 | Author-email: plusvic@gmail.com, vmalvarez@virustotal.com 8 | License: Apache 2.0 9 | Platform: UNKNOWN 10 | Classifier: Programming Language :: Python 11 | Classifier: License :: OSI Approved :: Apache Software License 12 | Classifier: Operating System :: OS Independent 13 | Classifier: Development Status :: 5 - Production/Stable 14 | 15 | .. image:: https://travis-ci.org/VirusTotal/yara-python.svg 16 | :target: https://travis-ci.org/VirusTotal/yara-python 17 | .. image:: https://ci.appveyor.com/api/projects/status/gidnb9ulj3rje5s2?svg=true 18 | :target: https://ci.appveyor.com/project/plusvic/yara-python 19 | 20 | yara-python 21 | =========== 22 | 23 | With this library you can use `YARA `_ from 24 | your Python programs. It covers all YARA's features, from compiling, saving 25 | and loading rules to scanning files, strings and processes. 26 | 27 | Here it goes a little example: 28 | 29 | .. code-block:: python 30 | 31 | >>> import yara 32 | >>> rule = yara.compile(source='rule foo: bar {strings: $a = "lmn" condition: $a}') 33 | >>> matches = rule.match(data='abcdefgjiklmnoprstuvwxyz') 34 | >>> print(matches) 35 | [foo] 36 | >>> print(matches[0].rule) 37 | foo 38 | >>> print(matches[0].tags) 39 | ['bar'] 40 | >>> print(matches[0].strings) 41 | [(10L, '$a', 'lmn')] 42 | 43 | 44 | Installation 45 | ------------ 46 | 47 | The easiest way of installing YARA is by using ``pip``: 48 | 49 | .. code-block:: bash 50 | 51 | $ pip install yara-python 52 | 53 | But you can also get the source from GitHub and compile it yourself: 54 | 55 | .. code-block:: bash 56 | 57 | $ git clone --recursive https://github.com/VirusTotal/yara-python 58 | $ cd yara-python 59 | $ python setup.py build 60 | $ sudo python setup.py install 61 | 62 | Notice the ``--recursive`` option used with ``git``. This is important because 63 | we need to download the ``yara`` subproject containing the source code for 64 | ``libyara`` (the core YARA library). It's also important to note that the two 65 | methods above link ``libyara`` statically into yara-python. If you want to link 66 | dynamically against a shared ``libyara`` library use: 67 | 68 | .. code-block:: bash 69 | 70 | $ sudo python setup.py install --dynamic-linking 71 | 72 | For this option to work you must build and install 73 | `YARA `_ separately before installing 74 | ``yara-python``. 75 | 76 | 77 | Documentation 78 | ------------- 79 | 80 | Find more information about how to use yara-python at 81 | https://yara.readthedocs.org/en/latest/yarapython.html. 82 | 83 | 84 | -------------------------------------------------------------------------------- /libs/yara_python-3.11.0.dist-info/RECORD: -------------------------------------------------------------------------------- 1 | yara.cp36-win_amd64.pyd,sha256=2w2TlwU_OJLkOrbvYvVRED6jAuQj6fyVPckQb8Hk4wU,1548288 2 | yara_python-3.11.0.dist-info/DESCRIPTION.rst,sha256=-HekarqNbDwhneiwacwo96kb6tQs687T63RuJ425azo,2009 3 | yara_python-3.11.0.dist-info/LICENSE.txt,sha256=xllut76FgcGL5zbIRvuRc7aezPbvlMUTWJPsVr2Sugg,11358 4 | yara_python-3.11.0.dist-info/METADATA,sha256=hVpxZzO4L6WQEa4uTkJqr4GCMAikm-6VdwWLv2J8SoE,2485 5 | yara_python-3.11.0.dist-info/RECORD,, 6 | yara_python-3.11.0.dist-info/WHEEL,sha256=4fkP9V5fUlnPlEu2h0nt7u0cPpJipYsJO32nXNevnFk,106 7 | yara_python-3.11.0.dist-info/metadata.json,sha256=OLn7QdxekWrFvOofTqaQ9eu8kriwBgtlo9FBW1aRWwc,669 8 | yara_python-3.11.0.dist-info/top_level.txt,sha256=i67N7aucgMSsBk6wM1QUrUGuVcKGLGDmOKI7k2H5lGM,5 9 | yara_python-3.11.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 10 | -------------------------------------------------------------------------------- /libs/yara_python-3.11.0.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.29.0) 3 | Root-Is-Purelib: false 4 | Tag: cp36-cp36m-win_amd64 5 | 6 | -------------------------------------------------------------------------------- /libs/yara_python-3.11.0.dist-info/metadata.json: -------------------------------------------------------------------------------- 1 | {"classifiers": ["Programming Language :: Python", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Development Status :: 5 - Production/Stable"], "extensions": {"python.details": {"contacts": [{"email": "plusvic@gmail.com, vmalvarez@virustotal.com", "name": "Victor M. Alvarez", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst", "license": "LICENSE.txt"}, "project_urls": {"Home": "https://github.com/VirusTotal/yara-python"}}}, "generator": "bdist_wheel (0.29.0)", "license": "Apache 2.0", "metadata_version": "2.0", "name": "yara-python", "summary": "Python interface for YARA", "version": "3.11.0"} -------------------------------------------------------------------------------- /libs/yara_python-3.11.0.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | yara 2 | -------------------------------------------------------------------------------- /rules/Crypto/crypto_signatures.yar: -------------------------------------------------------------------------------- 1 | /* 2 | This Yara ruleset is under the GNU-GPLv2 license (http://www.gnu.org/licenses/gpl-2.0.html) and open to any user or organization, as long as you use it under this license. 3 | */ 4 | rule Big_Numbers0 5 | { 6 | meta: 7 | author = "_pusher_" 8 | description = "Looks for big numbers 20:sized" 9 | date = "2016-07" 10 | strings: 11 | $c0 = /[0-9a-fA-F]{20}/ fullword ascii 12 | condition: 13 | $c0 14 | } 15 | 16 | rule Big_Numbers1 17 | { 18 | meta: 19 | author = "_pusher_" 20 | description = "Looks for big numbers 32:sized" 21 | date = "2016-07" 22 | strings: 23 | $c0 = /[0-9a-fA-F]{32}/ fullword wide ascii 24 | condition: 25 | $c0 26 | } 27 | 28 | rule Big_Numbers2 29 | { 30 | meta: 31 | author = "_pusher_" 32 | description = "Looks for big numbers 48:sized" 33 | date = "2016-07" 34 | strings: 35 | $c0 = /[0-9a-fA-F]{48}/ fullword wide ascii 36 | condition: 37 | $c0 38 | } 39 | 40 | rule Big_Numbers3 41 | { 42 | meta: 43 | author = "_pusher_" 44 | description = "Looks for big numbers 64:sized" 45 | date = "2016-07" 46 | strings: 47 | $c0 = /[0-9a-fA-F]{64}/ fullword wide ascii 48 | condition: 49 | $c0 50 | } 51 | 52 | rule Big_Numbers4 53 | { 54 | meta: 55 | author = "_pusher_" 56 | description = "Looks for big numbers 128:sized" 57 | date = "2016-08" 58 | strings: 59 | $c0 = /[0-9a-fA-F]{128}/ fullword wide ascii 60 | condition: 61 | $c0 62 | } 63 | 64 | rule Big_Numbers5 65 | { 66 | meta: 67 | author = "_pusher_" 68 | description = "Looks for big numbers 256:sized" 69 | date = "2016-08" 70 | strings: 71 | $c0 = /[0-9a-fA-F]{256}/ fullword wide ascii 72 | condition: 73 | $c0 74 | } 75 | 76 | rule Prime_Constants_char { 77 | meta: 78 | author = "_pusher_" 79 | description = "List of primes [char]" 80 | date = "2016-07" 81 | strings: 82 | $c0 = { 03 05 07 0B 0D 11 13 17 1D 1F 25 29 2B 2F 35 3B 3D 43 47 49 4F 53 59 61 65 67 6B 6D 71 7F 83 89 8B 95 97 9D A3 A7 AD B3 B5 BF C1 C5 C7 D3 DF E3 E5 E9 EF F1 FB } 83 | condition: 84 | $c0 85 | } 86 | 87 | rule Prime_Constants_long { 88 | meta: 89 | author = "_pusher_" 90 | description = "List of primes [long]" 91 | date = "2016-07" 92 | strings: 93 | $c0 = { 03 00 00 00 05 00 00 00 07 00 00 00 0B 00 00 00 0D 00 00 00 11 00 00 00 13 00 00 00 17 00 00 00 1D 00 00 00 1F 00 00 00 25 00 00 00 29 00 00 00 2B 00 00 00 2F 00 00 00 35 00 00 00 3B 00 00 00 3D 00 00 00 43 00 00 00 47 00 00 00 49 00 00 00 4F 00 00 00 53 00 00 00 59 00 00 00 61 00 00 00 65 00 00 00 67 00 00 00 6B 00 00 00 6D 00 00 00 71 00 00 00 7F 00 00 00 83 00 00 00 89 00 00 00 8B 00 00 00 95 00 00 00 97 00 00 00 9D 00 00 00 A3 00 00 00 A7 00 00 00 AD 00 00 00 B3 00 00 00 B5 00 00 00 BF 00 00 00 C1 00 00 00 C5 00 00 00 C7 00 00 00 D3 00 00 00 DF 00 00 00 E3 00 00 00 E5 00 00 00 E9 00 00 00 EF 00 00 00 F1 00 00 00 FB 00 00 00 } 94 | condition: 95 | $c0 96 | } 97 | 98 | 99 | rule Advapi_Hash_API { 100 | meta: 101 | author = "_pusher_" 102 | description = "Looks for advapi API functions" 103 | date = "2016-07" 104 | strings: 105 | $advapi32 = "advapi32.dll" wide ascii nocase 106 | $CryptCreateHash = "CryptCreateHash" wide ascii 107 | $CryptHashData = "CryptHashData" wide ascii 108 | $CryptAcquireContext = "CryptAcquireContext" wide ascii 109 | condition: 110 | $advapi32 and ($CryptCreateHash and $CryptHashData and $CryptAcquireContext) 111 | } 112 | 113 | rule Crypt32_CryptBinaryToString_API { 114 | meta: 115 | author = "_pusher_" 116 | description = "Looks for crypt32 CryptBinaryToStringA function" 117 | date = "2016-08" 118 | strings: 119 | $crypt32 = "crypt32.dll" wide ascii nocase 120 | $CryptBinaryToStringA = "CryptBinaryToStringA" wide ascii 121 | condition: 122 | $crypt32 and ($CryptBinaryToStringA) 123 | } 124 | 125 | rule CRC32c_poly_Constant { 126 | meta: 127 | author = "_pusher_" 128 | description = "Look for CRC32c (Castagnoli) [poly]" 129 | date = "2016-08" 130 | strings: 131 | $c0 = { 783BF682 } 132 | condition: 133 | $c0 134 | } 135 | 136 | rule CRC32_poly_Constant { 137 | meta: 138 | author = "_pusher_" 139 | description = "Look for CRC32 [poly]" 140 | date = "2015-05" 141 | version = "0.1" 142 | strings: 143 | $c0 = { 2083B8ED } 144 | condition: 145 | $c0 146 | } 147 | 148 | rule CRC32_table { 149 | meta: 150 | author = "_pusher_" 151 | description = "Look for CRC32 table" 152 | date = "2015-05" 153 | version = "0.1" 154 | strings: 155 | $c0 = { 00 00 00 00 96 30 07 77 2C 61 0E EE BA 51 09 99 19 C4 6D 07 } 156 | condition: 157 | $c0 158 | } 159 | 160 | rule CRC32_table_lookup { 161 | meta: 162 | author = "_pusher_" 163 | description = "CRC32 table lookup" 164 | date = "2015-06" 165 | version = "0.1" 166 | strings: 167 | $c0 = { 8B 54 24 08 85 D2 7F 03 33 C0 C3 83 C8 FF 33 C9 85 D2 7E 29 56 8B 74 24 08 57 8D 9B 00 00 00 00 0F B6 3C 31 33 F8 81 E7 FF 00 00 00 C1 E8 08 33 04 BD ?? ?? ?? ?? 41 3B CA 7C E5 5F 5E F7 D0 C3 } 168 | condition: 169 | $c0 170 | } 171 | 172 | rule CRC32b_poly_Constant { 173 | meta: 174 | author = "_pusher_" 175 | description = "Look for CRC32b [poly]" 176 | date = "2016-04" 177 | version = "0.1" 178 | strings: 179 | $c0 = { B71DC104 } 180 | condition: 181 | $c0 182 | } 183 | 184 | 185 | rule CRC16_table { 186 | meta: 187 | author = "_pusher_" 188 | description = "Look for CRC16 table" 189 | date = "2016-04" 190 | version = "0.1" 191 | strings: 192 | $c0 = { 00 00 21 10 42 20 63 30 84 40 A5 50 C6 60 E7 70 08 81 29 91 4A A1 6B B1 8C C1 AD D1 CE E1 EF F1 31 12 10 02 73 32 52 22 B5 52 94 42 F7 72 D6 62 39 93 18 83 7B B3 5A A3 BD D3 9C C3 FF F3 DE E3 } 193 | condition: 194 | $c0 195 | } 196 | 197 | 198 | rule FlyUtilsCnDES_ECB_Encrypt { 199 | meta: 200 | author = "_pusher_" 201 | description = "Look for FlyUtils.CnDES Encrypt ECB function" 202 | date = "2016-07" 203 | strings: 204 | $c0 = { 55 8B EC 83 C4 E8 53 56 57 33 DB 89 5D E8 89 5D EC 8B D9 89 55 F8 89 45 FC 8B 7D 08 8B 75 20 8B 45 FC E8 ?? ?? ?? ?? 8B 45 F8 E8 ?? ?? ?? ?? 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 80 7D 18 00 74 1A 0F B6 55 18 8D 4D EC 8B 45 F8 E8 ?? ?? ?? ?? 8B 55 EC 8D 45 F8 E8 ?? ?? ?? ?? 80 7D 1C 00 74 1A 0F B6 55 1C 8D 4D E8 8B 45 FC E8 ?? ?? ?? ?? 8B 55 E8 8D 45 FC E8 ?? ?? ?? ?? 85 DB 75 07 E8 ?? ?? ?? ?? 8B D8 85 F6 75 07 E8 ?? ?? ?? ?? 8B F0 53 6A 00 8B 4D FC B2 01 A1 ?? ?? ?? ?? E8 ?? ?? ?? ?? 89 45 F4 33 D2 55 68 ?? ?? ?? ?? 64 FF 32 64 89 22 6A 00 6A 00 8B 45 F4 E8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 50 6A 00 33 C9 B2 01 A1 ?? ?? ?? ?? E8 ?? ?? ?? ?? 89 45 F0 33 D2 55 68 ?? ?? ?? ?? 64 FF 32 64 89 22 6A 00 6A 00 56 } 205 | condition: 206 | $c0 207 | } 208 | 209 | rule FlyUtilsCnDES_ECB_Decrypt { 210 | meta: 211 | author = "_pusher_" 212 | description = "Look for FlyUtils.CnDES Decrypt ECB function" 213 | date = "2016-07" 214 | strings: 215 | $c0 = { 55 8B EC 83 C4 E8 53 56 57 33 DB 89 5D E8 89 5D EC 8B F9 89 55 F8 89 45 FC 8B 5D 18 8B 75 20 8B 45 FC E8 ?? ?? ?? ?? 8B 45 F8 E8 ?? ?? ?? ?? 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 84 DB 74 18 8B D3 8D 4D EC 8B 45 F8 E8 ?? ?? ?? ?? 8B 55 EC 8D 45 F8 E8 ?? ?? ?? ?? 85 FF 75 07 E8 ?? ?? ?? ?? 8B F8 85 F6 75 07 E8 ?? ?? ?? ?? 8B F0 8B 4D FC B2 01 A1 ?? ?? ?? ?? E8 ?? ?? ?? ?? 89 45 F4 33 D2 55 68 ?? ?? ?? ?? 64 FF 32 64 89 22 57 6A 00 33 C9 B2 01 A1 ?? ?? ?? ?? E8 ?? ?? ?? ?? 89 45 F0 33 D2 55 68 ?? ?? ?? ?? 64 FF 32 64 89 22 6A 00 6A 00 56 E8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 50 FF 75 14 FF 75 10 8B 45 0C 50 8B 4D F8 8B 55 F0 8B 45 F4 E8 ?? ?? ?? ?? 6A 00 6A 00 8B 45 F0 E8 ?? ?? ?? ?? 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 8B 55 08 8B 45 F0 E8 ?? ?? ?? ?? 33 C0 5A 59 59 64 89 10 EB 12 E9 ?? ?? ?? ?? 8B 45 08 E8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 33 C0 5A 59 59 64 89 10 68 ?? ?? ?? ?? 8B 45 F0 33 D2 89 55 F0 E8 ?? ?? ?? ?? C3 } 216 | condition: 217 | $c0 218 | } 219 | 220 | rule Elf_Hash { 221 | meta: 222 | author = "_pusher_" 223 | description = "Look for ElfHash" 224 | date = "2015-06" 225 | version = "0.3" 226 | strings: 227 | $c0 = { 53 56 33 C9 8B DA 4B 85 DB 7C 25 43 C1 E1 04 33 D2 8A 10 03 CA 8B D1 81 E2 00 00 00 F0 85 D2 74 07 8B F2 C1 EE 18 33 CE F7 D2 23 CA 40 4B 75 DC 8B C1 5E 5B C3 } 228 | $c1 = { 53 33 D2 85 C0 74 2B EB 23 C1 E2 04 81 E1 FF 00 00 00 03 D1 8B CA 81 E1 00 00 00 F0 85 C9 74 07 8B D9 C1 EB 18 33 D3 F7 D1 23 D1 40 8A 08 84 C9 75 D7 8B C2 5B C3 } 229 | $c2 = { 53 56 33 C9 8B D8 85 D2 76 23 C1 E1 04 33 C0 8A 03 03 C8 8B C1 25 00 00 00 F0 85 C0 74 07 8B F0 C1 EE 18 33 CE F7 D0 23 C8 43 4A 75 DD 8B C1 5E 5B C3 } 230 | $c3 = { 53 56 57 8B F2 8B D8 8B FB 53 E8 ?? ?? ?? ?? 6B C0 02 71 05 E8 ?? ?? ?? ?? 8B D7 33 C9 8B D8 83 EB 01 71 05 E8 ?? ?? ?? ?? 85 DB 7C 2C 43 C1 E1 04 0F B6 02 03 C8 71 05 E8 ?? ?? ?? ?? 83 C2 01 B8 00 00 00 F0 23 C1 85 C0 74 07 8B F8 C1 EF 18 33 CF F7 D0 23 C8 4B 75 D5 8B C1 99 F7 FE 8B C2 85 C0 7D 09 03 C6 71 05 E8 ?? ?? ?? ?? 5F 5E 5B C3 } 231 | $c4 = { 53 33 D2 EB 2C 8B D9 80 C3 BF 80 EB 1A 73 03 80 C1 20 C1 E2 04 81 E1 FF 00 00 00 03 D1 8B CA 81 E1 00 00 00 F0 8B D9 C1 EB 18 33 D3 F7 D1 23 D1 40 8A 08 84 C9 75 CE 8B C2 5B C3 } 232 | $c5 = { 89 C2 31 C0 85 D2 74 30 2B 42 FC 74 2B 89 C1 29 C2 31 C0 53 0F B6 1C 11 01 C3 8D 04 1B C1 EB 14 8D 04 C5 00 00 00 00 81 E3 00 0F 00 00 31 D8 83 C1 01 75 E0 C1 E8 04 5B C3 } 233 | $c6 = { 53 33 D2 85 C0 74 38 EB 30 8B D9 80 C3 BF 80 EB 1A 73 03 80 C1 20 C1 E2 04 81 E1 FF 00 00 00 03 D1 8B CA 81 E1 00 00 00 F0 85 C9 74 07 8B D9 C1 EB 18 33 D3 F7 D1 23 D1 40 8A 08 84 C9 75 CA 8B C2 5B C3 } 234 | condition: 235 | any of them 236 | } 237 | 238 | rule BLOWFISH_Constants { 239 | meta: 240 | author = "phoul (@phoul)" 241 | description = "Look for Blowfish constants" 242 | date = "2014-01" 243 | version = "0.1" 244 | strings: 245 | $c0 = { D1310BA6 } 246 | $c1 = { A60B31D1 } 247 | $c2 = { 98DFB5AC } 248 | $c3 = { ACB5DF98 } 249 | $c4 = { 2FFD72DB } 250 | $c5 = { DB72FD2F } 251 | $c6 = { D01ADFB7 } 252 | $c7 = { B7DF1AD0 } 253 | $c8 = { 4B7A70E9 } 254 | $c9 = { E9707A4B } 255 | $c10 = { F64C261C } 256 | $c11 = { 1C264CF6 } 257 | condition: 258 | 6 of them 259 | } 260 | 261 | rule MD5_Constants { 262 | meta: 263 | author = "phoul (@phoul)" 264 | description = "Look for MD5 constants" 265 | date = "2014-01" 266 | version = "0.2" 267 | strings: 268 | // Init constants 269 | $c0 = { 67452301 } 270 | $c1 = { efcdab89 } 271 | $c2 = { 98badcfe } 272 | $c3 = { 10325476 } 273 | $c4 = { 01234567 } 274 | $c5 = { 89ABCDEF } 275 | $c6 = { FEDCBA98 } 276 | $c7 = { 76543210 } 277 | // Round 2 278 | $c8 = { F4D50d87 } 279 | $c9 = { 78A46AD7 } 280 | condition: 281 | 5 of them 282 | } 283 | 284 | rule MD5_API { 285 | meta: 286 | author = "_pusher_" 287 | description = "Looks for MD5 API" 288 | date = "2016-07" 289 | strings: 290 | $advapi32 = "advapi32.dll" wide ascii nocase 291 | $cryptdll = "cryptdll.dll" wide ascii nocase 292 | $MD5Init = "MD5Init" wide ascii 293 | $MD5Update = "MD5Update" wide ascii 294 | $MD5Final = "MD5Final" wide ascii 295 | condition: 296 | ($advapi32 or $cryptdll) and ($MD5Init and $MD5Update and $MD5Final) 297 | } 298 | 299 | rule RC6_Constants { 300 | meta: 301 | author = "chort (@chort0)" 302 | description = "Look for RC6 magic constants in binary" 303 | reference = "https://twitter.com/mikko/status/417620511397400576" 304 | reference2 = "https://twitter.com/dyngnosis/status/418105168517804033" 305 | date = "2013-12" 306 | version = "0.2" 307 | strings: 308 | $c1 = { B7E15163 } 309 | $c2 = { 9E3779B9 } 310 | $c3 = { 6351E1B7 } 311 | $c4 = { B979379E } 312 | condition: 313 | 2 of them 314 | } 315 | 316 | rule RIPEMD160_Constants { 317 | meta: 318 | author = "phoul (@phoul)" 319 | description = "Look for RIPEMD-160 constants" 320 | date = "2014-01" 321 | version = "0.1" 322 | strings: 323 | $c0 = { 67452301 } 324 | $c1 = { EFCDAB89 } 325 | $c2 = { 98BADCFE } 326 | $c3 = { 10325476 } 327 | $c4 = { C3D2E1F0 } 328 | $c5 = { 01234567 } 329 | $c6 = { 89ABCDEF } 330 | $c7 = { FEDCBA98 } 331 | $c8 = { 76543210 } 332 | $c9 = { F0E1D2C3 } 333 | condition: 334 | 5 of them 335 | } 336 | 337 | rule SHA1_Constants { 338 | meta: 339 | author = "phoul (@phoul)" 340 | description = "Look for SHA1 constants" 341 | date = "2014-01" 342 | version = "0.1" 343 | strings: 344 | $c0 = { 67452301 } 345 | $c1 = { EFCDAB89 } 346 | $c2 = { 98BADCFE } 347 | $c3 = { 10325476 } 348 | $c4 = { C3D2E1F0 } 349 | $c5 = { 01234567 } 350 | $c6 = { 89ABCDEF } 351 | $c7 = { FEDCBA98 } 352 | $c8 = { 76543210 } 353 | $c9 = { F0E1D2C3 } 354 | //added by _pusher_ 2016-07 - last round 355 | $c10 = { D6C162CA } 356 | condition: 357 | 5 of them 358 | } 359 | 360 | rule SHA512_Constants { 361 | meta: 362 | author = "phoul (@phoul)" 363 | description = "Look for SHA384/SHA512 constants" 364 | date = "2014-01" 365 | version = "0.1" 366 | strings: 367 | $c0 = { 428a2f98 } 368 | $c1 = { 982F8A42 } 369 | $c2 = { 71374491 } 370 | $c3 = { 91443771 } 371 | $c4 = { B5C0FBCF } 372 | $c5 = { CFFBC0B5 } 373 | $c6 = { E9B5DBA5 } 374 | $c7 = { A5DBB5E9 } 375 | $c8 = { D728AE22 } 376 | $c9 = { 22AE28D7 } 377 | condition: 378 | 5 of them 379 | } 380 | 381 | rule TEAN { 382 | meta: 383 | author = "_pusher_" 384 | description = "Look for TEA Encryption" 385 | date = "2016-08" 386 | strings: 387 | $c0 = { 2037EFC6 } 388 | condition: 389 | $c0 390 | } 391 | 392 | rule WHIRLPOOL_Constants { 393 | meta: 394 | author = "phoul (@phoul)" 395 | description = "Look for WhirlPool constants" 396 | date = "2014-02" 397 | version = "0.1" 398 | strings: 399 | $c0 = { 18186018c07830d8 } 400 | $c1 = { d83078c018601818 } 401 | $c2 = { 23238c2305af4626 } 402 | $c3 = { 2646af05238c2323 } 403 | condition: 404 | 2 of them 405 | } 406 | 407 | rule DarkEYEv3_Cryptor { 408 | meta: 409 | description = "Rule to detect DarkEYEv3 encrypted executables (often malware)" 410 | author = "Florian Roth" 411 | reference = "http://darkeyev3.blogspot.fi/" 412 | date = "2015-05-24" 413 | hash0 = "6b854b967397f7de0da2326bdd5d39e710e2bb12" 414 | hash1 = "d53149968eca654fc0e803f925e7526fdac2786c" 415 | hash2 = "7e3a8940d446c57504d6a7edb6445681cca31c65" 416 | hash3 = "d3dd665dd77b02d7024ac16eb0949f4f598299e7" 417 | hash4 = "a907a7b74a096f024efe57953c85464e87275ba3" 418 | hash5 = "b1c422155f76f992048377ee50c79fe164b22293" 419 | hash6 = "29f5322ce5e9147f09e0a86cc23a7c8dc88721b9" 420 | hash7 = "a0382d7c12895489cb37efef74c5f666ea750b05" 421 | hash8 = "f3d5b71b7aeeb6cc917d5bb67e2165cf8a2fbe61" 422 | score = 55 423 | strings: 424 | $s0 = "\\DarkEYEV3-" 425 | condition: 426 | uint16(0) == 0x5a4d and $s0 427 | } 428 | 429 | rule Miracl_powmod 430 | { meta: 431 | author = "Maxx" 432 | description = "Miracl powmod" 433 | strings: 434 | $c0 = { 53 55 56 57 E8 ?? ?? ?? ?? 8B F0 8B 86 18 02 00 00 85 C0 0F 85 EC 01 00 00 8B 56 1C 42 8B C2 89 56 1C 83 F8 18 7D 17 C7 44 86 20 12 00 00 00 8B 86 2C 02 00 00 85 C0 74 05 E8 ?? ?? ?? ?? 8B 06 8B 4E 10 3B C1 74 2E 8B 7C 24 1C 57 E8 ?? ?? ?? ?? 83 C4 04 83 F8 02 7C 33 8B 57 04 8B 0E 51 8B 02 50 E8 ?? ?? ?? ?? 83 C4 08 83 F8 01 0F 84 58 01 00 00 EB 17 8B 7C 24 1C 6A 02 57 E8 ?? ?? ?? ?? 83 C4 08 85 C0 0F 84 3F 01 00 00 8B 8E C4 01 00 00 8B 54 24 18 51 52 E8 ?? ?? ?? ?? 8B 86 CC } 435 | condition: 436 | $c0 437 | } 438 | 439 | rule Miracl_crt 440 | { meta: 441 | author = "Maxx" 442 | description = "Miracl crt" 443 | strings: 444 | $c0 = { 51 56 57 E8 ?? ?? ?? ?? 8B 74 24 10 8B F8 89 7C 24 08 83 7E 0C 02 0F 8C 99 01 00 00 8B 87 18 02 00 00 85 C0 0F 85 8B 01 00 00 8B 57 1C 42 8B C2 89 57 1C 83 F8 18 7D 17 C7 44 87 20 4A 00 00 00 8B 87 2C 02 00 00 85 C0 74 05 E8 ?? ?? ?? ?? 8B 46 04 8B 54 24 14 53 55 8B 08 8B 02 51 50 E8 ?? ?? ?? ?? 8B 4E 0C B8 01 00 00 00 83 C4 08 33 ED 3B C8 89 44 24 18 0F 8E C5 00 00 00 BF 04 00 00 00 8B 46 04 8B 0C 07 8B 10 8B 44 24 1C 51 52 8B 0C 07 51 E8 ?? ?? ?? ?? 8B 56 04 8B 4E 08 8B 04 } 445 | condition: 446 | $c0 447 | } 448 | 449 | rule CryptoPP_a_exp_b_mod_c 450 | { meta: 451 | author = "Maxx" 452 | description = "CryptoPP a_exp_b_mod_c" 453 | strings: 454 | $c0 = { 6A FF 68 ?? ?? ?? ?? 64 A1 00 00 00 00 50 64 89 25 00 00 00 00 81 EC ?? 00 00 00 56 8B B4 24 B0 00 00 00 57 6A 00 8B CE C7 44 24 0C 00 00 00 00 E8 ?? ?? ?? ?? 84 C0 0F 85 16 01 00 00 8D 4C 24 24 E8 ?? ?? ?? ?? BF 01 00 00 00 56 8D 4C 24 34 89 BC 24 A4 00 00 00 E8 ?? ?? ?? ?? 8B 06 8D 4C 24 3C 50 6A 00 C6 84 24 A8 00 00 00 02 E8 ?? ?? ?? ?? 8D 4C 24 48 C6 84 24 A0 00 00 00 03 E8 ?? ?? ?? ?? C7 44 24 24 ?? ?? ?? ?? 8B 8C 24 AC 00 00 00 8D 54 24 0C 51 52 8D 4C 24 2C C7 84 24 A8 } 455 | $c1 = { 6A FF 68 ?? ?? ?? ?? 64 A1 00 00 00 00 50 64 89 25 00 00 00 00 83 EC 4C 56 57 33 FF 8D 44 24 0C 89 7C 24 08 C7 44 24 10 ?? ?? ?? ?? C7 44 24 0C ?? ?? ?? ?? 89 44 24 14 8B 74 24 70 8D 4C 24 18 56 89 7C 24 60 E8 ?? ?? ?? ?? 8B 76 08 8D 4C 24 2C 56 57 C6 44 24 64 01 E8 ?? ?? ?? ?? 8D 4C 24 40 C6 44 24 5C 02 E8 ?? ?? ?? ?? C7 44 24 0C ?? ?? ?? ?? 8B 4C 24 6C 8B 54 24 68 8B 74 24 64 51 52 56 8D 4C 24 18 C7 44 24 68 03 00 00 00 E8 ?? ?? ?? ?? 8B 7C 24 4C 8B 4C 24 48 8B D7 33 C0 F3 } 456 | $c2 = { 6A FF 68 ?? ?? ?? ?? 64 A1 00 00 00 00 50 64 89 25 00 00 00 00 83 EC 34 56 57 33 FF 8D 44 24 0C 89 7C 24 08 C7 44 24 10 ?? ?? ?? ?? C7 44 24 0C ?? ?? ?? ?? 89 44 24 14 8B 74 24 58 8D 4C 24 18 56 89 7C 24 48 E8 ?? ?? ?? ?? 8B 0E C6 44 24 44 01 51 57 8D 4C 24 2C E8 ?? ?? ?? ?? 8D 4C 24 30 C6 44 24 44 02 E8 ?? ?? ?? ?? C7 44 24 0C ?? ?? ?? ?? 8B 54 24 54 8B 44 24 50 8B 74 24 4C 52 50 56 8D 4C 24 18 C7 44 24 50 03 00 00 00 E8 ?? ?? ?? ?? 8B 4C 24 30 8B 7C 24 34 33 C0 F3 AB 8B 4C } 457 | condition: 458 | any of them 459 | } 460 | 461 | rule CryptoPP_modulo 462 | { meta: 463 | author = "Maxx" 464 | description = "CryptoPP modulo" 465 | strings: 466 | $c0 = { 83 EC 20 53 55 8B 6C 24 2C 8B D9 85 ED 89 5C 24 08 75 18 8D 4C 24 0C E8 ?? ?? ?? ?? 8D 44 24 0C 68 ?? ?? ?? ?? 50 E8 ?? ?? ?? ?? 8D 4D FF 56 85 CD 57 75 09 8B 53 04 8B 02 23 C1 EB 76 8B CB E8 ?? ?? ?? ?? 83 FD 05 8B C8 77 2D 33 F6 33 FF 49 85 C0 74 18 8B 53 04 8D 41 01 8D 14 8A 8B 0A 03 F1 83 D7 00 48 83 EA 04 85 C0 77 F1 6A 00 55 57 56 E8 ?? ?? ?? ?? EB 3B 33 C0 8B D1 49 85 D2 74 32 8B 54 24 10 33 DB 8D 71 01 8B 52 04 8D 3C 8A 8B 17 33 ED 0B C5 8B 6C 24 34 33 C9 53 0B CA 55 } 467 | $c1 = { 6A FF 68 ?? ?? ?? ?? 64 A1 00 00 00 00 50 64 89 25 00 00 00 00 83 EC 2C 56 57 8B F1 33 FF 8D 4C 24 20 89 7C 24 08 E8 ?? ?? ?? ?? 8D 4C 24 0C 89 7C 24 3C E8 ?? ?? ?? ?? 8B 44 24 48 8D 4C 24 0C 50 56 8D 54 24 28 51 52 C6 44 24 4C 01 E8 ?? ?? ?? ?? 8B 74 24 54 83 C4 10 8D 44 24 20 8B CE 50 E8 ?? ?? ?? ?? 8B 7C 24 18 8B 4C 24 14 8B D7 33 C0 F3 AB 52 E8 ?? ?? ?? ?? 8B 7C 24 30 8B 4C 24 2C 8B D7 33 C0 C7 44 24 10 ?? ?? ?? ?? 52 F3 AB E8 ?? ?? ?? ?? 8B 4C 24 3C 83 C4 08 8B C6 64 89 } 468 | $c2 = { 83 EC 24 53 55 8B 6C 24 30 8B D9 85 ED 89 5C 24 08 75 18 8D 4C 24 0C E8 ?? ?? ?? ?? 8D 44 24 0C 68 ?? ?? ?? ?? 50 E8 ?? ?? ?? ?? 8D 4D FF 56 85 CD 57 75 09 8B 53 0C 8B 02 23 C1 EB 76 8B CB E8 ?? ?? ?? ?? 83 FD 05 8B C8 77 2D 33 F6 33 FF 49 85 C0 74 18 8B 53 0C 8D 41 01 8D 14 8A 8B 0A 03 F1 83 D7 00 48 83 EA 04 85 C0 77 F1 6A 00 55 57 56 E8 ?? ?? ?? ?? EB 3B 33 C0 8B D1 49 85 D2 74 32 8B 54 24 10 33 DB 8D 71 01 8B 52 0C 8D 3C 8A 8B 17 33 ED 0B C5 8B 6C 24 38 33 C9 53 0B CA 55 } 469 | $c3 = { 6A FF 68 ?? ?? ?? ?? 64 A1 00 00 00 00 50 64 89 25 00 00 00 00 83 EC 1C 56 57 8B F1 33 FF 8D 4C 24 0C 89 7C 24 08 E8 ?? ?? ?? ?? 8D 4C 24 18 89 7C 24 2C E8 ?? ?? ?? ?? 8B 44 24 38 8D 4C 24 18 50 56 8D 54 24 14 51 52 C6 44 24 3C 01 E8 ?? ?? ?? ?? 8B 74 24 44 83 C4 10 8D 44 24 0C 8B CE 50 E8 ?? ?? ?? ?? 8B 4C 24 18 8B 7C 24 1C 33 C0 F3 AB 8B 4C 24 1C 51 E8 ?? ?? ?? ?? 8B 4C 24 10 8B 7C 24 14 33 C0 F3 AB 8B 54 24 14 52 E8 ?? ?? ?? ?? 8B 4C 24 2C 83 C4 08 8B C6 64 89 0D 00 00 00 } 470 | condition: 471 | any of them 472 | } 473 | 474 | rule FGint_MontgomeryModExp 475 | { meta: 476 | author = "_pusher_" 477 | date = "2015-06" 478 | version = "0.2" 479 | description = "FGint MontgomeryModExp" 480 | strings: 481 | $c0 = { 55 8B EC 83 C4 ?? 53 56 57 33 DB 89 5D ?? 8B F1 8B DA 89 45 ?? 8B 7D 08 8D 45 F4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 EC 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 DC 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 ?? 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 8D 55 D4 B8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B CF 8B D6 8B 45 FC E8 ?? ?? ?? ?? 8D 55 D4 8B C7 E8 ?? ?? ?? ?? 3C 02 75 0D 8D 45 D4 E8 ?? ?? ?? ?? E9 } 482 | $c1 = { 55 8B EC 83 C4 ?? 53 56 57 33 DB 89 5D ?? 8B F1 8B DA 89 45 ?? 8D 45 F4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 EC 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 DC 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 D4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 8D 55 D4 B8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B CF 8B D6 8B 45 FC E8 ?? ?? ?? ?? 8D 55 D4 8B C7 E8 ?? ?? ?? ?? 3C 02 75 0D 8D 45 D4 E8 ?? ?? ?? ?? E9 } 483 | $c2 = { 55 8B EC 83 C4 ?? 53 56 57 33 DB 89 5D ?? 8B F1 8B DA 89 45 ?? 8B 7D 08 8D 45 F4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 EC 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 DC 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 ?? 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 ?? 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 ?? 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 8D 55 D4 B8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B CF 8B D6 8B 45 ?? E8 ?? ?? ?? ?? 8D 55 D4 8B C7 E8 ?? ?? ?? ?? 3C 02 75 0D 8D 45 D4 E8 ?? ?? ?? ?? E9 } 484 | $c3 = { 55 8B EC 83 C4 ?? 53 56 57 33 DB 89 5D ?? 8B F1 8B DA 89 45 D0 8B 7D 08 8D 45 F4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 EC 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 DC 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 D4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 33 C0 55 68 47 4C 47 00 64 FF 30 64 89 20 8D 55 D4 B8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B CF 8B D6 8B 45 D0 E8 ?? ?? ?? ?? 8D 55 D4 8B C7 E8 ?? ?? ?? ?? 3C 02 75 0D 8D 45 D4 E8 ?? ?? ?? ?? E9 02 02 00 00 } 485 | condition: 486 | any of them 487 | } 488 | 489 | rule FGint_FGIntModExp 490 | { meta: 491 | author = "_pusher_" 492 | date = "2015-05" 493 | description = "FGint FGIntModExp" 494 | strings: 495 | $c0 = { 55 8B EC 83 C4 E8 53 56 57 33 DB 89 5D ?? 8B F1 89 55 ?? 8B D8 8B 7D 08 8D 45 F4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 EC 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 8B 46 04 8B 40 04 83 E0 01 83 F8 01 75 0F 57 8B CE 8B 55 ?? 8B C3 E8 ?? ?? ?? ?? EB ?? 8D 55 ?? 8B 45 ?? E8 ?? ?? ?? ?? 8B D7 B8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 55 F4 8B C3 E8 ?? ?? ?? ?? 8B 45 } 496 | condition: 497 | $c0 498 | } 499 | 500 | rule FGint_MulByInt 501 | { meta: 502 | author = "_pusher_" 503 | date = "2015-05" 504 | description = "FGint MulByInt" 505 | strings: 506 | $c0 = { 53 56 57 55 83 C4 E8 89 4C 24 04 8B EA 89 04 24 8B 04 24 8B 40 04 8B 00 89 44 24 08 8B 44 24 08 83 C0 02 50 8D 45 04 B9 01 00 00 00 8B 15 ?? ?? ?? ?? ?? ?? ?? ?? ?? 83 C4 04 33 F6 8B 7C 24 08 85 FF 76 6D BB 01 00 00 00 8B 04 24 8B 40 04 8B 04 98 33 D2 89 44 24 10 89 54 24 14 8B 44 24 04 33 D2 52 50 8B 44 24 18 8B 54 24 1C ?? ?? ?? ?? ?? 89 44 24 10 89 54 24 14 8B C6 33 D2 03 44 24 10 13 54 24 14 89 44 24 10 89 54 24 14 8B 44 24 10 25 FF FF FF 7F 8B 55 04 89 04 9A 8B 44 24 10 8B 54 24 14 0F AC D0 1F C1 EA 1F 8B F0 43 4F 75 98 } 507 | condition: 508 | $c0 509 | } 510 | 511 | rule FGint_DivMod 512 | { meta: 513 | author = "_pusher_" 514 | date = "2015-05" 515 | description = "FGint FGIntDivMod" 516 | strings: 517 | $c0 = { 55 8B EC 83 C4 BC 53 56 57 8B F1 89 55 F8 89 45 FC 8B 5D 08 8D 45 F0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 D8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 8B 45 FC 8A 00 88 45 D7 8B 45 F8 8A 00 88 45 D6 8B 45 FC E8 ?? ?? ?? ?? 8B 45 F8 E8 ?? ?? ?? ?? 8B D3 8B 45 FC E8 ?? ?? ?? ?? 8D 55 E0 8B 45 F8 E8 ?? ?? ?? ?? 8B 55 F8 8B 45 FC } 518 | condition: 519 | $c0 520 | } 521 | 522 | rule FGint_FGIntDestroy 523 | { meta: 524 | author = "_pusher_" 525 | date = "2015-05" 526 | description = "FGint FGIntDestroy" 527 | strings: 528 | $c0 = { 53 8B D8 8D 43 04 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 5B C3 } 529 | condition: 530 | $c0 531 | } 532 | 533 | rule FGint_Base10StringToGInt 534 | { meta: 535 | author = "_pusher_" 536 | date = "2015-06" 537 | version = "0.2" 538 | description = "FGint Base10StringToGInt" 539 | strings: 540 | $c0 = { 55 8B EC B9 04 00 00 00 6A 00 6A 00 49 75 F9 51 53 56 57 8B DA 89 45 FC 8B 45 FC ?? ?? ?? ?? ?? 33 C0 55 ?? ?? ?? ?? ?? 64 FF 30 64 89 20 EB 12 8D 45 FC B9 01 00 00 00 BA 01 00 00 00 ?? ?? ?? ?? ?? 8B 45 FC 8A 00 2C 2D 74 11 04 FD 2C 0A 72 0B 8B 45 FC ?? ?? ?? ?? ?? 48 7F D4 8D 45 E4 50 B9 01 00 00 00 BA 01 00 00 00 8B 45 FC ?? ?? ?? ?? ?? 8B 45 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 75 18 C6 45 EB 00 8D 45 FC B9 01 00 00 00 BA 01 00 00 00 ?? ?? ?? ?? ?? EB 18 C6 45 EB 01 EB 12 8D 45 FC } 541 | $c1 = { 55 8B EC 83 C4 D8 53 56 57 33 C9 89 4D D8 89 4D DC 89 4D E0 89 4D E4 89 4D EC 8B DA 89 45 FC 8B 45 FC E8 ?? ?? ?? ?? 33 C0 55 68 0F 42 45 00 64 FF 30 64 89 20 EB 12 8D 45 FC B9 01 00 00 00 BA 01 00 00 00 E8 ?? ?? ?? ?? 8B 45 FC 8A 00 2C 2D 74 11 04 FD 2C 0A 72 0B 8B 45 FC E8 ?? ?? ?? ?? 48 7F D4 8D 45 E4 50 B9 01 00 00 00 BA 01 00 00 00 8B 45 FC E8 ?? ?? ?? ?? 8B 45 E4 BA 28 42 45 00 E8 ?? ?? ?? ?? 75 18 C6 45 EB 00 8D 45 FC B9 01 00 00 00 BA 01 00 00 00 E8 ?? ?? ?? ?? EB 18 C6 45 EB 01 } 542 | $c2 = { 55 8B EC 83 C4 D8 53 56 33 C9 89 4D D8 89 4D DC 89 4D E0 89 4D F8 89 4D F4 8B DA 89 45 FC 8B 45 FC E8 ?? ?? ?? ?? 33 C0 55 68 A6 32 47 00 64 FF 30 64 89 20 EB 12 8D 45 FC B9 01 00 00 00 BA 01 00 00 00 E8 ?? ?? ?? ?? 8B 45 FC 0F B6 00 2C 2D 74 11 04 FD 2C 0A 72 0B 8B 45 FC E8 ?? ?? ?? ?? 48 7F D3 8D 45 E0 50 B9 01 00 00 00 BA 01 00 00 00 8B 45 FC E8 ?? ?? ?? ?? 8B 45 E0 BA BC 32 47 00 E8 ?? ?? ?? ?? 75 18 C6 45 E9 00 8D 45 FC B9 01 00 00 00 BA 01 00 00 00 E8 ?? ?? ?? ?? EB 18 C6 45 E9 01 } 543 | 544 | condition: 545 | any of them 546 | } 547 | 548 | rule FGint_ConvertBase256to64 549 | { meta: 550 | author = "_pusher_" 551 | date = "2015-05" 552 | description = "FGint ConvertBase256to64" 553 | strings: 554 | $c0 = { 55 8B EC 81 C4 EC FB FF FF 53 56 57 33 C9 89 8D EC FB FF FF 89 8D F0 FB FF FF 89 4D F8 8B FA 89 45 FC B9 00 01 00 00 8D 85 F4 FB FF FF 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 8D 85 F4 FB FF FF BA FF 00 00 00 E8 ?? ?? ?? ?? 8D 45 F8 E8 ?? ?? ?? ?? 8B 45 FC E8 ?? ?? ?? ?? 8B D8 85 DB 7E 2F BE 01 00 00 00 8D 45 F8 8B 55 FC 0F B6 54 32 FF 8B 94 95 F4 FB FF FF E8 ?? ?? ?? ?? 46 4B 75 E5 EB } 555 | condition: 556 | $c0 557 | } 558 | 559 | rule FGint_ConvertHexStringToBase256String 560 | { meta: 561 | author = "_pusher_" 562 | date = "2015-06" 563 | version = "0.2" 564 | description = "FGint ConvertHexStringToBase256String" 565 | strings: 566 | $c0 = { 55 8B EC 83 C4 F0 53 56 33 C9 89 4D F0 89 55 F8 89 45 FC 8B 45 FC E8 ?? ?? ?? ?? 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 8B 45 F8 E8 ?? ?? ?? ?? 8B 45 FC E8 ?? ?? ?? ?? D1 F8 79 03 83 D0 00 85 C0 7E 5F 89 45 F4 BE 01 00 00 00 8B C6 03 C0 8B 55 FC 8A 54 02 FF 8B 4D FC 8A 44 01 FE 3C 3A 73 0A 8B D8 80 EB 30 C1 E3 04 EB 08 8B D8 80 EB 37 C1 E3 04 80 FA 3A 73 07 80 EA 30 0A DA EB 05 80 EA 37 0A DA 8D 45 F0 8B D3 } 567 | condition: 568 | $c0 569 | } 570 | 571 | rule FGint_Base256StringToGInt 572 | { meta: 573 | author = "_pusher_" 574 | date = "2015-05" 575 | description = "FGint Base256StringToGInt" 576 | strings: 577 | $c0 = { 55 8B EC 81 C4 F8 FB FF FF 53 56 57 33 C9 89 4D F8 8B FA 89 45 FC 8B 45 FC ?? ?? ?? ?? ?? B9 00 01 00 00 8D 85 F8 FB FF FF 8B 15 ?? ?? ?? ?? ?? ?? ?? ?? ?? 33 C0 55 ?? ?? ?? ?? ?? 64 FF 30 64 89 20 8D 45 F8 ?? ?? ?? ?? ?? 8D 85 F8 FB FF FF BA FF 00 00 00 ?? ?? ?? ?? ?? 8B 45 FC ?? ?? ?? ?? ?? 8B D8 85 DB 7E 34 BE 01 00 00 00 8D 45 F8 8B 55 FC 0F B6 54 32 FF 8B 94 95 F8 FB FF FF ?? ?? ?? ?? ?? 46 4B 75 E5 EB 12 8D 45 F8 B9 01 00 00 00 BA 01 00 00 00 ?? ?? ?? ?? ?? 8B 45 F8 80 38 30 75 0F } 578 | condition: 579 | $c0 580 | } 581 | 582 | rule FGint_FGIntToBase256String 583 | { meta: 584 | author = "_pusher_" 585 | date = "2015-06" 586 | version = "0.2" 587 | description = "FGint FGIntToBase256String" 588 | strings: 589 | $c0 = { 55 8B EC 33 C9 51 51 51 51 53 56 8B F2 33 D2 55 68 ?? ?? ?? ?? 64 FF 32 64 89 22 8D 55 FC E8 ?? ?? ?? ?? EB 10 8D 45 FC 8B 4D FC BA ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B 45 FC E8 ?? ?? ?? ?? 25 07 00 00 80 79 05 48 83 C8 F8 40 85 C0 75 D8 8B 45 FC E8 ?? ?? ?? ?? 8B D8 85 DB 79 03 83 C3 07 C1 FB 03 8B C6 E8 ?? ?? ?? ?? 85 DB 76 4B 8D 45 F4 50 B9 08 00 00 00 BA 01 00 00 00 8B 45 FC E8 ?? ?? ?? ?? 8B 55 F4 8D 45 FB E8 ?? ?? ?? ?? 8D 45 F0 8A 55 FB E8 ?? ?? ?? ?? 8B 55 F0 8B C6 E8 ?? ?? ?? ?? 8D 45 FC B9 08 00 00 00 BA 01 00 00 00 E8 ?? ?? ?? ?? 4B 75 B5 } 590 | $c1 = { 55 8B EC 33 C9 51 51 51 51 53 56 8B F2 33 D2 55 68 ?? ?? ?? ?? 64 FF 32 64 89 22 8D 55 FC E8 ?? ?? ?? ?? EB 10 8D 45 FC 8B 4D FC BA ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B 45 FC E8 ?? ?? ?? ?? 25 07 00 00 80 79 05 48 83 C8 F8 40 85 C0 75 D8 8B 45 FC 85 C0 74 05 83 E8 04 8B 00 8B D8 85 DB 79 03 83 C3 07 C1 FB 03 8B C6 E8 ?? ?? ?? ?? 85 DB 76 4C 8D 45 F4 50 B9 08 00 00 00 BA 01 00 00 00 8B 45 FC E8 ?? ?? ?? ?? 8B 55 F4 8D 45 FB E8 ?? ?? ?? ?? 8D 45 F0 0F B6 55 FB E8 ?? ?? ?? ?? 8B 55 F0 8B C6 E8 ?? ?? ?? ?? 8D 45 FC B9 08 00 00 00 BA 01 00 00 00 E8 } 591 | condition: 592 | any of them 593 | } 594 | 595 | rule FGint_ConvertBase256StringToHexString 596 | { meta: 597 | author = "_pusher_" 598 | date = "2015-05" 599 | description = "FGint ConvertBase256StringToHexString" 600 | strings: 601 | $c0 = { 55 8B EC 33 C9 51 51 51 51 51 51 53 56 57 8B F2 89 45 FC 8B 45 FC E8 ?? ?? ?? ?? 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 8B C6 E8 ?? ?? ?? ?? 8B 45 FC E8 ?? ?? ?? ?? 8B F8 85 FF 0F 8E AB 00 00 00 C7 45 F8 01 00 00 00 8B 45 FC 8B 55 F8 8A 5C 10 FF 33 C0 8A C3 C1 E8 04 83 F8 0A 73 1E 8D 45 F4 33 D2 8A D3 C1 EA 04 83 C2 30 E8 ?? ?? ?? ?? 8B 55 F4 8B C6 E8 ?? ?? ?? ?? EB 1C 8D 45 F0 33 D2 8A D3 C1 EA 04 83 C2 37 E8 ?? ?? ?? ?? 8B 55 F0 8B C6 E8 ?? ?? ?? ?? 8B C3 24 0F 3C 0A 73 22 8D 45 EC 8B D3 80 E2 0F 81 E2 FF 00 00 00 83 C2 30 E8 ?? ?? ?? ?? 8B 55 EC 8B C6 E8 ?? ?? ?? ?? EB 20 8D 45 E8 8B D3 80 E2 0F 81 E2 FF 00 00 00 83 C2 37 } 602 | condition: 603 | $c0 604 | } 605 | 606 | 607 | rule FGint_PGPConvertBase256to64 608 | { meta: 609 | author = "_pusher_" 610 | date = "2016-08" 611 | description = "FGint PGPConvertBase256to64" 612 | strings: 613 | $c0 = { 55 8B EC 81 C4 E8 FB FF FF 53 56 57 33 C9 89 8D E8 FB FF FF 89 4D F8 89 4D F4 89 4D F0 8B FA 89 45 FC B9 00 01 00 00 8D 85 EC FB FF FF 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 8D 85 EC FB FF FF BA FF 00 00 00 E8 ?? ?? ?? ?? 8D 45 F8 E8 ?? ?? ?? ?? 8B 45 FC 8B 00 E8 ?? ?? ?? ?? 8B D8 85 DB 7E 22 BE 01 00 00 00 8D 45 F8 8B 55 FC 8B 12 0F B6 54 32 FF 8B 94 95 EC FB FF FF E8 ?? ?? ?? ?? 46 4B 75 E3 8B 45 F8 E8 ?? ?? ?? ?? B9 06 00 00 00 99 F7 F9 85 D2 75 0A 8D 45 F0 E8 ?? ?? ?? ?? EB 4B 8B 45 F8 E8 ?? ?? ?? ?? B9 06 00 00 00 99 F7 F9 83 FA 04 75 1C 8D 45 F8 BA 4C 33 40 00 E8 ?? ?? ?? ?? 8D 45 F0 BA 58 33 40 00 E8 ?? ?? ?? ?? EB 1A 8D 45 F8 BA ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 F0 BA ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B C7 E8 ?? ?? ?? ?? 8B 45 F8 E8 ?? ?? ?? ?? B9 06 00 00 00 99 F7 F9 8B D8 85 DB 7E 57 8D 45 F4 50 B9 06 00 00 00 BA 01 00 00 00 8B 45 F8 E8 ?? ?? ?? ?? 8D 45 EC 8B 55 F4 E8 ?? ?? ?? ?? 8D 85 E8 FB FF FF 8B 55 EC 8A 92 ?? ?? ?? ?? E8 } 614 | condition: 615 | $c0 616 | } 617 | 618 | 619 | rule FGint_RSAEncrypt 620 | { meta: 621 | author = "_pusher_" 622 | date = "2015-05" 623 | description = "FGint RSAEncrypt" 624 | strings: 625 | $c0 = { 55 8B EC 83 C4 D0 53 56 57 33 DB 89 5D D0 89 5D DC 89 5D D8 89 5D D4 8B F9 89 55 F8 89 45 FC 8B 45 FC E8 ?? ?? ?? ?? 8D 45 F0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 8D 55 E0 B8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 55 DC 8B C7 E8 ?? ?? ?? ?? 8B 45 DC E8 ?? ?? ?? ?? 8B D8 8D 55 DC 8B 45 FC E8 ?? ?? ?? ?? 8D 45 DC 8B 4D DC BA ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B F3 4E EB 10 } 626 | condition: 627 | $c0 628 | } 629 | 630 | rule FGint_RsaDecrypt 631 | { meta: 632 | author = "Maxx" 633 | description = "FGint RsaDecrypt" 634 | strings: 635 | $c0 = { 55 8B EC 83 C4 A0 53 56 57 33 DB 89 5D A0 89 5D A4 89 5D A8 89 5D B4 89 5D B0 89 5D AC 89 4D F8 8B FA 89 45 FC 8B 45 FC E8 ?? ?? ?? ?? 8D 45 F0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 D8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 D0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 C8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 C0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 B8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 33 C0 55 } 636 | condition: 637 | $c0 638 | } 639 | 640 | rule FGint_RSAVerify 641 | { meta: 642 | author = "_pusher_" 643 | description = "FGint RSAVerify" 644 | strings: 645 | $c0 = { 55 8B EC 83 C4 E0 53 56 8B F1 89 55 F8 89 45 FC 8B 5D 0C 8B 45 FC E8 ?? ?? ?? ?? 8B 45 F8 E8 ?? ?? ?? ?? 8D 45 F0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 8D 55 E8 8B 45 F8 E8 ?? ?? ?? ?? 8D 55 F0 8B 45 FC E8 ?? ?? ?? ?? 8D 4D E0 8B D3 8D 45 F0 E8 ?? ?? ?? ?? 8D 55 F0 8D 45 E0 E8 ?? ?? ?? ?? 8D 45 E0 50 8B CB 8B D6 8D 45 E8 E8 ?? ?? ?? ?? 8D 55 E8 8D 45 E0 E8 ?? ?? ?? ?? 8D 55 F0 8D 45 E8 E8 ?? ?? ?? ?? 3C 02 8B 45 08 0F 94 00 8D 45 E8 E8 ?? ?? ?? ?? 8D 45 F0 E8 ?? ?? ?? ?? 33 C0 5A 59 59 64 89 10 68 ?? ?? ?? ?? 8D 45 E0 8B 15 ?? ?? ?? ?? B9 03 00 00 00 E8 ?? ?? ?? ?? 8D 45 F8 BA 02 00 00 00 E8 ?? ?? ?? ?? C3 } 646 | condition: 647 | $c0 648 | } 649 | 650 | rule FGint_FindPrimeGoodCurveAndPoint 651 | { meta: 652 | author = "_pusher_" 653 | date = "2015-06" 654 | description = "FGint FindPrimeGoodCurveAndPoint" 655 | version = "0.1" 656 | strings: 657 | $c0 = { 55 8B EC 83 C4 F4 53 56 57 33 DB 89 5D F4 89 4D FC 8B FA 8B F0 33 C0 55 } 658 | condition: 659 | $c0 660 | } 661 | 662 | rule FGint_ECElGamalEncrypt 663 | { meta: 664 | author = "_pusher_" 665 | date = "2016-08" 666 | description = "FGint ECElGamalEncrypt" 667 | version = "0.1" 668 | strings: 669 | $c0 = { 55 8B EC 81 C4 3C FF FF FF 53 56 57 33 DB 89 5D D8 89 5D D4 89 5D D0 8B 75 10 8D 7D 8C A5 A5 A5 A5 A5 8B 75 14 8D 7D A0 A5 A5 A5 A5 A5 8B 75 18 8D 7D DC A5 A5 8B 75 1C 8D 7D E4 A5 A5 8B F1 8D 7D EC A5 A5 8B F2 8D 7D F4 A5 A5 89 45 FC 8B 45 FC E8 ?? ?? ?? ?? 8D 45 F4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 EC 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 DC 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 A0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 8C 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 85 78 FF FF FF 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 85 64 FF FF FF 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 85 50 FF FF FF 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 85 3C FF FF FF 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 C4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 BC 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 B4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 7D CF } 670 | $c1 = { 55 8B EC 83 C4 A8 53 56 57 33 DB 89 5D A8 89 5D AC 89 5D BC 89 5D B8 89 5D B4 89 4D F4 89 55 F8 89 45 FC 8B 75 0C 8B 45 FC E8 ?? ?? ?? ?? 8D 45 E8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 D8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 D0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 C8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 C0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 33 C0 55 68 71 14 41 00 64 FF 30 64 89 20 8D 55 BC 8B C6 E8 ?? ?? ?? ?? 8B 45 BC E8 ?? ?? ?? ?? 8B D8 8D 55 BC 8B 45 FC E8 ?? ?? ?? ?? 8D 45 BC 8B 4D BC BA 8C 14 41 00 E8 ?? ?? ?? ?? 8B FB 4F EB 10 8D 45 BC 8B 4D BC BA 98 14 41 00 E8 ?? ?? ?? ?? 8B 45 BC } 671 | condition: 672 | $c0 or $c1 673 | } 674 | 675 | rule FGint_ECAddPoints 676 | { meta: 677 | author = "_pusher_" 678 | date = "2015-06" 679 | description = "FGint ECAddPoints" 680 | version = "0.1" 681 | strings: 682 | $c0 = { 55 8B EC 83 C4 A8 53 56 57 8B 75 0C 8D 7D F0 A5 A5 8B F1 8D 7D F8 A5 A5 8B F2 8D 7D A8 A5 A5 A5 A5 A5 8B F0 8D 7D BC A5 A5 A5 A5 A5 8B 5D 08 8D 45 BC 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 A8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 F8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 F0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 D8 8B 15 ?? ?? ?? ?? E8 } 683 | condition: 684 | $c0 685 | } 686 | 687 | rule FGint_ECPointKMultiple 688 | { meta: 689 | author = "_pusher_" 690 | date = "2015-06" 691 | description = "FGint ECPointKMultiple" 692 | version = "0.1" 693 | strings: 694 | $c0 = { 55 8B EC 83 C4 BC 53 56 57 33 DB 89 5D E4 8B 75 0C 8D 7D E8 A5 A5 8B F1 8D 7D F0 A5 A5 8B F2 8D 7D F8 A5 A5 8B F0 8D 7D D0 A5 A5 A5 A5 A5 8B 5D 08 8D 45 D0 8B 15 ?? ?? ?? 00 E8 ?? ?? ?? ?? 8D 45 F8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 F0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 BC 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 33 C0 55 68 } 695 | condition: 696 | $c0 697 | } 698 | 699 | rule FGint_ECPointDestroy 700 | { meta: 701 | author = "_pusher_" 702 | date = "2015-06" 703 | description = "FGint ECPointDestroy" 704 | version = "0.1" 705 | strings: 706 | $c0 = { 53 8B D8 8B C3 E8 ?? ?? ?? ?? 8D 43 08 E8 ?? ?? ?? ?? 5B C3 } 707 | condition: 708 | $c0 709 | } 710 | 711 | rule FGint_DSAPrimeSearch 712 | { meta: 713 | author = "_pusher_" 714 | date = "2016-08" 715 | description = "FGint DSAPrimeSearch" 716 | version = "0.1" 717 | strings: 718 | $c0 = { 55 8B EC 83 C4 DC 53 56 8B DA 8B F0 8D 45 F8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 F0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 8D 4D F8 8B D6 8B C6 E8 ?? ?? ?? ?? 8D 4D E8 8B D6 8B C3 E8 ?? ?? ?? ?? 8D 55 F0 B8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 4D E0 8D 55 E8 8B C3 E8 ?? ?? ?? ?? 8D 45 E8 E8 ?? ?? ?? ?? 8D 4D E8 8D 55 F0 8D 45 E0 E8 ?? ?? ?? ?? 8D 45 E0 E8 ?? ?? ?? ?? 8D 45 F0 E8 ?? ?? ?? ?? 8B 45 EC 8B 40 04 83 E0 01 85 C0 75 18 8D 4D E0 8B D6 8D 45 E8 E8 ?? ?? ?? ?? 8D 55 E8 8D 45 E0 E8 ?? ?? ?? ?? 8B D3 8D 45 E8 E8 ?? ?? ?? ?? C6 45 DF 00 EB 26 8D 4D E8 8D 55 F8 8B C3 E8 ?? ?? ?? ?? 8B D3 8D 45 E8 E8 ?? ?? ?? ?? 8D 4D DF 8B C3 BA 05 00 00 00 E8 ?? ?? ?? ?? 80 7D DF 00 74 D4 8D 45 F8 E8 ?? ?? ?? ?? 33 C0 5A 59 59 64 89 10 68 ?? ?? ?? ?? 8D 45 E0 8B 15 ?? ?? ?? ?? B9 04 00 00 00 E8 ?? ?? ?? ?? C3 } 719 | condition: 720 | $c0 721 | } 722 | 723 | rule FGint_DSASign 724 | { meta: 725 | author = "_pusher_" 726 | date = "2016-08" 727 | description = "FGint DSASign" 728 | version = "0.1" 729 | strings: 730 | $c0 = { 55 8B EC 83 C4 CC 53 56 57 89 4D FC 8B DA 8B F8 8B 75 14 8B 45 10 E8 ?? ?? ?? ?? 8D 45 F4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 EC 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 DC 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 D4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 CC 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 8D 45 F4 50 8B CF 8B D6 8B 45 FC E8 ?? ?? ?? ?? 8D 4D D4 8B D3 8D 45 F4 E8 ?? ?? ?? ?? 8D 45 F4 E8 ?? ?? ?? ?? 8D 4D F4 8B D3 8B C6 E8 ?? ?? ?? ?? 8D 55 EC 8B 45 10 E8 ?? ?? ?? ?? 8D 45 E4 50 8B CB 8D 55 D4 8B 45 18 E8 ?? ?? ?? ?? 8D 4D DC 8D 55 E4 8D 45 EC E8 ?? ?? ?? ?? 8D 45 EC E8 ?? ?? ?? ?? 8D 45 E4 E8 ?? ?? ?? ?? 8D 45 CC 50 8B CB 8D 55 DC 8D 45 F4 E8 ?? ?? ?? ?? 8D 45 F4 E8 ?? ?? ?? ?? 8D 45 DC E8 ?? ?? ?? ?? 8B 55 0C 8D 45 D4 E8 ?? ?? ?? ?? 8B 55 08 8D 45 CC E8 ?? ?? ?? ?? 8D 45 D4 E8 ?? ?? ?? ?? 8D 45 CC E8 ?? ?? ?? ?? 33 C0 5A 59 59 64 89 10 68 ?? ?? ?? ?? 8D 45 CC 8B 15 ?? ?? ?? ?? B9 06 00 00 00 E8 } 731 | condition: 732 | $c0 733 | } 734 | 735 | rule FGint_DSAVerify 736 | { meta: 737 | author = "_pusher_" 738 | date = "2016-08" 739 | description = "FGint DSAVerify" 740 | version = "0.1" 741 | strings: 742 | $c0 = { 55 8B EC 83 C4 B4 53 56 57 89 4D FC 8B DA 8B F0 8B 7D 08 8B 45 14 E8 ?? ?? ?? ?? 8B 45 10 E8 ?? ?? ?? ?? 8B 45 0C E8 ?? ?? ?? ?? 8D 45 F4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 EC 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 DC 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 D4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 CC 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 C4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 BC 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 B4 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 8D 55 CC 8B 45 0C E8 ?? ?? ?? ?? 8D 4D F4 8B D3 8D 45 CC E8 ?? ?? ?? ?? 8D 55 C4 8B 45 14 E8 ?? ?? ?? ?? 8D 45 EC 50 8B CB 8D 55 F4 8D 45 C4 E8 ?? ?? ?? ?? 8D 45 C4 E8 ?? ?? ?? ?? 8D 55 D4 8B 45 10 E8 ?? ?? ?? ?? 8D 45 E4 50 8B CB 8D 55 F4 8D 45 D4 E8 ?? ?? ?? ?? 8D 45 F4 E8 ?? ?? ?? ?? 8D 45 C4 50 8B CE 8D 55 EC 8B 45 FC E8 ?? ?? ?? ?? 8D 45 BC 50 8B CE 8D 55 E4 8B 45 18 E8 ?? ?? ?? ?? 8D 45 B4 50 8B CE 8D 55 BC 8D 45 C4 E8 ?? ?? ?? ?? 8D 45 C4 E8 } 743 | condition: 744 | $c0 745 | } 746 | 747 | 748 | rule DES_Long 749 | { meta: 750 | author = "_pusher_" 751 | date = "2015-05" 752 | description = "DES [long]" 753 | strings: 754 | $c0 = { 10 80 10 40 00 00 00 00 00 80 10 00 00 00 10 40 10 00 00 40 10 80 00 00 00 80 00 40 00 80 10 00 00 80 00 00 10 00 10 40 10 00 00 00 00 80 00 40 10 00 10 00 00 80 10 40 00 00 10 40 10 00 00 00 } 755 | condition: 756 | $c0 757 | } 758 | 759 | rule DES_sbox 760 | { meta: 761 | author = "_pusher_" 762 | date = "2015-05" 763 | description = "DES [sbox]" 764 | strings: 765 | $c0 = { 00 04 01 01 00 00 00 00 00 00 01 00 04 04 01 01 04 00 01 01 04 04 01 00 04 00 00 00 00 00 01 00 00 04 00 00 00 04 01 01 04 04 01 01 00 04 00 00 04 04 00 01 04 00 01 01 00 00 00 01 04 00 00 00 } 766 | condition: 767 | $c0 768 | } 769 | 770 | rule DES_pbox_long 771 | { meta: 772 | author = "_pusher_" 773 | date = "2015-05" 774 | description = "DES [pbox] [long]" 775 | strings: 776 | $c0 = { 0F 00 00 00 06 00 00 00 13 00 00 00 14 00 00 00 1C 00 00 00 0B 00 00 00 1B 00 00 00 10 00 00 00 00 00 00 00 0E 00 00 00 16 00 00 00 19 00 00 00 04 00 00 00 11 00 00 00 1E 00 00 00 09 00 00 00 01 00 00 00 07 00 00 00 17 00 00 00 0D 00 00 00 1F 00 00 00 1A 00 00 00 02 00 00 00 08 00 00 00 12 00 00 00 0C 00 00 00 1D 00 00 00 05 00 00 00 } 777 | condition: 778 | $c0 779 | } 780 | 781 | rule OpenSSL_BN_mod_exp2_mont 782 | { meta: 783 | author = "Maxx" 784 | description = "OpenSSL BN_mod_exp2_mont" 785 | strings: 786 | $c0 = { B8 30 05 00 00 E8 ?? ?? ?? ?? 8B 84 24 48 05 00 00 53 33 DB 56 8B 08 57 89 5C 24 24 89 5C 24 30 8A 01 89 5C 24 28 A8 01 89 5C 24 0C 75 24 68 89 00 00 00 68 ?? ?? ?? ?? 6A 66 6A 76 6A 03 E8 ?? ?? ?? ?? 83 C4 14 33 C0 5F 5E 5B 81 C4 30 05 00 00 C3 8B 94 24 48 05 00 00 52 E8 ?? ?? ?? ?? 8B F0 8B 84 24 54 05 00 00 50 E8 ?? ?? ?? ?? 83 C4 08 3B F3 8B F8 75 20 3B FB 75 1C 8B 8C 24 40 05 00 00 6A 01 51 E8 ?? ?? ?? ?? 83 C4 08 5F 5E 5B 81 C4 30 05 00 00 C3 3B F7 89 74 24 18 7F 04 89 } 787 | condition: 788 | $c0 789 | } 790 | 791 | rule OpenSSL_BN_mod_exp_mont 792 | { meta: 793 | author = "Maxx" 794 | description = "OpenSSL BN_mod_exp_mont" 795 | strings: 796 | $c0 = { B8 A0 02 00 00 E8 ?? ?? ?? ?? 53 56 57 8B BC 24 BC 02 00 00 33 F6 8B 07 89 74 24 24 89 74 24 20 89 74 24 0C F6 00 01 75 24 68 72 01 00 00 68 ?? ?? ?? ?? 6A 66 6A 6D 6A 03 E8 ?? ?? ?? ?? 83 C4 14 33 C0 5F 5E 5B 81 C4 A0 02 00 00 C3 8B 8C 24 B8 02 00 00 51 E8 ?? ?? ?? ?? 8B D8 83 C4 04 3B DE 89 5C 24 18 75 1C 8B 94 24 B0 02 00 00 6A 01 52 E8 ?? ?? ?? ?? 83 C4 08 5F 5E 5B 81 C4 A0 02 00 00 C3 55 8B AC 24 C4 02 00 00 55 E8 ?? ?? ?? ?? 55 E8 ?? ?? ?? ?? 8B F0 55 89 74 24 24 E8 } 797 | condition: 798 | $c0 799 | } 800 | 801 | rule OpenSSL_BN_mod_exp_recp 802 | { meta: 803 | author = "Maxx" 804 | description = "OpenSSL BN_mod_exp_recp" 805 | strings: 806 | $c0 = { B8 C8 02 00 00 E8 ?? ?? ?? ?? 8B 84 24 D4 02 00 00 55 56 33 F6 50 89 74 24 1C 89 74 24 18 E8 ?? ?? ?? ?? 8B E8 83 C4 04 3B EE 89 6C 24 0C 75 1B 8B 8C 24 D4 02 00 00 6A 01 51 E8 ?? ?? ?? ?? 83 C4 08 5E 5D 81 C4 C8 02 00 00 C3 53 57 8B BC 24 EC 02 00 00 57 E8 ?? ?? ?? ?? 57 E8 ?? ?? ?? ?? 8B D8 83 C4 08 3B DE 0F 84 E7 02 00 00 8D 54 24 24 52 E8 ?? ?? ?? ?? 8B B4 24 EC 02 00 00 83 C4 04 8B 46 0C 85 C0 74 32 56 53 E8 ?? ?? ?? ?? 83 C4 08 85 C0 0F 84 BA 02 00 00 57 8D 44 24 28 53 } 807 | condition: 808 | $c0 809 | } 810 | 811 | rule OpenSSL_BN_mod_exp_simple 812 | { meta: 813 | author = "Maxx" 814 | description = "OpenSSL BN_mod_exp_simple" 815 | strings: 816 | $c0 = { B8 98 02 00 00 E8 ?? ?? ?? ?? 8B 84 24 A4 02 00 00 55 56 33 ED 50 89 6C 24 1C 89 6C 24 18 E8 ?? ?? ?? ?? 8B F0 83 C4 04 3B F5 89 74 24 0C 75 1B 8B 8C 24 A4 02 00 00 6A 01 51 E8 ?? ?? ?? ?? 83 C4 08 5E 5D 81 C4 98 02 00 00 C3 53 57 8B BC 24 BC 02 00 00 57 E8 ?? ?? ?? ?? 57 E8 ?? ?? ?? ?? 8B D8 83 C4 08 3B DD 0F 84 71 02 00 00 8D 54 24 28 52 E8 ?? ?? ?? ?? 8B AC 24 BC 02 00 00 8B 84 24 B4 02 00 00 57 55 8D 4C 24 34 50 51 C7 44 24 30 01 00 00 00 E8 ?? ?? ?? ?? 83 C4 14 85 C0 0F } 817 | condition: 818 | $c0 819 | } 820 | 821 | rule OpenSSL_BN_mod_exp_inverse 822 | { meta: 823 | author = "Maxx" 824 | description = "OpenSSL BN_mod_exp_inverse" 825 | strings: 826 | $c0 = { B8 18 00 00 00 E8 ?? ?? ?? ?? 53 55 56 57 8B 7C 24 38 33 C0 57 89 44 24 20 89 44 24 24 E8 ?? ?? ?? ?? 57 E8 ?? ?? ?? ?? 57 89 44 24 1C E8 ?? ?? ?? ?? 57 8B F0 E8 ?? ?? ?? ?? 57 89 44 24 28 E8 ?? ?? ?? ?? 57 8B E8 E8 ?? ?? ?? ?? 57 8B D8 E8 ?? ?? ?? ?? 8B F8 8B 44 24 54 50 89 7C 24 38 E8 ?? ?? ?? ?? 83 C4 20 89 44 24 24 85 C0 8B 44 24 2C 0F 84 78 05 00 00 85 C0 75 05 E8 ?? ?? ?? ?? 85 C0 89 44 24 1C 0F 84 63 05 00 00 8B 4C 24 14 6A 01 51 E8 ?? ?? ?? ?? 6A 00 57 E8 } 827 | condition: 828 | $c0 829 | } 830 | 831 | rule OpenSSL_DSA 832 | { 833 | meta: 834 | author="_pusher_" 835 | date="2016-08" 836 | strings: 837 | $a0 = "bignum_data" wide ascii nocase 838 | $a1 = "DSA_METHOD" wide ascii nocase 839 | $a2 = "PDSA" wide ascii nocase 840 | $a3 = "dsa_mod_exp" wide ascii nocase 841 | $a4 = "bn_mod_exp" wide ascii nocase 842 | $a5 = "dsa_do_verify" wide ascii nocase 843 | $a6 = "dsa_sign_setup" wide ascii nocase 844 | $a7 = "dsa_do_sign" wide ascii nocase 845 | $a8 = "dsa_paramgen" wide ascii nocase 846 | $a9 = "BN_MONT_CTX" wide ascii nocase 847 | condition: 848 | 7 of ($a*) 849 | } 850 | 851 | rule FGint_RsaSign 852 | { meta: 853 | author = "Maxx" 854 | description = "FGint RsaSign" 855 | strings: 856 | $c0 = { 55 8B EC 83 C4 B8 53 56 57 89 4D F8 8B FA 89 45 FC 8B 75 0C 8B 5D 10 8B 45 FC E8 ?? ?? ?? ?? 8D 45 F0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 E0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 D8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 D0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 C8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 C0 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 45 B8 8B 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 8D 55 F0 } 857 | condition: 858 | $c0 859 | } 860 | 861 | 862 | rule LockBox_RsaEncryptFile 863 | { meta: 864 | author = "Maxx" 865 | description = "LockBox RsaEncryptFile" 866 | strings: 867 | $c0 = { 55 8B EC 83 C4 F8 53 56 8B F1 8B DA 6A 20 8B C8 B2 01 A1 ?? ?? ?? ?? E8 ?? ?? ?? ?? 89 45 FC 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 68 FF FF 00 00 8B CB B2 01 A1 ?? ?? ?? ?? E8 ?? ?? ?? ?? 89 45 F8 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 8A 45 08 50 8B CE 8B 55 F8 8B 45 FC E8 ?? ?? ?? ?? 33 C0 5A 59 59 64 89 10 68 ?? ?? ?? ?? 8B 45 F8 E8 ?? ?? ?? ?? C3 } 868 | condition: 869 | $c0 870 | } 871 | 872 | rule LockBox_DecryptRsaEx 873 | { meta: 874 | author = "Maxx" 875 | description = "LockBox DecryptRsaEx" 876 | strings: 877 | $c0 = { 55 8B EC 83 C4 F4 53 56 57 89 4D F8 89 55 FC 8B D8 33 C0 8A 43 04 0F B7 34 45 ?? ?? ?? ?? 0F B7 3C 45 ?? ?? ?? ?? 8B CE B2 01 A1 ?? ?? ?? ?? E8 ?? ?? ?? ?? 89 45 F4 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 8B 55 FC 8B CE 8B 45 F4 E8 ?? ?? ?? ?? 6A 00 B1 02 8B D3 8B 45 F4 E8 ?? ?? ?? ?? 8B 45 F4 E8 ?? ?? ?? ?? 3B C7 7E 16 B9 ?? ?? ?? ?? B2 01 A1 ?? ?? ?? ?? E8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B 45 F4 E8 ?? ?? ?? ?? 8B C8 8B 55 F8 8B 45 F4 E8 ?? ?? ?? ?? 33 C0 5A 59 59 64 89 10 68 } 878 | condition: 879 | $c0 880 | } 881 | 882 | rule LockBox_EncryptRsaEx 883 | { meta: 884 | author = "Maxx" 885 | description = "LockBox EncryptRsaEx" 886 | strings: 887 | $c0 = { 55 8B EC 83 C4 F8 53 56 57 89 4D FC 8B FA 8B F0 33 C0 8A 46 04 0F B7 1C 45 ?? ?? ?? ?? 8B CB B2 01 A1 ?? ?? ?? ?? E8 ?? ?? ?? ?? 89 45 F8 33 C0 55 68 ?? ?? ?? ?? 64 FF 30 64 89 20 8B D7 8B 4D 08 8B 45 F8 E8 ?? ?? ?? ?? 6A 01 B1 02 8B D6 8B 45 F8 E8 ?? ?? ?? ?? 8B 45 F8 E8 ?? ?? ?? ?? 3B C3 7E 16 B9 ?? ?? ?? ?? B2 01 A1 ?? ?? ?? ?? E8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B 45 F8 E8 ?? ?? ?? ?? 8B C8 8B 55 FC 8B 45 F8 E8 ?? ?? ?? ?? 33 C0 5A 59 59 64 89 10 68 ?? ?? ?? ?? 8B 45 F8 E8 } 888 | condition: 889 | $c0 890 | } 891 | 892 | rule LockBox_TlbRsaKey 893 | { meta: 894 | author = "Maxx" 895 | description = "LockBox TlbRsaKey" 896 | strings: 897 | $c0 = { 53 56 84 D2 74 08 83 C4 F0 E8 ?? ?? ?? ?? 8B DA 8B F0 33 D2 8B C6 E8 ?? ?? ?? ?? 33 C0 8A 46 04 8B 15 ?? ?? ?? ?? 0F B7 0C 42 B2 01 A1 ?? ?? ?? ?? E8 ?? ?? ?? ?? 89 46 0C 33 C0 8A 46 04 8B 15 ?? ?? ?? ?? 0F B7 0C 42 B2 01 A1 ?? ?? ?? ?? E8 ?? ?? ?? ?? 89 46 10 8B C6 84 DB 74 0F E8 ?? ?? ?? ?? 64 8F 05 00 00 00 00 83 C4 0C 8B C6 5E 5B C3 } 898 | condition: 899 | $c0 900 | } 901 | 902 | rule BigDig_bpInit 903 | { meta: 904 | author = "Maxx" 905 | description = "BigDig bpInit" 906 | strings: 907 | $c0 = { 56 8B 74 24 0C 6A 04 56 E8 ?? ?? ?? ?? 8B C8 8B 44 24 10 83 C4 08 85 C9 89 08 75 04 33 C0 5E C3 89 70 08 C7 40 04 00 00 00 00 5E C3 } 908 | condition: 909 | $c0 910 | } 911 | 912 | rule BigDig_mpModExp 913 | { meta: 914 | author = "Maxx" 915 | description = "BigDig mpModExp" 916 | strings: 917 | $c0 = { 56 8B 74 24 18 85 F6 75 05 83 C8 FF 5E C3 53 55 8B 6C 24 18 57 56 55 E8 ?? ?? ?? ?? 8B D8 83 C4 08 BF 00 00 00 80 8B 44 9D FC 85 C7 75 04 D1 EF 75 F8 83 FF 01 75 08 BF 00 00 00 80 4B EB 02 D1 EF 8B 44 24 18 56 8B 74 24 18 50 56 E8 ?? ?? ?? ?? 83 C4 0C 85 DB 74 4F 8D 6C 9D FC 8B 4C 24 24 8B 54 24 20 51 52 56 56 56 E8 ?? ?? ?? ?? 8B 45 00 83 C4 14 85 C7 74 19 8B 44 24 24 8B 4C 24 20 8B 54 24 18 50 51 52 56 56 E8 ?? ?? ?? ?? 83 C4 14 83 FF 01 75 0B 4B BF 00 00 00 80 83 ED 04 EB } 918 | condition: 919 | $c0 920 | } 921 | 922 | rule BigDig_mpModInv 923 | { meta: 924 | author = "Maxx" 925 | description = "BigDig mpModInv" 926 | strings: 927 | $c0 = { 81 EC 2C 07 00 00 8D 84 24 CC 00 00 00 53 56 8B B4 24 44 07 00 00 57 56 6A 01 50 E8 ?? ?? ?? ?? 8B 8C 24 4C 07 00 00 56 8D 94 24 80 02 00 00 51 52 E8 ?? ?? ?? ?? 8D 84 24 BC 01 00 00 56 50 E8 ?? ?? ?? ?? 8B 9C 24 64 07 00 00 56 8D 4C 24 30 53 51 E8 ?? ?? ?? ?? 8D 54 24 38 56 52 BF 01 00 00 00 E8 ?? ?? ?? ?? 83 C4 34 85 C0 0F 85 ED 00 00 00 8D 44 24 0C 56 50 8D 8C 24 78 02 00 00 56 8D 94 24 48 03 00 00 51 8D 84 24 18 04 00 00 52 50 E8 ?? ?? ?? ?? 8D 8C 24 BC 01 00 00 56 8D 94 } 928 | condition: 929 | $c0 930 | } 931 | 932 | rule BigDig_mpModMult 933 | { meta: 934 | author = "Maxx" 935 | description = "BigDig mpModMult" 936 | strings: 937 | $c0 = { 8B 44 24 0C 8B 4C 24 08 81 EC 98 01 00 00 8D 54 24 00 56 8B B4 24 B0 01 00 00 57 56 50 51 52 E8 ?? ?? ?? ?? 8B 84 24 C0 01 00 00 8B 94 24 B4 01 00 00 8D 3C 36 56 50 8D 4C 24 20 57 51 52 E8 ?? ?? ?? ?? 8D 44 24 2C 57 50 E8 ?? ?? ?? ?? 83 C4 2C 33 C0 5F 5E 81 C4 98 01 00 00 C3 } 938 | condition: 939 | $c0 940 | } 941 | 942 | rule BigDig_mpModulo 943 | { meta: 944 | author = "Maxx" 945 | description = "BigDig mpModulo" 946 | strings: 947 | $c0 = { 8B 44 24 10 81 EC 30 03 00 00 8B 8C 24 38 03 00 00 8D 54 24 00 56 8B B4 24 40 03 00 00 57 8B BC 24 4C 03 00 00 57 50 56 51 8D 84 24 B0 01 00 00 52 50 E8 ?? ?? ?? ?? 8B 94 24 54 03 00 00 8D 4C 24 20 57 51 52 E8 ?? ?? ?? ?? 8D 44 24 2C 56 50 E8 ?? ?? ?? ?? 8D 8C 24 CC 01 00 00 56 51 E8 ?? ?? ?? ?? 83 C4 34 33 C0 5F 5E 81 C4 30 03 00 00 C3 } 948 | condition: 949 | $c0 950 | } 951 | 952 | rule BigDig_spModExpB 953 | { meta: 954 | author = "Maxx" 955 | description = "BigDig spModExpB" 956 | strings: 957 | $c0 = { 53 8B 5C 24 10 55 56 BE 00 00 00 80 85 F3 75 04 D1 EE 75 F8 8B 6C 24 14 8B C5 D1 EE 89 44 24 18 74 48 57 8B 7C 24 20 EB 04 8B 44 24 1C 57 50 50 8D 44 24 28 50 E8 ?? ?? ?? ?? 83 C4 10 85 F3 74 14 8B 4C 24 1C 57 55 8D 54 24 24 51 52 E8 ?? ?? ?? ?? 83 C4 10 D1 EE 75 D0 8B 44 24 14 8B 4C 24 1C 5F 5E 89 08 5D 33 C0 5B C3 8B 54 24 10 5E 5D 5B 89 02 33 C0 C3 } 958 | condition: 959 | $c0 960 | } 961 | 962 | rule BigDig_spModInv 963 | { meta: 964 | author = "Maxx" 965 | description = "BigDig spModInv" 966 | strings: 967 | $c0 = { 51 8B 4C 24 10 55 56 BD 01 00 00 00 33 F6 57 8B 7C 24 18 89 6C 24 0C 85 C9 74 42 53 8B C7 33 D2 F7 F1 8B C7 8B F9 8B DA 33 D2 F7 F1 8B CB 0F AF C6 03 C5 8B EE 8B F0 8B 44 24 10 F7 D8 85 DB 89 44 24 10 75 D7 85 C0 5B 7D 13 8B 44 24 1C 8B 4C 24 14 2B C5 5F 89 01 5E 33 C0 5D 59 C3 8B 54 24 14 5F 5E 33 C0 89 2A 5D 59 C3 } 968 | condition: 969 | $c0 970 | } 971 | 972 | rule BigDig_spModMult 973 | { meta: 974 | author = "Maxx" 975 | description = "BigDig spModMult" 976 | strings: 977 | $c0 = { 8B 44 24 0C 8B 4C 24 08 83 EC 08 8D 54 24 00 50 51 52 E8 ?? ?? ?? ?? 8B 44 24 24 6A 02 8D 4C 24 10 50 51 E8 ?? ?? ?? ?? 8B 54 24 24 89 02 33 C0 83 C4 20 C3 } 978 | condition: 979 | $c0 980 | } 981 | 982 | rule CryptoPP_ApplyFunction 983 | { meta: 984 | author = "Maxx" 985 | description = "CryptoPP ApplyFunction" 986 | strings: 987 | $c0 = { 51 8D 41 E4 56 8B 74 24 0C 83 C1 F0 50 51 8B 4C 24 18 C7 44 24 0C 00 00 00 00 51 56 E8 ?? ?? ?? ?? 83 C4 10 8B C6 5E 59 C2 08 00 } 988 | $c1 = { 51 53 56 8B F1 57 6A 00 C7 44 24 10 00 00 00 00 8B 46 04 8B 48 04 8B 5C 31 04 8D 7C 31 04 E8 ?? ?? ?? ?? 50 8B CF FF 53 10 8B 44 24 18 8D 56 08 83 C6 1C 52 56 8B 74 24 1C 50 56 E8 ?? ?? ?? ?? 83 C4 10 8B C6 5F 5E 5B 59 C2 08 00 } 989 | condition: 990 | any of them 991 | } 992 | 993 | rule CryptoPP_RsaFunction 994 | { meta: 995 | author = "Maxx" 996 | description = "CryptoPP RsaFunction" 997 | strings: 998 | $c0 = { 6A FF 68 ?? ?? ?? ?? 64 A1 00 00 00 00 50 64 89 25 00 00 00 00 81 EC 9C 00 00 00 8B 84 24 B0 00 00 00 53 55 56 33 ED 8B F1 57 3B C5 89 B4 24 A8 00 00 00 89 6C 24 10 BF 01 00 00 00 74 18 C7 06 ?? ?? ?? ?? C7 46 20 ?? ?? ?? ?? 89 7C 24 10 89 AC 24 B4 00 00 00 8D 4E 04 E8 ?? ?? ?? ?? 8D 4E 10 89 BC 24 B4 00 00 00 E8 ?? ?? ?? ?? 8B 06 BB ?? ?? ?? ?? BF ?? ?? ?? ?? 8B 48 04 C7 04 31 ?? ?? ?? ?? 8B 16 8B 42 04 8B 54 24 10 83 CA 02 8D 48 E0 89 54 24 10 89 4C 30 FC 89 5C 24 18 89 7C } 999 | $c1 = { 6A FF 68 ?? ?? ?? ?? 64 A1 00 00 00 00 50 64 89 25 00 00 00 00 83 EC 08 8B 44 24 1C 53 8B 5C 24 1C 56 8B F1 57 33 C9 89 74 24 10 3B C1 89 4C 24 0C 74 7B C7 46 04 ?? ?? ?? ?? C7 46 3C ?? ?? ?? ?? C7 46 30 ?? ?? ?? ?? C7 46 34 ?? ?? ?? ?? 3B D9 75 06 89 4C 24 28 EB 0E 8B 43 04 8B 50 0C 8D 44 1A 04 89 44 24 28 8B 56 3C C7 44 24 0C 07 00 00 00 8B 42 04 C7 44 30 3C ?? ?? ?? ?? 8B 56 3C 8B 42 08 C7 44 30 3C ?? ?? ?? ?? 8B 56 3C C7 46 38 ?? ?? ?? ?? 8B 42 04 C7 44 30 3C } 1000 | $c2 = { 6A FF 68 ?? ?? ?? ?? 64 A1 00 00 00 00 50 64 89 25 00 00 00 00 83 EC 08 8B 44 24 18 56 8B F1 57 85 C0 89 74 24 0C C7 44 24 08 00 00 00 00 74 63 C7 46 04 ?? ?? ?? ?? C7 46 3C ?? ?? ?? ?? C7 46 30 ?? ?? ?? ?? C7 46 34 ?? ?? ?? ?? 8B 46 3C C7 44 24 08 07 00 00 00 8B 48 04 C7 44 31 3C ?? ?? ?? ?? 8B 56 3C 8B 42 08 C7 44 30 3C ?? ?? ?? ?? 8B 4E 3C C7 46 38 ?? ?? ?? ?? 8B 51 04 C7 44 32 3C ?? ?? ?? ?? 8B 46 3C 8B 48 08 C7 44 31 3C ?? ?? ?? ?? C7 06 ?? ?? ?? ?? 8D 7E 04 6A 00 8B CF } 1001 | condition: 1002 | any of them 1003 | } 1004 | 1005 | rule CryptoPP_Integer_constructor 1006 | { meta: 1007 | author = "Maxx" 1008 | description = "CryptoPP Integer constructor" 1009 | strings: 1010 | $c0 = { 8B 44 24 08 56 83 F8 08 8B F1 77 09 8B 14 85 ?? ?? ?? ?? EB 37 83 F8 10 77 07 BA 10 00 00 00 EB 2B 83 F8 20 77 07 BA 20 00 00 00 EB 1F 83 F8 40 77 07 BA 40 00 00 00 EB 13 48 50 E8 ?? ?? ?? ?? BA 01 00 00 00 8B C8 83 C4 04 D3 E2 8D 04 95 00 00 00 00 89 16 50 E8 ?? ?? ?? ?? 8B 4C 24 0C 89 46 04 C7 46 08 00 00 00 00 89 08 8B 0E 8B 46 04 83 C4 04 49 74 0F 57 8D 78 04 33 C0 F3 AB 8B C6 5F 5E C2 08 00 8B C6 5E C2 08 00 } 1011 | $c1 = { 6A FF 68 ?? ?? ?? ?? 64 A1 00 00 00 00 50 64 89 25 00 00 00 00 51 56 8B F1 89 74 24 04 C7 06 ?? ?? ?? ?? 6A 08 C7 44 24 14 00 00 00 00 C7 46 08 02 00 00 00 E8 ?? ?? ?? ?? 89 46 0C C7 46 10 00 00 00 00 C7 06 ?? ?? ?? ?? 8B 46 0C 83 C4 04 C7 40 04 00 00 00 00 8B 4E 0C 8B C6 5E C7 01 00 00 00 00 8B 4C 24 04 64 89 0D 00 00 00 00 83 C4 10 C3 } 1012 | $c2 = { 6A FF 68 ?? ?? ?? ?? 64 A1 00 00 00 00 50 64 89 25 00 00 00 00 51 56 8B F1 57 89 74 24 08 C7 06 ?? ?? ?? ?? 8B 7C 24 1C C7 44 24 14 00 00 00 00 8B CF E8 ?? ?? ?? ?? 83 F8 08 77 09 8B 14 85 ?? ?? ?? ?? EB 37 83 F8 10 77 07 BA 10 00 00 00 EB 2B 83 F8 20 77 07 BA 20 00 00 00 EB 1F 83 F8 40 77 07 BA 40 00 00 00 EB 13 48 50 E8 ?? ?? ?? ?? BA 01 00 00 00 8B C8 83 C4 04 D3 E2 85 D2 89 56 08 76 12 8D 04 95 00 00 00 00 50 E8 ?? ?? ?? ?? 83 C4 04 EB 02 33 C0 89 46 0C 8B 4F 10 89 4E 10 } 1013 | $c3 = { 56 57 8B 7C 24 0C 8B F1 8B CF E8 ?? ?? ?? ?? 83 F8 08 77 09 8B 14 85 ?? ?? ?? ?? EB 37 83 F8 10 77 07 BA 10 00 00 00 EB 2B 83 F8 20 77 07 BA 20 00 00 00 EB 1F 83 F8 40 77 07 BA 40 00 00 00 EB 13 48 50 E8 ?? ?? ?? ?? BA 01 00 00 00 8B C8 83 C4 04 D3 E2 8D 04 95 00 00 00 00 89 16 50 E8 ?? ?? ?? ?? 8B 16 89 46 04 8B 4F 08 83 C4 04 89 4E 08 8B 4F 04 85 D2 76 0D 2B C8 8B 3C 01 89 38 83 C0 04 4A 75 F5 8B C6 5F 5E C2 04 00 } 1014 | condition: 1015 | any of them 1016 | } 1017 | 1018 | rule RijnDael_AES 1019 | { meta: 1020 | author = "_pusher_" 1021 | description = "RijnDael AES" 1022 | date = "2016-06" 1023 | strings: 1024 | $c0 = { A5 63 63 C6 84 7C 7C F8 } 1025 | condition: 1026 | $c0 1027 | } 1028 | 1029 | rule RijnDael_AES_CHAR 1030 | { meta: 1031 | author = "_pusher_" 1032 | description = "RijnDael AES (check2) [char]" 1033 | date = "2016-06" 1034 | strings: 1035 | $c0 = { 63 7C 77 7B F2 6B 6F C5 30 01 67 2B FE D7 AB 76 CA 82 C9 7D FA 59 47 F0 AD D4 A2 AF 9C A4 72 C0 } 1036 | condition: 1037 | $c0 1038 | } 1039 | 1040 | rule RijnDael_AES_CHAR_inv 1041 | { meta: 1042 | author = "_pusher_" 1043 | description = "RijnDael AES S-inv [char]" 1044 | //needs improvement 1045 | date = "2016-07" 1046 | strings: 1047 | $c0 = { 48 38 47 00 88 17 33 D2 8A 56 0D 8A 92 48 38 47 00 88 57 01 33 D2 8A 56 0A 8A 92 48 38 47 00 88 57 02 33 D2 8A 56 07 8A 92 48 38 47 00 88 57 03 33 D2 8A 56 04 8A 92 } 1048 | condition: 1049 | $c0 1050 | } 1051 | 1052 | rule RijnDael_AES_LONG 1053 | { meta: 1054 | author = "_pusher_" 1055 | description = "RijnDael AES" 1056 | date = "2016-06" 1057 | strings: 1058 | $c0 = { 63 7C 77 7B F2 6B 6F C5 30 01 67 2B FE D7 AB 76 CA 82 C9 7D FA 59 47 F0 AD D4 A2 AF 9C A4 72 C0 } 1059 | condition: 1060 | $c0 1061 | } 1062 | 1063 | rule RsaRef2_NN_modExp 1064 | { meta: 1065 | author = "Maxx" 1066 | description = "RsaRef2 NN_modExp" 1067 | strings: 1068 | $c0 = { 81 EC 1C 02 00 00 53 55 56 8B B4 24 30 02 00 00 57 8B BC 24 44 02 00 00 57 8D 84 24 A4 00 00 00 56 50 E8 ?? ?? ?? ?? 8B 9C 24 4C 02 00 00 57 53 8D 8C 24 B4 00 00 00 56 8D 94 24 3C 01 00 00 51 52 E8 ?? ?? ?? ?? 57 53 8D 84 24 4C 01 00 00 56 8D 8C 24 D4 01 00 00 50 51 E8 ?? ?? ?? ?? 8D 54 24 50 57 52 E8 ?? ?? ?? ?? 8B 84 24 78 02 00 00 8B B4 24 74 02 00 00 50 56 C7 44 24 60 01 00 00 00 E8 ?? ?? ?? ?? 8D 48 FF 83 C4 44 8B E9 89 4C 24 18 85 ED 0F 8C AF 00 00 00 8D 34 AE 89 74 24 } 1069 | condition: 1070 | any of them 1071 | } 1072 | 1073 | rule RsaRef2_NN_modInv 1074 | { meta: 1075 | author = "Maxx" 1076 | description = "RsaRef2 NN_modInv" 1077 | strings: 1078 | $c0 = { 81 EC A4 04 00 00 53 56 8B B4 24 BC 04 00 00 57 8D 84 24 ?? 00 00 00 56 50 E8 ?? ?? ?? ?? 8D 8C 24 1C 01 00 00 BF 01 00 00 00 56 51 89 BC 24 A0 00 00 00 E8 ?? ?? ?? ?? 8B 94 24 C8 04 00 00 56 8D 84 24 AC 01 00 00 52 50 E8 ?? ?? ?? ?? 8B 9C 24 D8 04 00 00 56 8D 4C 24 2C 53 51 E8 ?? ?? ?? ?? 8D 54 24 34 56 52 E8 ?? ?? ?? ?? 83 C4 30 85 C0 0F 85 ED 00 00 00 8D 44 24 0C 56 50 8D 8C 24 A0 01 00 00 56 8D 94 24 AC 02 00 00 51 8D 84 24 34 03 00 00 52 50 E8 ?? ?? ?? ?? 8D 8C 24 2C 01 } 1079 | condition: 1080 | $c0 1081 | } 1082 | 1083 | rule RsaRef2_NN_modMult 1084 | { meta: 1085 | author = "Maxx" 1086 | description = "RsaRef2 NN_modMult" 1087 | strings: 1088 | $c0 = { 8B 44 24 0C 8B 4C 24 08 81 EC 08 01 00 00 8D 54 24 00 56 8B B4 24 20 01 00 00 56 50 51 52 E8 ?? ?? ?? ?? 8B 84 24 2C 01 00 00 56 8D 0C 36 50 8B 84 24 28 01 00 00 8D 54 24 1C 51 52 50 E8 ?? ?? ?? ?? 68 08 01 00 00 8D 4C 24 2C 6A 00 51 E8 ?? ?? ?? ?? 83 C4 30 5E 81 C4 08 01 00 00 C3 } 1089 | condition: 1090 | $c0 1091 | } 1092 | 1093 | rule RsaRef2_RsaPrivateDecrypt 1094 | { meta: 1095 | author = "Maxx" 1096 | description = "RsaRef2 RsaPrivateDecrypt" 1097 | strings: 1098 | $c0 = { 8B 44 24 14 81 EC 84 00 00 00 8B 8C 24 94 00 00 00 56 8B 30 83 C6 07 C1 EE 03 3B CE 76 0D B8 06 04 00 00 5E 81 C4 84 00 00 00 C3 50 8B 84 24 98 00 00 00 51 8D 4C 24 0C 50 8D 54 24 14 51 52 E8 ?? ?? ?? ?? 83 C4 14 85 C0 0F 85 8B 00 00 00 39 74 24 04 74 0D B8 06 04 00 00 5E 81 C4 84 00 00 00 C3 8A 44 24 08 84 C0 75 6B 8A 4C 24 09 B8 02 00 00 00 3A C8 75 5E 8D 4E FF 3B C8 76 0D 8A 54 04 08 84 D2 74 05 40 3B C1 72 F3 40 3B C6 73 45 8B 94 24 ?? 00 00 00 8B CE 2B C8 89 0A 8D 51 0B } 1099 | condition: 1100 | $c0 1101 | } 1102 | 1103 | rule RsaRef2_RsaPrivateEncrypt 1104 | { meta: 1105 | author = "Maxx" 1106 | description = "RsaRef2 RsaPrivateEncrypt" 1107 | strings: 1108 | $c0 = { 8B 44 24 14 8B 54 24 10 81 EC 80 00 00 00 8D 4A 0B 56 8B 30 83 C6 07 C1 EE 03 3B CE 76 0D B8 06 04 00 00 5E 81 C4 80 00 00 00 C3 8B CE B8 02 00 00 00 2B CA C6 44 24 04 00 49 C6 44 24 05 01 3B C8 76 23 53 55 8D 69 FE 57 8B CD 83 C8 FF 8B D9 8D 7C 24 12 C1 E9 02 F3 AB 8B CB 83 E1 03 F3 AA 8D 45 02 5F 5D 5B 52 8B 94 24 94 00 00 00 C6 44 04 08 00 8D 44 04 09 52 50 E8 ?? ?? ?? ?? 8B 8C 24 A4 00 00 00 8B 84 24 98 00 00 00 51 8B 8C 24 98 00 00 00 8D 54 24 14 56 52 50 51 E8 } 1109 | condition: 1110 | $c0 1111 | } 1112 | 1113 | rule RsaRef2_RsaPublicDecrypt 1114 | { meta: 1115 | author = "Maxx" 1116 | description = "RsaRef2 RsaPublicDecrypt" 1117 | strings: 1118 | $c0 = { 8B 44 24 14 81 EC 84 00 00 00 8B 8C 24 94 00 00 00 56 8B 30 83 C6 07 C1 EE 03 3B CE 76 0D B8 06 04 00 00 5E 81 C4 84 00 00 00 C3 50 8B 84 24 98 00 00 00 51 8D 4C 24 0C 50 8D 54 24 14 51 52 E8 ?? ?? ?? ?? 83 C4 14 85 C0 0F 85 8E 00 00 00 39 74 24 04 74 0D B8 06 04 00 00 5E 81 C4 84 00 00 00 C3 8A 44 24 08 84 C0 75 6E 80 7C 24 09 01 75 67 B8 02 00 00 00 8D 4E FF 3B C8 76 0D B2 FF 38 54 04 08 75 05 40 3B C1 72 F5 8A 4C 04 08 40 84 C9 75 45 8B 94 24 ?? 00 00 00 8B CE 2B C8 89 0A } 1119 | condition: 1120 | $c0 1121 | } 1122 | 1123 | rule RsaRef2_RsaPublicEncrypt 1124 | { meta: 1125 | author = "Maxx" 1126 | description = "RsaRef2 RsaPublicEncrypt" 1127 | strings: 1128 | $c0 = { 8B 44 24 14 81 EC 84 00 00 00 53 8B 9C 24 98 00 00 00 57 8B 38 83 C7 07 8D 4B 0B C1 EF 03 3B CF 76 0E 5F B8 06 04 00 00 5B 81 C4 84 00 00 00 C3 8B D7 55 2B D3 56 BE 02 00 00 00 C6 44 24 14 00 8D 6A FF C6 44 24 15 02 3B EE 76 28 8B 84 24 AC 00 00 00 8D 4C 24 13 50 6A 01 51 E8 ?? ?? ?? ?? 8A 44 24 1F 83 C4 0C 84 C0 74 E1 88 44 34 14 46 3B F5 72 D8 8B 94 24 A0 00 00 00 53 8D 44 34 19 52 50 C6 44 34 20 00 E8 ?? ?? ?? ?? 8B 8C 24 B4 00 00 00 8B 84 24 A8 00 00 00 51 8B 8C 24 A8 00 } 1129 | condition: 1130 | $c0 1131 | } 1132 | 1133 | rule RsaEuro_NN_modInv 1134 | { meta: 1135 | author = "Maxx" 1136 | description = "RsaEuro NN_modInv" 1137 | strings: 1138 | $c0 = { 81 EC A4 04 00 00 53 56 8B B4 24 BC 04 00 00 57 8D 44 24 0C 56 50 E8 ?? ?? ?? ?? 8D 8C 24 1C 01 00 00 BF 01 00 00 00 56 51 89 7C 24 1C E8 ?? ?? ?? ?? 8B 94 24 C8 04 00 00 56 8D 84 24 AC 01 00 00 52 50 E8 ?? ?? ?? ?? 8B 9C 24 D8 04 00 00 56 8D 8C 24 B0 00 00 00 53 51 E8 ?? ?? ?? ?? 8D 94 24 B8 00 00 00 56 52 E8 ?? ?? ?? ?? 83 C4 30 85 C0 0F 85 F8 00 00 00 8D 84 24 ?? 00 00 00 56 50 8D 8C 24 A0 01 00 00 56 8D 94 24 AC 02 00 00 51 8D 84 24 34 03 00 00 52 50 E8 ?? ?? ?? ?? 8D 8C } 1139 | condition: 1140 | $c0 1141 | } 1142 | 1143 | rule RsaEuro_NN_modMult 1144 | { meta: 1145 | author = "Maxx" 1146 | description = "RsaEuro NN_modMult" 1147 | strings: 1148 | $c0 = { 8B 44 24 0C 8B 4C 24 08 81 EC 08 01 00 00 8D 54 24 00 56 8B B4 24 20 01 00 00 56 50 51 52 E8 ?? ?? ?? ?? 8B 84 24 2C 01 00 00 56 8D 0C 36 50 8B 84 24 28 01 00 00 8D 54 24 1C 51 52 50 E8 ?? ?? ?? ?? 83 C4 24 5E 81 C4 08 01 00 00 C3 } 1149 | condition: 1150 | $c0 1151 | } 1152 | 1153 | rule Miracl_Big_constructor 1154 | { meta: 1155 | author = "Maxx" 1156 | description = "Miracl Big constructor" 1157 | strings: 1158 | $c0 = { 56 8B F1 6A 00 E8 ?? ?? ?? ?? 83 C4 04 89 06 8B C6 5E C3 } 1159 | condition: 1160 | $c0 1161 | } 1162 | 1163 | rule Miracl_mirvar 1164 | { meta: 1165 | author = "Maxx" 1166 | description = "Miracl mirvar" 1167 | strings: 1168 | $c0 = { 56 E8 ?? ?? ?? ?? 8B 88 18 02 00 00 85 C9 74 04 33 C0 5E C3 8B 88 8C 00 00 00 85 C9 75 0E 6A 12 E8 ?? ?? ?? ?? 83 C4 04 33 C0 5E C3 8B 80 38 02 00 00 6A 01 50 E8 ?? ?? ?? ?? 8B F0 83 C4 08 85 F6 75 02 5E C3 8D 46 04 8B C8 8B D0 83 E1 03 2B D1 83 C2 08 89 10 8B 44 24 08 85 C0 74 0A 56 50 E8 ?? ?? ?? ?? 83 C4 08 8B C6 5E C3 } 1169 | $c1 = { 56 57 E8 ?? ?? ?? ?? 8B F0 8B 86 2C 02 00 00 85 C0 74 05 5F 33 C0 5E C3 8B 56 1C 42 8B C2 89 56 1C 83 F8 18 7D 17 C7 44 86 20 17 00 00 00 8B 86 40 02 00 00 85 C0 74 05 E8 ?? ?? ?? ?? 8B 86 8C 00 00 00 85 C0 75 16 6A 12 E8 ?? ?? ?? ?? 8B 46 1C 83 C4 04 48 89 46 1C 5F 33 C0 5E C3 8B 46 18 6A 01 8D 0C 85 0C 00 00 00 51 E8 ?? ?? ?? ?? 8B F8 83 C4 08 85 FF 75 0C 8B 46 1C 5F 48 89 46 1C 33 C0 5E C3 8D 47 04 8B D0 8B C8 83 E2 03 2B CA 83 C1 08 89 08 8B 44 24 0C 85 C0 74 0A 57 50 E8 } 1170 | $c2 = { 56 57 E8 ?? ?? ?? ?? 8B F0 8B 86 18 02 00 00 85 C0 74 05 5F 33 C0 5E C3 8B 56 1C 42 8B C2 89 56 1C 83 F8 18 7D 17 C7 44 86 20 17 00 00 00 8B 86 2C 02 00 00 85 C0 74 05 E8 ?? ?? ?? ?? 8B 86 8C 00 00 00 85 C0 75 16 6A 12 E8 ?? ?? ?? ?? 8B 46 1C 83 C4 04 48 89 46 1C 5F 33 C0 5E C3 8B 86 A4 02 00 00 6A 01 50 E8 ?? ?? ?? ?? 8B F8 83 C4 08 85 FF 75 0C 8B 46 1C 5F 48 89 46 1C 33 C0 5E C3 8D 47 04 8B C8 8B D0 83 E1 03 2B D1 83 C2 08 89 10 8B 44 24 0C 85 C0 74 0A 57 50 E8 } 1171 | condition: 1172 | any of them 1173 | } 1174 | 1175 | rule Miracl_mirsys_init 1176 | { meta: 1177 | author = "Maxx" 1178 | description = "Miracl mirsys init" 1179 | strings: 1180 | $c0 = { 53 55 57 E8 ?? ?? ?? ?? A3 ?? ?? ?? ?? E8 ?? ?? ?? ?? 33 DB A3 ?? ?? ?? ?? 3B C3 75 06 5F 5D 33 C0 5B C3 89 58 1C A1 ?? ?? ?? ?? BD 01 00 00 00 89 58 20 A1 ?? ?? ?? ?? 8B 50 1C 42 89 50 1C A1 ?? ?? ?? ?? 8B 48 1C C7 44 88 20 1D 00 00 00 8B 15 ?? ?? ?? ?? 89 9A 14 02 00 00 A1 ?? ?? ?? ?? 89 98 70 01 00 00 8B 0D ?? ?? ?? ?? 89 99 78 01 00 00 8B 15 ?? ?? ?? ?? 89 9A 98 01 00 00 A1 ?? ?? ?? ?? 89 58 14 8B 44 24 14 3B C5 0F 84 6C 05 00 00 3D 00 00 00 80 0F 87 61 05 00 00 50 E8 } 1181 | condition: 1182 | $c0 1183 | } 1184 | 1185 | /* //gives many false positives sorry Storm Shadow 1186 | rule x509_public_key_infrastructure_cert 1187 | { meta: 1188 | desc = "X.509 PKI Certificate" 1189 | ext = "crt" 1190 | strings: 1191 | $c0 = { 30 82 ?? ?? 30 82 ?? ?? } 1192 | condition: 1193 | $c0 1194 | } 1195 | 1196 | rule pkcs8_private_key_information_syntax_standard 1197 | { meta: 1198 | desc = "Found PKCS #8: Private-Key" 1199 | ext = "key" 1200 | strings: 1201 | $c0 = { 30 82 ?? ?? 02 01 00 } 1202 | condition: 1203 | $c0 1204 | } 1205 | */ 1206 | 1207 | rule BASE64_table { 1208 | meta: 1209 | author = "_pusher_" 1210 | description = "Look for Base64 table" 1211 | date = "2015-07" 1212 | version = "0.1" 1213 | strings: 1214 | $c0 = { 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 30 31 32 33 34 35 36 37 38 39 2B 2F } 1215 | condition: 1216 | $c0 1217 | } 1218 | 1219 | rule Delphi_Random { 1220 | meta: 1221 | author = "_pusher_" 1222 | description = "Look for Random function" 1223 | date = "2015-08" 1224 | version = "0.1" 1225 | strings: 1226 | $c0 = { 53 31 DB 69 93 ?? ?? ?? ?? 05 84 08 08 42 89 93 ?? ?? ?? ?? F7 E2 89 D0 5B C3 } 1227 | //x64 rad 1228 | $c1 = { 8B 05 ?? ?? ?? ?? 69 C0 05 84 08 08 83 C0 01 89 05 ?? ?? ?? ?? 8B C9 8B C0 48 0F AF C8 48 C1 E9 20 89 C8 C3 } 1229 | condition: 1230 | any of them 1231 | } 1232 | 1233 | rule Delphi_RandomRange { 1234 | meta: 1235 | author = "_pusher_" 1236 | description = "Look for RandomRange function" 1237 | date = "2016-06" 1238 | version = "0.1" 1239 | strings: 1240 | $c0 = { 56 8B F2 8B D8 3B F3 7D 0E 8B C3 2B C6 E8 ?? ?? ?? ?? 03 C6 5E 5B C3 8B C6 2B C3 E8 ?? ?? ?? ?? 03 C3 5E 5B C3 } 1241 | condition: 1242 | $c0 1243 | } 1244 | 1245 | rule Delphi_FormShow { 1246 | meta: 1247 | author = "_pusher_" 1248 | description = "Look for Form.Show function" 1249 | date = "2016-06" 1250 | version = "0.1" 1251 | strings: 1252 | $c0 = { 53 8B D8 B2 01 8B C3 E8 ?? ?? ?? ?? 8B C3 E8 ?? ?? ?? ?? 5B C3 } 1253 | //x64 rad 1254 | $c1 = { 53 48 83 EC 20 48 89 CB 48 89 D9 B2 01 E8 ?? ?? ?? ?? 48 89 D9 E8 ?? ?? ?? ?? 48 83 C4 20 5B C3 } 1255 | condition: 1256 | any of them 1257 | } 1258 | 1259 | rule Delphi_CompareCall { 1260 | meta: 1261 | author = "_pusher_" 1262 | description = "Look for Compare string function" 1263 | date = "2016-07" 1264 | strings: 1265 | $c0 = { 53 56 57 89 C6 89 D7 39 D0 0F 84 8F 00 00 00 85 F6 74 68 85 FF 74 6B 8B 46 FC 8B 57 FC 29 D0 77 02 01 C2 52 C1 EA 02 74 26 8B 0E 8B 1F 39 D9 75 58 4A 74 15 8B 4E 04 8B 5F 04 39 D9 75 4B 83 C6 08 83 C7 08 4A 75 E2 EB 06 83 C6 04 83 C7 04 5A 83 E2 03 74 22 8B 0E 8B 1F 38 D9 75 41 4A 74 17 38 FD 75 3A 4A 74 10 81 E3 00 00 FF 00 81 E1 00 00 FF 00 39 D9 75 27 01 C0 EB 23 8B 57 FC 29 D0 EB 1C 8B 46 FC 29 D0 EB 15 5A 38 D9 75 10 38 FD 75 0C C1 E9 10 C1 EB 10 38 D9 75 02 38 FD 5F 5E 5B C3 } 1266 | //newer delphi 1267 | $c1 = { 39 D0 74 30 85 D0 74 22 8B 48 FC 3B 4A FC 75 24 01 C9 01 C8 01 CA F7 D9 53 8B 1C 01 3B 1C 11 75 07 83 C1 04 78 F3 31 C0 5B C3} 1268 | //x64 1269 | $c2 = { 41 56 41 55 57 56 53 48 83 EC 20 48 89 D3 48 3B CB 75 05 48 33 C0 EB 74 48 85 C9 75 07 8B 43 FC F7 D8 EB 68 48 85 DB 75 05 8B 41 FC EB 5E 8B 79 FC 44 8B 6B FC 89 FE 41 3B F5 7E 03 44 89 EE E8 ?? ?? ?? ?? 49 89 C6 48 89 D9 E8 ?? ?? ?? ?? 48 89 C1 85 F6 7E 30 41 0F B7 06 0F B7 11 2B C2 85 C0 75 29 83 FE 01 74 1E 41 0F B7 46 02 0F B7 51 02 2B C2 85 C0 75 15 49 83 C6 04 48 83 C1 04 83 EE 02 85 F6 7F D0 90 8B C7 41 2B C5 48 83 C4 20 5B 5E 5F 41 5D 41 5E C3 } 1270 | condition: 1271 | any of them 1272 | } 1273 | 1274 | rule Delphi_Copy { 1275 | meta: 1276 | author = "_pusher_" 1277 | description = "Look for Copy function" 1278 | date = "2016-06" 1279 | version = "0.1" 1280 | strings: 1281 | $c0 = { 53 85 C0 74 2D 8B 58 FC 85 DB 74 26 4A 7C 1B 39 DA 7D 1F 29 D3 85 C9 7C 19 39 D9 7F 11 01 C2 8B 44 24 08 E8 ?? ?? ?? ?? EB 11 31 D2 EB E5 89 D9 EB EB 8B 44 24 08 E8 ?? ?? ?? ?? 5B C2 04 00 } 1282 | //x64 rad 1283 | $c1 = { 53 48 83 EC 20 48 89 CB 44 89 C0 48 33 C9 48 85 D2 74 03 8B 4A FC 83 F8 01 7D 05 48 33 C0 EB 09 83 E8 01 3B C1 7E 02 89 C8 45 85 C9 7D 05 48 33 C9 EB 0A 2B C8 41 3B C9 7E 03 44 89 C9 49 89 D8 48 63 C0 48 8D 14 42 89 C8 4C 89 C1 41 89 C0 E8 ?? ?? ?? ?? 48 89 D8 48 83 C4 20 5B C3 } 1284 | condition: 1285 | any of them 1286 | } 1287 | 1288 | rule Delphi_IntToStr { 1289 | meta: 1290 | author = "_pusher_" 1291 | description = "Look for IntToStr function" 1292 | date = "2016-04" 1293 | version = "0.1" 1294 | strings: 1295 | $c0 = { 55 8B EC 81 C4 00 FF FF FF 53 56 8B F2 8B D8 FF 75 0C FF 75 08 8D 85 00 FF FF FF E8 ?? ?? ?? ?? 8D 95 00 FF FF FF 8B C6 E8 ?? ?? ?? ?? EB 0E 8B 0E 8B C6 BA ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B 06 E8 ?? ?? ?? ?? 33 D2 8A D3 3B C2 72 E3 5E 5B 8B E5 5D C2 08 00 } 1296 | //x64 rad 1297 | $c1 = { 53 48 83 EC 20 48 89 CB 48 85 D2 7D 10 48 89 D9 48 F7 DA 41 B0 01 E8 ?? ?? ?? ?? EB 0B 48 89 D9 4D 33 C0 E8 ?? ?? ?? ?? 48 89 D8 48 83 C4 20 5B C3 } 1298 | condition: 1299 | any of them 1300 | } 1301 | 1302 | 1303 | rule Delphi_StrToInt { 1304 | meta: 1305 | author = "_pusher_" 1306 | description = "Look for StrToInt function" 1307 | date = "2016-06" 1308 | version = "0.1" 1309 | strings: 1310 | $c0 = { 53 56 83 C4 F4 8B D8 8B D4 8B C3 E8 ?? ?? ?? ?? 8B F0 83 3C 24 00 74 19 89 5C 24 04 C6 44 24 08 0B 8D 54 24 04 A1 ?? ?? ?? ?? 33 C9 E8 ?? ?? ?? ?? 8B C6 83 C4 0C 5E 5B C3 } 1311 | //x64 rad 1312 | $c1 = { 55 56 53 48 83 EC 40 48 8B EC 48 89 CB 48 89 D9 48 8D 55 3C E8 ?? ?? ?? ?? 89 C6 83 7D 3C 00 74 1B 48 89 5D 20 C6 45 28 11 48 8B 0D ?? ?? ?? ?? 48 8D 55 20 4D 33 C0 E8 ?? ?? ?? ?? 89 F0 48 8D 65 40 5B 5E 5D C3 } 1313 | condition: 1314 | any of them 1315 | } 1316 | 1317 | rule Delphi_DecodeDate { 1318 | meta: 1319 | author = "_pusher_" 1320 | description = "Look for DecodeDate (DecodeDateFully) function" 1321 | date = "2016-06" 1322 | version = "0.1" 1323 | strings: 1324 | $c0 = { 55 8B EC 83 C4 E8 53 56 89 4D F4 89 55 F8 89 45 FC 8B 5D 08 FF 75 10 FF 75 0C 8D 45 E8 E8 ?? ?? ?? ?? 8B 4D EC 85 C9 7F 24 8B 45 FC 66 C7 00 00 00 8B 45 F8 66 C7 00 00 00 8B 45 F4 66 C7 00 00 00 66 C7 03 00 00 33 D2 E9 F2 00 00 00 8B C1 BE 07 00 00 00 99 F7 FE 42 66 89 13 49 66 BB 01 00 81 F9 B1 3A 02 00 7C 13 81 E9 B1 3A 02 00 66 81 C3 90 01 81 F9 B1 3A 02 00 7D ED 8D 45 F2 50 8D 45 F0 66 BA AC 8E 91 E8 ?? ?? ?? ?? 66 83 7D F0 04 75 0A 66 FF 4D F0 66 81 45 F2 AC 8E 66 6B 45 F0 64 66 03 D8 8D 45 F2 50 8D 4D F0 0F B7 45 F2 66 BA B5 05 E8 ?? ?? ?? ?? 66 8B 45 F0 C1 E0 02 66 03 D8 8D 45 F2 50 8D 4D F0 0F B7 45 F2 66 BA 6D 01 E8 ?? ?? ?? ?? 66 83 7D F0 04 75 0A 66 FF 4D F0 66 81 45 F2 6D 01 66 03 5D F0 8B C3 E8 ?? ?? ?? ?? 8B D0 33 C0 8A C2 8D 04 40 8D 34 C5 ?? ?? ?? ?? 66 B8 01 00 0F B7 C8 66 8B 4C 4E FE 66 89 4D F0 66 8B 4D F2 66 3B 4D F0 72 0B 66 8B 4D F0 66 29 4D F2 40 EB DF 8B 4D FC 66 89 19 8B 4D F8 66 89 01 66 8B 45 F2 40 8B 4D F4 66 89 01 8B C2 5E 5B 8B E5 5D C2 0C 00 } 1325 | //x64 1326 | $c1 = { 55 41 55 57 56 53 48 83 EC 30 48 8B EC 48 89 D3 4C 89 C6 4C 89 CF E8 ?? ?? ?? ?? 48 8B C8 48 C1 E9 20 85 C9 7F 23 66 C7 03 00 00 66 C7 06 00 00 66 C7 07 00 00 48 8B 85 80 00 00 00 66 C7 00 00 00 48 33 C0 E9 19 01 00 00 4C 8B 85 80 00 00 00 41 C7 C1 07 00 00 00 8B C1 99 41 F7 F9 66 83 C2 01 66 41 89 10 83 E9 01 66 41 BD 01 00 81 F9 B1 3A 02 00 7C 14 81 E9 B1 3A 02 00 66 41 81 C5 90 01 81 F9 B1 3A 02 00 7D EC 90 66 BA AC 8E 4C 8D 45 2C 4C 8D 4D 2E E8 ?? ?? ?? ?? 66 83 7D 2C 04 75 0B 66 83 6D 2C 01 66 81 45 2E AC 8E 66 6B 45 2C 64 66 44 03 E8 0F B7 4D 2E 66 BA B5 05 4C 8D 45 2C 4C 8D 4D 2E E8 ?? ?? ?? ?? 48 0F B7 45 2C 03 C0 03 C0 66 44 03 E8 0F B7 4D 2E 66 BA 6D 01 4C 8D 45 2C 4C 8D 4D 2E E8 ?? ?? ?? ?? 66 83 7D 2C 04 75 0B 66 83 6D 2C 01 66 81 45 2E 6D 01 66 44 03 6D 2C 44 89 E9 E8 ?? ?? ?? ?? 48 8D 0D ?? ?? ?? ?? 48 0F B6 D0 48 8D 14 52 48 8D 14 D1 66 B9 01 00 4C 0F B7 C1 4E 0F B7 44 42 FE 66 44 89 45 2C 4C 0F B7 45 2E 66 44 3B 45 2C 72 10 4C 0F B7 45 2C 66 44 29 45 2E 66 } 1327 | condition: 1328 | any of them 1329 | } 1330 | 1331 | 1332 | rule Unknown_Random { 1333 | meta: 1334 | author = "_pusher_" 1335 | description = "Look for Random function" 1336 | date = "2016-07" 1337 | strings: 1338 | $c0 = { 55 8B EC 52 8B 45 08 69 15 ?? ?? ?? ?? 05 84 08 08 42 89 15 ?? ?? ?? ?? F7 E2 8B C2 5A C9 C2 04 00 } 1339 | condition: 1340 | $c0 1341 | } 1342 | 1343 | rule VC6_Random { 1344 | meta: 1345 | author = "_pusher_" 1346 | description = "Look for Random function" 1347 | date = "2016-02" 1348 | strings: 1349 | $c0 = { A1 ?? ?? ?? ?? 69 C0 FD 43 03 00 05 C3 9E 26 00 A3 ?? ?? ?? ?? C1 F8 10 25 FF 7F 00 00 C3 } 1350 | condition: 1351 | $c0 1352 | } 1353 | 1354 | rule VC8_Random { 1355 | meta: 1356 | author = "_pusher_" 1357 | description = "Look for Random function" 1358 | date = "2016-01" 1359 | version = "0.1" 1360 | strings: 1361 | $c0 = { E8 ?? ?? ?? ?? 8B 48 14 69 C9 FD 43 03 00 81 C1 C3 9E 26 00 89 48 14 8B C1 C1 E8 10 25 FF 7F 00 00 C3 } 1362 | condition: 1363 | $c0 1364 | } 1365 | 1366 | rule DCP_RIJNDAEL_Init { 1367 | meta: 1368 | author = "_pusher_" 1369 | description = "Look for DCP RijnDael Init" 1370 | date = "2016-07" 1371 | strings: 1372 | $c0 = { 55 8B EC 51 53 56 57 89 4D FC 8B FA 8B D8 8B 75 08 56 8B D7 8B 4D FC 8B C3 E8 ?? ?? ?? ?? 8B D7 8B 4D FC 8B C3 8B 38 FF 57 ?? 85 F6 75 25 8D 43 38 33 C9 BA 10 00 00 00 E8 ?? ?? ?? ?? 8D 4B 38 8D 53 38 8B C3 8B 30 FF 56 ?? 8B C3 8B 10 FF 52 ?? EB 16 8D 53 38 8B C6 B9 10 00 00 00 E8 ?? ?? ?? ?? 8B C3 8B 10 FF 52 ?? 5F 5E 5B 59 5D C2 04 00 } 1373 | condition: 1374 | $c0 1375 | } 1376 | 1377 | rule DCP_RIJNDAEL_EncryptECB { 1378 | meta: 1379 | author = "_pusher_" 1380 | description = "Look for DCP RijnDael EncryptECB" 1381 | date = "2016-07" 1382 | strings: 1383 | $c0 = { 53 56 57 55 83 C4 B4 89 0C 24 8D 74 24 08 8D 7C 24 28 80 78 30 00 75 16 B9 ?? ?? ?? ?? B2 01 A1 ?? ?? ?? ?? E8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B 0A 89 0F 8B CA 83 C1 04 8B 09 8D 5F 04 89 0B 8B CA 83 C1 08 8B 09 8D 5F 08 89 0B 83 C2 0C 8B 12 8D 4F 0C 89 11 8B 50 58 83 EA 02 85 D2 0F 82 3B 01 00 00 42 89 54 24 04 33 D2 8B 0F 8B DA C1 E3 02 33 4C D8 5C 89 0E 8D 4F 04 8B 09 33 4C D8 60 8D 6E 04 89 4D 00 8D 4F 08 8B 09 33 4C D8 64 8D 6E 08 89 4D 00 8D 4F 0C 8B 09 33 4C D8 68 8D 5E 0C 89 0B 33 C9 8A 0E 8D 0C 8D } 1384 | condition: 1385 | $c0 1386 | } 1387 | 1388 | rule DCP_BLOWFISH_Init { 1389 | meta: 1390 | author = "_pusher_" 1391 | description = "Look for DCP Blowfish Init" 1392 | date = "2016-07" 1393 | strings: 1394 | $c0 = { 53 56 57 55 8B F2 8B F8 8B CF B2 01 A1 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B D8 8B C3 8B 10 FF 52 34 8B C6 E8 ?? ?? ?? ?? 50 8B C6 E8 ?? ?? ?? ?? 8B D0 8B C3 59 8B 30 FF 56 3C 8B 43 3C 85 C0 79 03 83 C0 07 C1 F8 03 E8 ?? ?? ?? ?? 8B F0 8B D6 8B C3 8B 08 FF 51 40 8B 47 40 8B 6B 3C 3B C5 7D 0F 6A 00 8B C8 8B D6 8B C7 8B 38 FF 57 30 EB 0D 6A 00 8B D6 8B CD 8B C7 8B 38 FF 57 30 8B 53 3C 85 D2 79 03 83 C2 07 C1 FA 03 8B C6 B9 FF 00 00 00 E8 ?? ?? ?? ?? 8B 53 3C 85 D2 79 03 83 C2 07 C1 FA 03 8B C6 E8 ?? ?? ?? ?? 8B C3 E8 ?? ?? ?? ?? 5D 5F 5E 5B C3 } 1395 | condition: 1396 | $c0 1397 | } 1398 | 1399 | 1400 | rule DCP_BLOWFISH_EncryptCBC { 1401 | meta: 1402 | author = "_pusher_" 1403 | description = "Look for DCP Blowfish EncryptCBC" 1404 | date = "2016-07" 1405 | strings: 1406 | $c0 = { 55 8B EC 83 C4 F0 53 56 57 89 4D F8 89 55 FC 8B D8 80 7B 34 00 75 16 B9 ?? ?? ?? ?? B2 01 A1 ?? ?? ?? ?? E8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B 7D 08 85 FF 79 03 83 C7 07 C1 FF 03 85 FF 7E 56 BE 01 00 00 00 6A 08 8B 45 FC 8B D6 4A C1 E2 03 03 C2 8D 4D F0 8D 53 54 E8 ?? ?? ?? ?? 8D 4D F0 8D 55 F0 8B C3 E8 ?? ?? ?? ?? 8B 55 F8 8B C6 48 C1 E0 03 03 D0 8D 45 F0 B9 08 00 00 00 E8 ?? ?? ?? ?? 8D 53 54 8D 45 F0 B9 08 00 00 00 E8 ?? ?? ?? ?? 46 4F 75 AF 8B 75 08 81 E6 07 00 00 80 79 05 4E 83 CE F8 46 85 F6 74 26 8D 4D F0 8D 53 54 8B C3 E8 ?? ?? ?? ?? 56 8B 4D F8 03 4D 08 2B CE 8B 55 FC 03 55 08 2B D6 8D 45 F0 E8 ?? ?? ?? ?? 8D 45 F0 B9 FF 00 00 00 BA 08 00 00 00 E8 ?? ?? ?? ?? 5F 5E 5B 8B E5 5D C2 04 00 } 1407 | condition: 1408 | $c0 1409 | } 1410 | 1411 | rule DCP_DES_Init { 1412 | meta: 1413 | author = "_pusher_" 1414 | description = "Look for DCP Des Init" 1415 | date = "2016-02" 1416 | strings: 1417 | $c0 = { 55 8B EC 51 53 56 57 89 4D FC 8B FA 8B D8 8B 75 08 56 8B D7 8B 4D FC 8B C3 E8 FE F9 FF FF 8B D7 8B 4D FC 8B C3 8B 38 FF 57 5C 85 F6 75 25 8D 43 38 33 C9 BA 08 00 00 00 E8 F3 A9 FA FF 8D 4B 38 8D 53 38 8B C3 8B 30 FF 56 6C 8B C3 8B 10 FF 52 48 EB 16 8D 53 38 8B C6 B9 08 00 00 00 E8 6E A7 FA FF 8B C3 8B 10 FF 52 48 5F 5E 5B 59 5D C2 04 00 } 1418 | $c1 = { 55 8B EC 51 53 56 57 89 4D FC 8B FA 8B D8 8B 75 08 56 8B D7 8B 4D FC 8B C3 E8 EE D4 FF FF 8B D7 8B 4D FC 8B C3 8B 38 FF 57 74 85 F6 75 2B 8D 43 40 B9 FF 00 00 00 BA 08 00 00 00 E8 ?? ?? ?? ?? 8D 4B 40 8D 53 40 8B C3 8B 30 FF 96 84 00 00 00 8B C3 8B 10 FF 52 58 EB 16 8D 53 40 8B C6 B9 08 00 00 00 E8 ?? ?? ?? ?? 8B C3 8B 10 FF 52 58 5F 5E 5B 59 5D C2 04 00 } 1419 | condition: 1420 | any of them 1421 | } 1422 | 1423 | 1424 | rule DCP_DES_EncryptECB { 1425 | meta: 1426 | author = "_pusher_" 1427 | description = "Look for DCP Des EncryptECB" 1428 | date = "2016-02" 1429 | strings: 1430 | $c0 = { 53 80 78 ?? 00 75 16 B9 ?? ?? ?? 00 B2 01 A1 ?? ?? ?? 00 E8 ?? ?? ?? FF E8 ?? ?? ?? FF 8D 58 ?? 53 E8 ?? ?? FF FF 5B C3 } 1431 | condition: 1432 | any of them 1433 | } 1434 | -------------------------------------------------------------------------------- /rules/Crypto_index.yar: -------------------------------------------------------------------------------- 1 | /* 2 | Generated by Yara-Rules 3 | On 26-11-2019 4 | */ 5 | include "./Crypto/crypto_signatures.yar" 6 | -------------------------------------------------------------------------------- /rules/Packers/JJencode.yar: -------------------------------------------------------------------------------- 1 | /* 2 | This Yara ruleset is under the GNU-GPLv2 license (http://www.gnu.org/licenses/gpl-2.0.html) and open to any user or organization, as long as you use it under this license. 3 | 4 | */ 5 | rule jjEncode 6 | { 7 | meta: 8 | description = "jjencode detection" 9 | ref = "http://blog.xanda.org/2015/06/10/yara-rule-for-jjencode/" 10 | author = "adnan.shukor@gmail.com" 11 | date = "10-June-2015" 12 | version = "1" 13 | impact = 3 14 | hide = false 15 | strings: 16 | $jjencode = /(\$|[\S]+)=~\[\]\;(\$|[\S]+)\=\{[\_]{3}\:[\+]{2}(\$|[\S]+)\,[\$]{4}\:\(\!\[\]\+["]{2}\)[\S]+/ fullword 17 | condition: 18 | $jjencode 19 | } 20 | -------------------------------------------------------------------------------- /rules/Packers/Javascript_exploit_and_obfuscation.yar: -------------------------------------------------------------------------------- 1 | rule generic_javascript_obfuscation 2 | { 3 | meta: 4 | author = "Josh Berry" 5 | date = "2016-06-26" 6 | description = "JavaScript Obfuscation Detection" 7 | sample_filetype = "js-html" 8 | strings: 9 | $string0 = /eval\(([\s]+)?(unescape|atob)\(/ nocase 10 | $string1 = /var([\s]+)?([a-zA-Z_$])+([a-zA-Z0-9_$]+)?([\s]+)?=([\s]+)?\[([\s]+)?\"\\x[0-9a-fA-F]+/ nocase 11 | $string2 = /var([\s]+)?([a-zA-Z_$])+([a-zA-Z0-9_$]+)?([\s]+)?=([\s]+)?eval;/ 12 | condition: 13 | any of them 14 | } 15 | 16 | rule possible_includes_base64_packed_functions 17 | { 18 | meta: 19 | impact = 5 20 | hide = true 21 | desc = "Detects possible includes and packed functions" 22 | strings: 23 | $f = /(atob|btoa|;base64|base64,)/ nocase 24 | //$ff = /(?:[A-Za-z0-9]{4}){2,}(?:[A-Za-z0-9]{2}[AEIMQUYcgkosw048]=|[A-Za-z0-9][AQgw]==)/ nocase 25 | $fff = /([A-Za-z0-9]{4})*([A-Za-z0-9]{2}==|[A-Za-z0-9]{3}=|[A-Za-z0-9]{4})/ 26 | condition: 27 | $f and $fff 28 | } 29 | 30 | 31 | rule src_ptheft_command { 32 | meta: 33 | description = "Auto-generated rule - file command.js" 34 | author = "Pasquale Stirparo" 35 | reference = "not set" 36 | date = "2015-10-08" 37 | hash = "49c0e5400068924ff87729d9e1fece19acbfbd628d085f8df47b21519051b7f3" 38 | strings: 39 | $s0 = "var lilogo = 'http://content.linkedin.com/etc/designs/linkedin/katy/global/clientlibs/img/logo.png';" fullword wide ascii /* score: '38.00' */ 40 | $s1 = "dark=document.getElementById('darkenScreenObject'); " fullword wide ascii /* score: '21.00' */ 41 | $s2 = "beef.execute(function() {" fullword wide ascii /* score: '21.00' */ 42 | $s3 = "var logo = 'http://www.youtube.com/yt/brand/media/image/yt-brand-standard-logo-630px.png';" fullword wide ascii /* score: '32.42' */ 43 | $s4 = "description.text('Enter your Apple ID e-mail address and password');" fullword wide ascii /* score: '28.00' */ 44 | $s5 = "sneakydiv.innerHTML= '
';" fullword wide ascii /* score: '24.00' */ 48 | $s9 = "var title = 'Session Timed Out \"YouTube\"';" fullword wide ascii /* score: '24.00' */ 49 | $s10 = "var title = 'Session Timed Out \"Yammer\"';" fullword wide ascii /* score: '24.00' */ 50 | $s11 = "var logobox = 'style=\"border:4px #84ACDD solid;border-radius:7px;height:45px;width:45px;background:#ffffff\"';" fullword wide ascii /* score: '21.00' */ 51 | $s12 = "sneakydiv.innerHTML= '

Your session has timed out!

For" wide ascii /* score: '23.00' */ 52 | $s13 = "inner.append(title, description, user,password);" fullword wide ascii /* score: '23.00' */ 53 | $s14 = "sneakydiv.innerHTML= '

= 7.0 76 | } 77 | 78 | 79 | rule HasOverlay : PECheck 80 | { 81 | meta: 82 | author="_pusher_" 83 | description = "Overlay Check" 84 | condition: 85 | // MZ signature at offset 0 and ... 86 | uint16(0) == 0x5A4D and 87 | // ... PE signature at offset stored in MZ header at 0x3C 88 | uint32(uint32(0x3C)) == 0x00004550 and 89 | //stupid check if last section is 0 90 | //not (pe.sections[pe.number_of_sections-1].raw_data_offset+pe.sections[pe.number_of_sections-1].raw_data_size) == 0x0 and 91 | 92 | (pe.sections[pe.number_of_sections-1].raw_data_offset+pe.sections[pe.number_of_sections-1].raw_data_size) < filesize 93 | 94 | } 95 | 96 | rule HasTaggantSignature : PECheck 97 | { 98 | meta: 99 | author="_pusher_" 100 | description = "TaggantSignature Check" 101 | date="2016-07" 102 | strings: 103 | $a0 = { 54 41 47 47 ?? ?? ?? ?? ?? ?? 00 00 ?? 00 30 82 ?? ?? 06 09 2A 86 48 86 F7 0D 01 07 02 A0 82 ?? ?? 30 82 ?? ?? 02 01 01 31 09 30 07 06 05 2B 0E 03 02 1A 30 82 ?? ?? 06 09 2A 86 48 86 F7 0D 01 07 01 A0 82 ?? ?? 04 82 ?? ?? ?? 00 01 00 ?? ?? } 104 | //$c0 = { 06 09 2A 86 } 105 | condition: 106 | // MZ signature at offset 0 and ... 107 | uint16(0) == 0x5A4D and 108 | // ... PE signature at offset stored in MZ header at 0x3C 109 | uint32(uint32(0x3C)) == 0x00004550 and 110 | //TAGG+4E==packerid 111 | //(uint32be(@a0+0x4E) == 0x0B51D132) and 112 | //(uint32be(@a0+0x12) == 0x006092a86) and 113 | //(uint32be(@a0+0x12)) == uint32be(@c0) and 114 | 115 | //uint32be(@a0+0x04) < (pe.sections[pe.number_of_sections-1].raw_data_offset+pe.sections[pe.number_of_sections-1].raw_data_size) and 116 | $a0 117 | } 118 | 119 | 120 | rule HasDigitalSignature : PECheck 121 | { 122 | meta: 123 | author="_pusher_" 124 | description = "DigitalSignature Check" 125 | date="2016-07" 126 | strings: 127 | //size check is wildcarded 128 | $a0 = { ?? ?? ?? ?? 00 02 02 00 30 82 ?? ?? 06 09 2A 86 48 86 F7 0D 01 07 02 A0 82 ?? ?? 30 82 ?? ?? 02 01 01 31 0B 30 09 06 05 2B 0E 03 02 1A 05 00 30 68 06 0A 2B 06 01 04 01 82 37 02 01 04 A0 5A 30 58 30 33 06 0A 2B 06 01 04 01 82 37 02 01 0F 30 25 03 01 00 A0 20 A2 1E 80 1C 00 3C 00 3C 00 3C 00 4F 00 62 00 73 00 6F 00 6C 00 65 00 74 00 65 00 3E 00 3E 00 3E 30 21 30 09 06 05 2B 0E 03 02 1A 05 00 04 14 } 129 | $a1 = { ?? ?? ?? ?? 00 02 02 00 30 82 ?? ?? 06 09 2A 86 48 86 F7 0D 01 07 02 A0 82 ?? ?? 30 82 ?? ?? 02 01 01 31 0B 30 09 06 05 2B 0E 03 02 1A 05 00 30 ?? 06 0A 2B 06 01 04 01 82 37 02 01 04 A0 ?? 30 ?? 30 ?? 06 0A 2B 06 01 04 01 82 37 02 01 0F 30 ?? 03 01 00 A0 ?? A2 ?? 80 00 30 21 30 09 06 05 2B 0E 03 02 1A 05 00 04 14 } 130 | $a2 = { ?? ?? ?? ?? 00 02 02 00 30 82 ?? ?? 06 09 2A 86 48 86 F7 0D 01 07 02 A0 82 ?? ?? 30 82 ?? ?? 02 01 01 31 0E 30 ?? 06 ?? ?? 86 48 86 F7 0D 02 05 05 00 30 67 06 0A 2B 06 01 04 01 82 37 02 01 04 A0 59 30 57 30 33 06 0A 2B 06 01 04 01 82 37 02 01 0F 30 25 03 01 00 A0 20 A2 1E 80 1C 00 3C 00 3C 00 3C 00 4F 00 62 00 73 00 6F 00 6C 00 65 00 74 00 65 00 3E 00 3E 00 3E 30 20 30 0C 06 08 2A 86 48 86 F7 0D 02 05 05 00 04 } 131 | $a3 = { ?? ?? ?? ?? 00 02 02 00 30 82 ?? ?? 06 09 2A 86 48 86 F7 0D 01 07 02 A0 82 ?? ?? 30 82 ?? ?? 02 01 01 31 0F 30 ?? 06 ?? ?? 86 48 01 65 03 04 02 01 05 00 30 78 06 0A 2B 06 01 04 01 82 37 02 01 04 A0 6A 30 68 30 33 06 0A 2B 06 01 04 01 82 37 02 01 0F 30 25 03 01 00 A0 20 A2 1E 80 1C 00 3C 00 3C 00 3C 00 4F 00 62 00 73 00 6F 00 6C 00 65 00 74 00 65 00 3E 00 3E 00 3E 30 31 30 0D 06 09 60 86 48 01 65 03 04 02 01 05 00 04 } 132 | condition: 133 | // MZ signature at offset 0 and ... 134 | uint16(0) == 0x5A4D and 135 | // ... PE signature at offset stored in MZ header at 0x3C 136 | uint32(uint32(0x3C)) == 0x00004550 and 137 | (for any of ($a*) : ($ in ( (pe.sections[pe.number_of_sections-1].raw_data_offset+pe.sections[pe.number_of_sections-1].raw_data_size)..filesize)) ) 138 | //its not always like this: 139 | //and uint32(@a0) == (filesize-(pe.sections[pe.number_of_sections-1].raw_data_offset+pe.sections[pe.number_of_sections-1].raw_data_size)) 140 | } 141 | 142 | rule HasDebugData : PECheck 143 | { 144 | meta: 145 | author = "_pusher_" 146 | description = "DebugData Check" 147 | date="2016-07" 148 | condition: 149 | // MZ signature at offset 0 and ... 150 | uint16(0) == 0x5A4D and 151 | // ... PE signature at offset stored in MZ header at 0x3C 152 | uint32(uint32(0x3C)) == 0x00004550 and 153 | //orginal 154 | //((uint32(uint32(0x3C)+0xA8) >0x0) and (uint32be(uint32(0x3C)+0xAC) >0x0)) 155 | //((uint16(uint32(0x3C)+0x18) & 0x200) >> 5) x64/x32 156 | (IsPE32 or IsPE64) and 157 | ((uint32(uint32(0x3C)+0xA8+((uint16(uint32(0x3C)+0x18) & 0x200) >> 5)) >0x0) and (uint32be(uint32(0x3C)+0xAC+((uint16(uint32(0x3C)+0x18) & 0x200) >> 5)) >0x0)) 158 | } 159 | 160 | rule IsBeyondImageSize : PECheck 161 | { 162 | meta: 163 | author = "_pusher_" 164 | date = "2016-07" 165 | description = "Data Beyond ImageSize Check" 166 | condition: 167 | // MZ signature at offset 0 and ... 168 | uint16(0) == 0x5A4D and 169 | // ... PE signature at offset stored in MZ header at 0x3C 170 | uint32(uint32(0x3C)) == 0x00004550 and 171 | for any i in (0..pe.number_of_sections-1): 172 | ( 173 | (pe.sections[i].virtual_address+pe.sections[i].virtual_size) > (uint32(uint32(0x3C)+0x50)) or 174 | (pe.sections[i].raw_data_offset+pe.sections[i].raw_data_size) > filesize 175 | ) 176 | } 177 | 178 | rule ImportTableIsBad : PECheck 179 | { 180 | meta: 181 | author = "_pusher_ & mrexodia" 182 | date = "2016-07" 183 | description = "ImportTable Check" 184 | condition: 185 | // MZ signature at offset 0 and ... 186 | uint16(0) == 0x5A4D and 187 | // ... PE signature at offset stored in MZ header at 0x3C 188 | uint32(uint32(0x3C)) == 0x00004550 and 189 | (IsPE32 or IsPE64) and 190 | ( //Import_Table_RVA+Import_Data_Size .. cannot be outside imagesize 191 | ((uint32(uint32(0x3C)+0x80+((uint16(uint32(0x3C)+0x18) & 0x200) >> 5) )) + (uint32(uint32(0x3C)+0x84+((uint16(uint32(0x3C)+0x18) & 0x200) >> 5)))) > (uint32(uint32(0x3C)+0x50)) 192 | or 193 | (((uint32(uint32(0x3C)+0x80+((uint16(uint32(0x3C)+0x18) & 0x200) >> 5) )) + (uint32(uint32(0x3C)+0x84+((uint16(uint32(0x3C)+0x18) & 0x200) >> 5)))) == 0x0) 194 | //or 195 | 196 | //doest work 197 | //pe.imports("", "") 198 | 199 | //need to check if this is ok.. 15:06 2016-08-12 200 | //uint32( uint32(uint32(0x3C)+0x80+((uint16(uint32(0x3C)+0x18) & 0x200) >> 5))+uint32(uint32(0x3C)+0x34)) == 0x408000 201 | //this works.. 202 | //uint32(uint32(0x3C)+0x80+((uint16(uint32(0x3C)+0x18) & 0x200) >> 5))+uint32(uint32(0x3C)+0x34) == 0x408000 203 | 204 | //uint32be(uint32be(0x409000)) == 0x005A 205 | //pe.image_base 206 | //correct: 207 | 208 | //uint32(uint32(0x3C)+0x80)+pe.image_base == 0x408000 209 | 210 | //this works (file offset): 211 | //$a0 at 0x4000 212 | //this does not work rva: 213 | //$a0 at uint32(0x0408000) 214 | 215 | //(uint32(uint32(uint32(0x3C)+0x80)+((uint16(uint32(0x3C)+0x18) & 0x200) >> 5))+pe.image_base) == 0x0) 216 | 217 | or 218 | //tiny PE files.. 219 | (uint32(0x3C)+0x80+((uint16(uint32(0x3C)+0x18) & 0x200) >> 5) > filesize) 220 | 221 | //or 222 | //uint32(uint32(0x3C)+0x80) == 0x21000 223 | //uint32(uint32(uint32(0x3C)+0x80)) == 0x0 224 | //pe.imports("", "") 225 | ) 226 | } 227 | 228 | rule ExportTableIsBad : PECheck 229 | { 230 | meta: 231 | author = "_pusher_ & mrexodia" 232 | date = "2016-07" 233 | description = "ExportTable Check" 234 | condition: 235 | // MZ signature at offset 0 and ... 236 | uint16(0) == 0x5A4D and 237 | // ... PE signature at offset stored in MZ header at 0x3C 238 | uint32(uint32(0x3C)) == 0x00004550 and 239 | (IsPE32 or IsPE64) and 240 | ( //Export_Table_RVA+Export_Data_Size .. cannot be outside imagesize 241 | ((uint32(uint32(0x3C)+0x78+((uint16(uint32(0x3C)+0x18) & 0x200) >> 5) )) + (uint32(uint32(0x3C)+0x7C+((uint16(uint32(0x3C)+0x18) & 0x200) >> 5)))) > (uint32(uint32(0x3C)+0x50)) 242 | ) 243 | } 244 | 245 | 246 | rule HasModified_DOS_Message : PECheck 247 | { 248 | meta: 249 | author = "_pusher_" 250 | description = "DOS Message Check" 251 | date="2016-07" 252 | strings: 253 | $a0 = "This program must be run under Win32" wide ascii nocase 254 | $a1 = "This program cannot be run in DOS mode" wide ascii nocase 255 | //UniLink 256 | $a2 = "This program requires Win32" wide ascii nocase 257 | $a3 = "This program must be run under Win64" wide ascii nocase 258 | condition: 259 | // MZ signature at offset 0 and ... 260 | uint16(0) == 0x5A4D and 261 | // ... PE signature at offset stored in MZ header at 0x3C 262 | uint32(uint32(0x3C)) == 0x00004550 and not 263 | (for any of ($a*) : ($ in (0x0..uint32(0x3c) ))) 264 | } 265 | 266 | rule HasRichSignature : PECheck 267 | { 268 | meta: 269 | author = "_pusher_" 270 | description = "Rich Signature Check" 271 | date="2016-07" 272 | strings: 273 | $a0 = "Rich" ascii 274 | condition: 275 | // MZ signature at offset 0 and ... 276 | uint16(0) == 0x5A4D and 277 | // ... PE signature at offset stored in MZ header at 0x3C 278 | uint32(uint32(0x3C)) == 0x00004550 and 279 | (for any of ($a*) : ($ in (0x0..uint32(0x3c) ))) 280 | } 281 | 282 | rule IsSuspicious 283 | { 284 | meta: 285 | author="_pusher_" 286 | date = "2016-07" 287 | description="Might be PE Virus" 288 | condition: 289 | uint32(0x20) == 0x20202020 290 | } 291 | 292 | rule IsGoLink 293 | { 294 | meta: 295 | author="_pusher_" 296 | date = "2016-08" 297 | description="www.GoDevTool.com" 298 | strings: 299 | $a0 = { 47 6F 4C 69 6E 6B } 300 | condition: 301 | // MZ signature at offset 0 and ... 302 | uint16(0) == 0x5A4D and 303 | // ... PE signature at offset stored in MZ header at 0x3C 304 | $a0 at 0x40 305 | 306 | } 307 | 308 | 309 | rule borland_cpp { 310 | meta: 311 | author = "_pusher_" 312 | description = "Borland C++" 313 | date = "2015-08" 314 | version = "0.1" 315 | strings: 316 | $c0 = { 59 5F 6A 00 E8 ?? ?? ?? ?? 59 68 ?? ?? ?? ?? 6A 00 E8 ?? ?? ?? ?? A3 ?? ?? ?? ?? 6A 00 E9 ?? ?? ?? ?? E9 ?? ?? ?? ?? 33 C0 A0 ?? ?? ?? ?? C3 A1 ?? ?? ?? ?? C3 } 317 | $c1 = { A1 ?? ?? ?? ?? C1 E0 02 A3 ?? ?? ?? ?? 52 6A 00 E8 ?? ?? ?? ?? 8B D0 E8 ?? ?? ?? ?? 5A E8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 6A 00 E8 ?? ?? ?? ?? 59 68 ?? ?? ?? ?? 6A 00 E8 ?? ?? ?? ?? A3 ?? ?? ?? ?? 6A 00 E9 ?? ?? ?? ?? E9 ?? ?? ?? ?? 33 C0 A0 ?? ?? ?? ?? C3 A1 ?? ?? ?? ?? C3 } 318 | $c2 = { 6A 00 E8 ?? ?? ?? ?? A3 ?? ?? ?? ?? 6A 00 E9 ?? ?? ?? ?? E9 ?? ?? ?? ?? 33 C0 A0 ?? ?? ?? ?? C3 A1 ?? ?? ?? ?? C3 } 319 | condition: 320 | ( 321 | //linker 2.25 and 5.00 322 | ((pe.linker_version.major == 2) and (pe.linker_version.minor == 25 )) or 323 | ((pe.linker_version.major == 5) and (pe.linker_version.minor == 0 )) 324 | ) and 325 | any of them 326 | } 327 | 328 | rule borland_delphi { 329 | meta: 330 | author = "_pusher_" 331 | description = "Borland Delphi 2.0 - 7.0 / 2005 - 2007" 332 | date = "2016-03" 333 | version = "0.2" 334 | strings: 335 | $c0 = { 53 8B D8 33 C0 A3 ?? ?? ?? ?? 6A ?? E8 ?? ?? ?? FF A3 ?? ?? ?? ?? A1 ?? ?? ?? ?? A3 ?? ?? ?? ?? 33 C0 A3 ?? ?? ?? ?? 33 C0 A3 } 336 | $c1 = { 53 8B D8 33 C0 A3 ?? ?? ?? ?? 6A ?? E8 ?? ?? ?? ?? A3 ?? ?? ?? ?? A1 ?? ?? ?? ?? A3 ?? ?? ?? ?? 33 C0 A3 ?? ?? ?? ?? 33 C0 A3 ?? ?? ?? ?? 8D 43 08 A3 ?? ?? ?? ?? E8 ?? ?? ?? ?? BA ?? ?? ?? ?? 8B C3 E8 ?? ?? ?? ?? 5B C3 } 337 | //some x64 version of delphi 338 | $c2 = { 53 48 83 EC 20 48 89 CB C7 05 ?? ?? ?? ?? ?? ?? ?? ?? 48 33 C9 E8 ?? ?? ?? ?? 48 89 05 ?? ?? ?? ?? 48 8B 05 ?? ?? ?? ?? 48 89 05 ?? ?? ?? ?? 48 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 48 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 48 8D 43 10 48 89 05 ?? ?? ?? ?? 48 8D 05 ?? FC FF FF 48 89 05 ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 89 D9 48 8D 15 ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 83 C4 20 5B C3 } 339 | //unusual delphi version unknown version (unpackme- FSG 1.31 - dulek) 340 | $c3 = { 50 6A 00 E8 ?? ?? ?? ?? BA ?? ?? ?? ?? 52 89 05 ?? ?? ?? ?? 89 42 04 C7 42 08 00 00 00 00 C7 42 0C 00 00 00 00 E8 ?? ?? ?? ?? 5A 58 E8 ?? ?? ?? ?? C3 } 341 | //delphi2 342 | $c4 = { E8 ?? ?? ?? ?? 6A ?? E8 ?? ?? ?? ?? 89 05 ?? ?? ?? ?? E8 ?? ?? ?? ?? 89 05 ?? ?? ?? ?? C7 05 ?? ?? ?? ?? 0A ?? ?? ?? B8 ?? ?? ?? ?? C3 } 343 | //delphi3 344 | $c5 = { 50 6A 00 E8 ?? ?? FF FF BA ?? ?? ?? ?? 52 89 05 ?? ?? ?? ?? 89 42 04 E8 ?? ?? ?? ?? 5A 58 E8 ?? ?? ?? ?? C3 55 8B EC 33 C0 } 345 | //delphi5 346 | $c6 = { 50 6A ?? E8 ?? ?? FF FF BA ?? ?? ?? ?? 52 89 05 ?? ?? ?? ?? 89 42 04 C7 42 08 ?? ?? ?? ?? C7 42 0C ?? ?? ?? ?? E8 ?? ?? ?? ?? 5A 58 E8 ?? ?? ?? ?? C3 } 347 | condition: 348 | any of them 349 | and 350 | ( 351 | //if its not linker 2.25 its been modified (unpacked usually) 352 | //unknown x64 build of delphi 353 | ((pe.linker_version.major == 2) and (pe.linker_version.minor == 25 )) or ((pe.linker_version.major == 8) and (pe.linker_version.minor == 0 )) 354 | //unpacked files usually have this linker: 355 | or ((pe.linker_version.major == 0) and (pe.linker_version.minor == 0 )) ) 356 | //could check for dvclal.. maybe too much 357 | } 358 | 359 | rule free_pascal { 360 | meta: 361 | author = "_pusher_" 362 | description = "Free Pascal" 363 | date = "2015-08" 364 | version = "0.1" 365 | strings: 366 | $c0 = { 55 89 E5 83 ?? ?? 89 5D FC B8 ?? ?? ?? ?? 50 E8 ?? ?? ?? ?? A0 ?? ?? ?? ?? 84 C0 75 0C 6A 00 E8 ?? ?? ?? ?? A3 ?? ?? ?? ?? A1 ?? ?? ?? ?? A3 } 367 | $c1 = { 55 89 E5 53 B8 ?? ?? ?? ?? 50 E8 ?? ?? ?? ?? 80 3D ?? ?? ?? ?? 00 75 0C 6A 00 E8 ?? ?? ?? ?? A3 ?? ?? ?? ?? A1 ?? ?? ?? ?? A3 ?? ?? ?? ?? B8 } 368 | $c2 = { 55 89 E5 83 EC 04 89 5D FC B8 ?? ?? ?? ?? 50 E8 ?? ?? ?? ?? E8 ?? ?? ?? ?? A0 ?? ?? ?? ?? 84 C0 75 05 E8 ?? ?? ?? ?? C7 05 } 369 | condition: 370 | any of them 371 | } 372 | 373 | rule borland_delphi_dll { 374 | meta: 375 | author = "_pusher_" 376 | description = "Borland Delphi DLL" 377 | date = "2015-08" 378 | version = "0.1" 379 | info = "one is at entrypoint" 380 | strings: 381 | $c0 = { BA ?? ?? ?? ?? 83 7D 0C 01 75 ?? 50 52 C6 05 ?? ?? ?? ?? ?? 8B 4D 08 89 0D ?? ?? ?? ?? 89 4A 04 } 382 | $c1 = { 55 8B EC 83 C4 ?? B8 ?? ?? ?? ?? E8 ?? ?? FF FF E8 ?? ?? FF FF 8D 40 00 } 383 | condition: 384 | any of them 385 | } 386 | 387 | rule borland_component { 388 | meta: 389 | author = "_pusher_" 390 | description = "Borland Component" 391 | date = "2015-08" 392 | version = "0.1" 393 | strings: 394 | $c0 = { E9 ?? ?? ?? FF 8D 40 00 } 395 | condition: 396 | $c0 at pe.entry_point 397 | } 398 | 399 | rule PureBasic : Neil Hodgson 400 | { 401 | meta: 402 | author="_pusher_" 403 | date="2016-07" 404 | strings: 405 | //make check for msvrt.dll 406 | $c0 = { 55 8B EC 6A 00 68 00 10 00 00 6A ?? FF 15 ?? ?? ?? ?? A3 ?? ?? ?? ?? C7 05 ?? ?? ?? ?? 00 00 00 00 C7 05 ?? ?? ?? ?? 10 00 00 00 A1 ?? ?? ?? ?? 50 6A ?? 8B 0D ?? ?? ?? ?? 51 FF 15 ?? ?? ?? ?? A3 ?? ?? ?? ?? 5D C3 CC CC CC CC CC CC CC CC CC } 407 | $c1 = { 68 ?? ?? 00 00 68 00 00 00 00 68 ?? ?? ?? 00 E8 ?? ?? ?? 00 83 C4 0C 68 00 00 00 00 E8 ?? ?? ?? 00 A3 ?? ?? ?? 00 68 00 00 00 00 68 00 10 00 00 68 00 00 00 00 E8 ?? ?? ?? 00 A3 } 408 | $aa0 = "\x00MSVCRT.dll\x00" ascii 409 | $aa1 = "\x00CRTDLL.dll\x00" ascii 410 | condition: 411 | (for any of ($c0,$c1) : ( $ at pe.entry_point )) and 412 | (any of ($aa*) ) and 413 | ((pe.linker_version.major == 2) and (pe.linker_version.minor == 50 )) 414 | } 415 | 416 | rule PureBasicDLL : Neil Hodgson 417 | { 418 | meta: 419 | author="malware-lu" 420 | strings: 421 | $a0 = { 83 7C 24 08 01 75 ?? 8B 44 24 04 A3 ?? ?? ?? 10 E8 } 422 | 423 | condition: 424 | $a0 at pe.entry_point 425 | } 426 | 427 | rule PureBasic4xDLL : Neil Hodgson 428 | { 429 | meta: 430 | author="malware-lu" 431 | strings: 432 | $a0 = { 83 7C 24 08 01 75 0E 8B 44 24 04 A3 ?? ?? ?? 10 E8 22 00 00 00 83 7C 24 08 02 75 00 83 7C 24 08 00 75 05 E8 ?? 00 00 00 83 7C 24 08 03 75 00 B8 01 00 00 00 C2 0C 00 68 00 00 00 00 68 00 10 00 00 68 00 00 00 00 E8 ?? 0F 00 00 A3 } 433 | 434 | condition: 435 | $a0 at pe.entry_point 436 | } 437 | 438 | rule SkDUndetectabler : SkDrat { 439 | meta: 440 | author = "_pusher_" 441 | condition: 442 | ( 443 | borland_delphi or //check All FSG or 444 | ((pe.linker_version.major == 6) and (pe.linker_version.minor == 0 )) 445 | ) 446 | and 447 | (pe.sections[pe.number_of_sections-1].raw_data_offset+pe.sections[pe.number_of_sections-1].raw_data_size < filesize) and 448 | //is overlay at offset 2A00,1A00,C00,745,739 449 | //pe.overlay & pe.overlay_size would have been prettier 450 | ( 451 | (pe.sections[pe.number_of_sections-1].raw_data_offset+pe.sections[pe.number_of_sections-1].raw_data_size == 0x00000739) or 452 | (pe.sections[pe.number_of_sections-1].raw_data_offset+pe.sections[pe.number_of_sections-1].raw_data_size == 0x00000745) or 453 | //Uncompressed 454 | (pe.sections[pe.number_of_sections-1].raw_data_offset+pe.sections[pe.number_of_sections-1].raw_data_size == 0x00000C00) or 455 | (pe.sections[pe.number_of_sections-1].raw_data_offset+pe.sections[pe.number_of_sections-1].raw_data_size == 0x00002A00) or 456 | (pe.sections[pe.number_of_sections-1].raw_data_offset+pe.sections[pe.number_of_sections-1].raw_data_size == 0x00001A00) 457 | ) 458 | and 459 | //is xored MZ ? 460 | ( 461 | uint16(pe.sections[pe.number_of_sections-1].raw_data_offset+pe.sections[pe.number_of_sections-1].raw_data_size) == 0x6275 or 462 | uint16(pe.sections[pe.number_of_sections-1].raw_data_offset+pe.sections[pe.number_of_sections-1].raw_data_size) == 0x4057 463 | ) 464 | } 465 | 466 | /* usefull ? 18:53 2016-08-12 467 | rule MicrosoftVisualCV80 468 | { 469 | meta: 470 | author="malware-lu" 471 | strings: 472 | $a0 = { 6A 14 68 ?? ?? ?? ?? E8 ?? ?? ?? ?? BB 94 00 00 00 53 6A 00 8B ?? ?? ?? ?? ?? FF D7 50 FF ?? ?? ?? ?? ?? 8B F0 85 F6 75 0A 6A 12 E8 ?? ?? ?? ?? 59 EB 18 89 1E 56 FF ?? ?? ?? ?? ?? 56 85 C0 75 14 50 FF D7 50 FF ?? ?? ?? ?? ?? B8 } 473 | 474 | condition: 475 | $a0 at pe.entry_point 476 | } 477 | */ 478 | 479 | rule Cygwin : Red Hat 480 | { 481 | meta: 482 | author = "_pusher_" 483 | date = "2016-07" 484 | strings: 485 | $a0 = "cygwin1.dll" ascii nocase 486 | $aa1 = "cygwin_internal" 487 | $aa2 = "cygwin_detach_dll" 488 | condition: 489 | ( 490 | (pe.linker_version.major == 2) and (pe.linker_version.minor == 56 ) or 491 | (pe.linker_version.major == 2) and (pe.linker_version.minor == 24 ) or 492 | (pe.linker_version.major == 2) and (pe.linker_version.minor == 25 ) 493 | ) 494 | and 495 | ($a0 and (any of ($aa*) )) 496 | } 497 | 498 | rule MinGW_1 499 | { 500 | meta: 501 | author = "_pusher_" 502 | date = "2016-07" 503 | strings: 504 | $a0 = "msvcrt.dll" ascii nocase 505 | $aa1 = "Mingw-w64 runtime failure:" 506 | $aa2 = "-LIBGCCW32-EH-3-SJLJ-GTHR-MINGW32" wide ascii nocase 507 | $aa3 = "_mingw32_init_mainargs" 508 | //too wild ? 509 | $aa4 = "mingw32" 510 | $aa5 = "-LIBGCCW32-EH-2-SJLJ-GTHR-MINGW32" wide ascii nocase 511 | $aa6 = "-GCCLIBCYGMING-EH-TDM1-SJLJ-GTHR-MINGW32" wide ascii nocase 512 | $aa7 = "Mingw runtime failure:" 513 | condition: 514 | ( 515 | (pe.linker_version.major == 2) and (pe.linker_version.minor == 56 ) or 516 | (pe.linker_version.major == 2) and ((pe.linker_version.minor >= 21) and (pe.linker_version.minor <= 25)) 517 | ) 518 | and 519 | ($a0 and (any of ($aa*) )) 520 | } 521 | 522 | rule FASM : flat assembler { 523 | //abit weak, needs more targets & testing 524 | meta: 525 | author = "_pusher_" 526 | date = "2016-01" 527 | description = "http://flatassembler.net" 528 | //strings: 529 | //$c0 = { 55 89 E5 83 EC 1C 8D 45 E4 6A 1C 50 FF 75 08 FF 15 ?? ?? ?? ?? 8B 45 E8 C9 C2 04 00 } 530 | condition: 531 | ( 532 | //linker 1.60..1.79 533 | (pe.linker_version.major == 1) and ((pe.linker_version.minor >= 60) and (pe.linker_version.minor < 80)) 534 | ) 535 | //and $c0 536 | } 537 | 538 | rule AutoIt 539 | { 540 | meta: 541 | author = "_pusher_" 542 | date = "2016-07" 543 | description = "www.autoitscript.com/site/autoit/" 544 | strings: 545 | $aa0 = "AutoIt has detected the stack has become corrupt.\n\nStack corruption typically occurs when either the wrong calling convention is used or when the function is called with the wrong number of arguments.\n\nAutoIt supports the __stdcall (WINAPI) and __cdecl calling conventions. The __stdcall (WINAPI) convention is used by default but __cdecl can be used instead. See the DllCall() documentation for details on changing the calling convention." wide ascii nocase 546 | $aa1 = "AutoIt Error" wide ascii nocase 547 | $aa2 = "Missing right bracket ')' in expression." wide ascii nocase 548 | $aa3 = "Missing operator in expression." wide ascii nocase 549 | $aa4 = "Unbalanced brackets in expression." wide ascii nocase 550 | $aa5 = "Error parsing function call." wide ascii nocase 551 | 552 | $aa6 = ">>>AUTOIT NO CMDEXECUTE<<<" wide ascii nocase 553 | $aa7 = "#requireadmin" wide ascii nocase 554 | $aa8 = "#OnAutoItStartRegister" wide ascii nocase 555 | $aa9 = "#notrayicon" wide ascii nocase 556 | $aa10 = "Cannot parse #include" wide ascii nocase 557 | condition: 558 | 5 of ($aa*) 559 | } 560 | 561 | 562 | rule PellesC : Pelle Orinius 563 | { 564 | meta: 565 | author = "_pusher_" 566 | date = "2016-08" 567 | description = "www.smorgasbordet.com/pellesc" 568 | strings: 569 | $aa0 = " -- terminating\x0D\x0A\x00 -- terminating\x0A\x00CRT: \x00unexpected error\x00" wide ascii nocase 570 | $aa1 = "unhandled exception (main)\x00unhandled exception in thread\x00unable to create thread\x00unable to destroy semaphore\x00" wide ascii nocase 571 | $aa2 = "unable to wait on semaphore\x00unable to post semaphore\x00unable to init semaphore\x00unable to unlock mutex\x00unable to lock mutex\x00unable to init mutex\x00" wide ascii nocase 572 | $aa3 = "invalid stream lock number\x00corrupt per-thread data\x00out of memory\x00unable to init threads\x00unable to init HEAP" wide ascii nocase 573 | condition: 574 | 3 of ($aa*) and 575 | (pe.linker_version.major == 2) and (pe.linker_version.minor == 50 ) 576 | } 577 | 578 | rule QtFrameWork 579 | { 580 | meta: 581 | author="_pusher_" 582 | date="2016-08" 583 | strings: 584 | $aa0 = "\x00Qt5Core.dll\x00" ascii 585 | $aa1 = "\x00QtCore4.dll\x00" ascii 586 | condition: 587 | (any of ($aa*) ) 588 | } 589 | 590 | /* usefull ? 18:32 2016-08-10 591 | rule masm32_tasm32 592 | { 593 | meta: 594 | author = "PEiD" 595 | description = "MASM32 / TASM32" 596 | group = "20" 597 | function = "0" 598 | strings: 599 | $a0 = { 6A ?? E8 ?? ?? ?? ?? A3 } 600 | condition: 601 | $a0 602 | } 603 | */ 604 | -------------------------------------------------------------------------------- /rules/Packers_index.yar: -------------------------------------------------------------------------------- 1 | /* 2 | Generated by Yara-Rules 3 | On 26-11-2019 4 | */ 5 | include "./Packers/JJencode.yar" 6 | include "./Packers/Javascript_exploit_and_obfuscation.yar" 7 | include "./Packers/packer.yar" 8 | include "./Packers/packer_compiler_signatures.yar" 9 | include "./Packers/peid.yar" 10 | -------------------------------------------------------------------------------- /yara_plugin.py: -------------------------------------------------------------------------------- 1 | import cutter 2 | import yara 3 | 4 | from PySide2.QtCore import QObject, SIGNAL 5 | from PySide2.QtWidgets import QAction, QLabel, QTableWidget, QTableWidgetItem, QAbstractItemView, QHeaderView 6 | 7 | class YaraDockWidget(cutter.CutterDockWidget): 8 | rule_filename = '' 9 | rule_basedir = 'rules' 10 | rules_changed = False 11 | def __init__(self, parent, action): 12 | """Initializes the widget gui.""" 13 | super(YaraDockWidget, self).__init__(parent, action) 14 | self.setObjectName('Yara') 15 | self.setWindowTitle('Yara') 16 | 17 | self.table = QTableWidget(self) 18 | self.table.setShowGrid(False) 19 | self.table.verticalHeader().hide() 20 | 21 | 22 | self.table.setColumnCount(4) 23 | 24 | self.table.setHorizontalHeaderLabels(['File Offset', 'String Content', 'Rule', 'Filename']) 25 | self.table.resizeColumnsToContents() 26 | self.table.setEditTriggers(QAbstractItemView.NoEditTriggers) 27 | self.table.setSelectionBehavior(QAbstractItemView.SelectRows) 28 | 29 | self.table.horizontalHeader().setSectionResizeMode(2, QHeaderView.Stretch) 30 | 31 | self.setWidget(self.table) 32 | 33 | cutter.core().seekChanged.connect(self.update_contents) 34 | self.update_contents() 35 | 36 | 37 | def update_contents(self): 38 | """Scans the file with YARA rules from ./rules directory.""" 39 | if not(self.rules_changed): 40 | self.table.setRowCount(0) 41 | filename = self.get_filename() 42 | try: 43 | import glob, os 44 | rules = [f for f in glob.glob('%s\\%s\\*.yar' % (os.path.dirname(os.path.abspath(__file__)), self.rule_basedir))] 45 | for rule in rules: 46 | rules = yara.compile(rule) 47 | self.rule_filename = rule.rsplit('\\', 1)[1] 48 | rules.match(filename, callback=self.mycallback) 49 | self.rules_changed = True 50 | except Exception as e: 51 | pass 52 | 53 | def get_filename(self): 54 | """Returns working project from Cutter pipe.""" 55 | binary_information = cutter.cmdj('ij') 56 | filename = binary_information['core']['file'] 57 | return filename 58 | 59 | def mycallback(self, data): 60 | """Populates the table with matching YARA rules.""" 61 | if(data['matches']): 62 | for string in data['strings']: 63 | 64 | row_position = self.table.rowCount() 65 | self.table.insertRow(row_position) 66 | 67 | self.table.setItem(row_position, 0, QTableWidgetItem(str(string[0]))) 68 | self.table.setItem(row_position, 1, QTableWidgetItem(str(string[2]))) 69 | self.table.setItem(row_position, 2, QTableWidgetItem(data['rule'])) 70 | self.table.setItem(row_position, 3, QTableWidgetItem(self.rule_filename)) 71 | 72 | yara.CALLBACK_CONTINUE 73 | 74 | 75 | class MyCutterPlugin(cutter.CutterPlugin): 76 | name = 'Yara' 77 | description = 'Scan your Cutter project with Yara rules' 78 | version = '1.0' 79 | author = 'Jannis Kirschner' 80 | 81 | def setupPlugin(self): 82 | pass 83 | 84 | def setupInterface(self, main): 85 | action = QAction('Yara', main) 86 | action.setCheckable(True) 87 | widget = YaraDockWidget(main, action) 88 | main.addPluginDockWidget(widget, action) 89 | 90 | def terminate(self): 91 | pass 92 | 93 | def create_cutter_plugin(): 94 | return MyCutterPlugin() 95 | --------------------------------------------------------------------------------