From 5290959265d32ea34a0e4030ffb7df1cbbe5d70d Mon Sep 17 00:00:00 2001 From: ex0dus-0x <17283637+ex0dus-0x@users.noreply.github.com> Date: Mon, 27 May 2024 17:14:56 -0400 Subject: [PATCH] lots of refactoring --- Cargo.lock | 2939 ++++++++++++++++++++++++++++++++++++++++++--- Cargo.toml | 6 + LICENSE.md | 2 +- src/check/elf.rs | 297 +++-- src/check/mach.rs | 127 +- src/check/mod.rs | 74 +- src/check/pe.rs | 152 ++- src/detect.rs | 154 --- src/lib.rs | 173 ++- src/main.rs | 11 +- 10 files changed, 3427 insertions(+), 508 deletions(-) delete mode 100644 src/detect.rs diff --git a/Cargo.lock b/Cargo.lock index b1b1660..dbb0303 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,37 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli 0.28.1", +] + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "log", + "memchr", +] + [[package]] name = "android-tzdata" version = "0.1.1" @@ -17,6 +48,16 @@ dependencies = [ "libc", ] +[[package]] +name = "annotate-snippets" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5a59f105fb9635e9eebdc1e29d53e764fa5795b9cf899a638a53e61567ef61" +dependencies = [ + "anstyle", + "unicode-width", +] + [[package]] name = "anstream" version = "0.6.13" @@ -52,7 +93,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -62,7 +103,81 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "anyhow" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" + +[[package]] +name = "array-bytes" +version = "6.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d5dde061bd34119e902bbb2d9b90c5692635cf59fb91d582c2b68043f1b8293" + +[[package]] +name = "ascii_tree" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca6c635b3aa665c649ad1415f1573c85957dfa47690ec27aebe7ec17efe3c643" + +[[package]] +name = "asn1-rs" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ad1373757efa0f70ec53939aabc7152e1591cb485208052993070ac8d2429d" +dependencies = [ + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7378575ff571966e99a744addeff0bff98b8ada0dedf1956d59e634db95eaac1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", + "synstructure", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", +] + +[[package]] +name = "async-trait" +version = "0.1.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", ] [[package]] @@ -71,6 +186,39 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + [[package]] name = "binsec" version = "3.1.0" @@ -79,9 +227,55 @@ dependencies = [ "chrono", "clap", "goblin", + "regex", "serde", "serde_json", "thiserror", + "yara-x", +] + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "bitmask" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5da9b3d9f6f585199287a473f4f8dfab6566cf827d15c00c219f53c645687ead" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bstr" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +dependencies = [ + "memchr", + "regex-automata", + "serde", ] [[package]] @@ -100,11 +294,26 @@ dependencies = [ "utf8-width", ] +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" + [[package]] name = "cc" version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f9fa1897e4325be0d68d48df6aa1a71ac2ed4d27723887e7754192705350730" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -123,7 +332,7 @@ dependencies = [ "js-sys", "num-traits", "wasm-bindgen", - "windows-targets", + "windows-targets 0.52.3", ] [[package]] @@ -145,7 +354,7 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim", + "strsim 0.11.1", ] [[package]] @@ -154,10 +363,10 @@ version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", - "syn", + "syn 2.0.50", ] [[package]] @@ -172,6 +381,21 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "core-foundation-sys" version = "0.8.6" @@ -179,276 +403,2412 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] -name = "goblin" -version = "0.8.1" +name = "cpp_demangle" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2dfb858618fd40cafc83efadd02705adf6ffba765098736bd950c3c945fe0" +checksum = "7e8227005286ec39567949b33df9896bcadfa6051bccca2488129f108ca23119" dependencies = [ - "log", - "plain", - "scroll", + "cfg-if", ] [[package]] -name = "heck" -version = "0.5.0" +name = "cpufeatures" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] [[package]] -name = "iana-time-zone" -version = "0.1.60" +name = "cranelift-bforest" +version = "0.106.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "3b57d4f3ffc28bbd6ef1ca7b50b20126717232f97487efe027d135d9d87eb29c" dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", + "cranelift-entity", ] [[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" +name = "cranelift-codegen" +version = "0.106.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +checksum = "d1f7d0ac7fd53f2c29db3ff9a063f6ff5a8be2abaa8f6942aceb6e1521e70df7" dependencies = [ - "cc", + "bumpalo", + "cranelift-bforest", + "cranelift-codegen-meta", + "cranelift-codegen-shared", + "cranelift-control", + "cranelift-entity", + "cranelift-isle", + "gimli 0.28.1", + "hashbrown 0.14.5", + "log", + "regalloc2", + "smallvec", + "target-lexicon", ] [[package]] -name = "itoa" -version = "1.0.10" +name = "cranelift-codegen-meta" +version = "0.106.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "b40bf21460a600178956cb7fd900a7408c6587fbb988a8063f7215361801a1da" +dependencies = [ + "cranelift-codegen-shared", +] [[package]] -name = "js-sys" -version = "0.3.68" +name = "cranelift-codegen-shared" +version = "0.106.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" +checksum = "d792ecc1243b7ebec4a7f77d9ed428ef27456eeb1f8c780587a6f5c38841be19" + +[[package]] +name = "cranelift-control" +version = "0.106.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cea2808043df964b73ad7582e09afbbe06a31f3fb9db834d53e74b4e16facaeb" dependencies = [ - "wasm-bindgen", + "arbitrary", ] [[package]] -name = "libc" -version = "0.2.153" +name = "cranelift-entity" +version = "0.106.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "f1930946836da6f514da87625cd1a0331f3908e0de454628c24a0b97b130c4d4" +dependencies = [ + "serde", + "serde_derive", +] [[package]] -name = "log" -version = "0.4.20" +name = "cranelift-frontend" +version = "0.106.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "5482a5fcdf98f2f31b21093643bdcfe9030866b8be6481117022e7f52baa0f2b" +dependencies = [ + "cranelift-codegen", + "log", + "smallvec", + "target-lexicon", +] [[package]] -name = "num-traits" -version = "0.2.18" +name = "cranelift-isle" +version = "0.106.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "6f6e1869b6053383bdb356900e42e33555b4c9ebee05699469b7c53cdafc82ea" + +[[package]] +name = "cranelift-native" +version = "0.106.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a91446e8045f1c4bc164b7bba68e2419c623904580d4b730877a663c6da38964" dependencies = [ - "autocfg", + "cranelift-codegen", + "libc", + "target-lexicon", ] [[package]] -name = "once_cell" -version = "1.19.0" +name = "cranelift-wasm" +version = "0.106.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "f8b17979b862d3b0d52de6ae3294ffe4d86c36027b56ad0443a7c8c8f921d14f" +dependencies = [ + "cranelift-codegen", + "cranelift-entity", + "cranelift-frontend", + "itertools", + "log", + "smallvec", + "wasmparser 0.201.0", + "wasmtime-types", +] [[package]] -name = "plain" -version = "0.2.3" +name = "crc32fast" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +dependencies = [ + "cfg-if", +] [[package]] -name = "proc-macro2" -version = "1.0.78" +name = "crossbeam-deque" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "unicode-ident", + "crossbeam-epoch", + "crossbeam-utils", ] [[package]] -name = "quote" -version = "1.0.35" +name = "crossbeam-epoch" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "proc-macro2", + "crossbeam-utils", ] [[package]] -name = "ryu" -version = "1.0.17" +name = "crossbeam-utils" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] -name = "scroll" -version = "0.12.0" +name = "crypto-bigint" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ab8598aa408498679922eff7fa985c25d58a90771bd6be794434c5277eab1a6" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ - "scroll_derive", + "generic-array", + "rand_core", + "subtle", + "zeroize", ] [[package]] -name = "scroll_derive" -version = "0.12.0" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f81c2fde025af7e69b1d1420531c8a8811ca898919db177141a85313b1cb932" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "proc-macro2", - "quote", - "syn", + "generic-array", + "typenum", ] [[package]] -name = "serde" -version = "1.0.197" +name = "darling" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" dependencies = [ - "serde_derive", + "darling_core", + "darling_macro", ] [[package]] -name = "serde_derive" -version = "1.0.197" +name = "darling_core" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" dependencies = [ + "fnv", + "ident_case", "proc-macro2", "quote", - "syn", + "strsim 0.10.0", + "syn 1.0.109", ] [[package]] -name = "serde_json" -version = "1.0.114" +name = "darling_macro" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ - "itoa", - "ryu", - "serde", + "darling_core", + "quote", + "syn 1.0.109", ] [[package]] -name = "strsim" -version = "0.11.1" +name = "data-encoding" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] -name = "syn" -version = "2.0.50" +name = "debugid" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" +checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "uuid", ] [[package]] -name = "thiserror" -version = "1.0.59" +name = "der" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ - "thiserror-impl", + "const-oid", + "pem-rfc7468", + "zeroize", ] [[package]] -name = "thiserror-impl" -version = "1.0.59" +name = "der-parser" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" +checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" dependencies = [ - "proc-macro2", - "quote", - "syn", + "asn1-rs", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", ] [[package]] -name = "unicode-ident" -version = "1.0.12" +name = "deranged" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "directories-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "displaydoc" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", +] + +[[package]] +name = "dsa" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48bc224a9084ad760195584ce5abb3c2c34a225fa312a128ad245a6b412b7689" +dependencies = [ + "digest", + "num-bigint-dig", + "num-traits", + "pkcs8", + "rfc6979", + "sha2", + "signature", + "zeroize", +] + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "either" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest", + "ff", + "generic-array", + "group", + "hkdf", + "pem-rfc7468", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "encoding_rs" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enum_dispatch" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" +dependencies = [ + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.50", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "fallible-iterator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" + +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + +[[package]] +name = "fastrand" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core", + "subtle", +] + +[[package]] +name = "fmmap" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6099ab52d5329340a3014f60ca91bc892181ae32e752360d07be9295924dcb0b" +dependencies = [ + "byteorder", + "bytes", + "enum_dispatch", + "fs4", + "memmapix", + "parse-display", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "fs4" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" +dependencies = [ + "rustix", + "windows-sys 0.48.0", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "fxprof-processed-profile" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" +dependencies = [ + "bitflags", + "debugid", + "fxhash", + "serde", + "serde_json", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" +dependencies = [ + "fallible-iterator 0.2.0", + "indexmap 1.9.3", + "stable_deref_trait", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +dependencies = [ + "fallible-iterator 0.3.0", + "indexmap 2.2.6", + "stable_deref_trait", +] + +[[package]] +name = "globset" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +dependencies = [ + "aho-corasick", + "bstr", + "log", + "regex-automata", + "regex-syntax 0.8.3", +] + +[[package]] +name = "globwalk" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757" +dependencies = [ + "bitflags", + "ignore", + "walkdir", +] + +[[package]] +name = "goblin" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce2dfb858618fd40cafc83efadd02705adf6ffba765098736bd950c3c945fe0" +dependencies = [ + "log", + "plain", + "scroll", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", +] + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "id-arena" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "ignore" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +dependencies = [ + "crossbeam-deque", + "globset", + "log", + "memchr", + "regex-automata", + "same-file", + "walkdir", + "winapi-util", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown 0.14.5", + "serde", +] + +[[package]] +name = "intaglio" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa3eb1c7e05b0f9ddc99a1e9f186a434fa0bfd0087d6369acf5f2814731ab610" + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" + +[[package]] +name = "ittapi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b996fe614c41395cdaedf3cf408a9534851090959d90d54a535f675550b64b1" +dependencies = [ + "anyhow", + "ittapi-sys", + "log", +] + +[[package]] +name = "ittapi-sys" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52f5385394064fa2c886205dba02598013ce83d3e92d33dbdc0c52fe0e7bf4fc" +dependencies = [ + "cc", +] + +[[package]] +name = "js-sys" +version = "0.3.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin", +] + +[[package]] +name = "leb128" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" + +[[package]] +name = "libc" +version = "0.2.153" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags", + "libc", +] + +[[package]] +name = "linkme" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "833222afbfe72868ac8f9770c91a33673f0d5fefc37c9dbe94aa3548b571623f" +dependencies = [ + "linkme-impl", +] + +[[package]] +name = "linkme-impl" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39f0dea92dbea3271557cc2e1848723967bba81f722f95026860974ec9283f08" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "mach" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +dependencies = [ + "libc", +] + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest", +] + +[[package]] +name = "md2" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f4f0f3ed25ff4f8d8d102288d92f900efc202661c884cf67dfe4f0d07c43d1f" +dependencies = [ + "digest", +] + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "memfd" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" +dependencies = [ + "rustix", +] + +[[package]] +name = "memmapix" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f517ab414225d5f1755bd284d9545bd08a72a3958b3c6384d72e95de9cc1a1d3" +dependencies = [ + "rustix", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memx" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494b592fa2aededee4bae079e13a99a3843d60e19ed8a42cc36b1701061e30c8" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num-bigint" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint-dig" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" +dependencies = [ + "byteorder", + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand", + "smallvec", + "zeroize", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "crc32fast", + "hashbrown 0.14.5", + "indexmap 2.2.6", + "memchr", +] + +[[package]] +name = "oid-registry" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c958dd45046245b9c3c2547369bb634eb461670b2e7e0de552905801a648d1d" +dependencies = [ + "asn1-rs", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + +[[package]] +name = "p384" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70786f51bcc69f6a4c0360e063a4cac5419ef7c5cd5b3c99ad70f3be5ba79209" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + +[[package]] +name = "parse-display" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6509d08722b53e8dafe97f2027b22ccbe3a5db83cb352931e9716b0aa44bc5c" +dependencies = [ + "once_cell", + "parse-display-derive", + "regex", +] + +[[package]] +name = "parse-display-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68517892c8daf78da08c0db777fcc17e07f2f63ef70041718f8a7630ad84f341" +dependencies = [ + "once_cell", + "proc-macro2", + "quote", + "regex", + "regex-syntax 0.7.5", + "structmeta", + "syn 2.0.50", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + +[[package]] +name = "pest" +version = "2.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26293c9193fbca7b1a3bf9b79dc1e388e927e6cacaa78b4a3ab705a1d3d41459" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ec22af7d3fb470a85dd2ca96b7c577a1eb4ef6f1683a9fe9a8c16e136c04687" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.50", +] + +[[package]] +name = "pest_meta" +version = "2.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7a240022f37c361ec1878d646fc5b7d7c4d28d5946e1a80ad5a7a4f4ca0bdcd" +dependencies = [ + "once_cell", + "pest", + "sha2", +] + +[[package]] +name = "pkcs1" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der", + "pkcs8", + "spki", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + +[[package]] +name = "proc-macro2" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "protobuf" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58678a64de2fced2bdec6bca052a6716a0efe692d6e3f53d1bda6a1def64cfc0" +dependencies = [ + "once_cell", + "protobuf-support", + "thiserror", +] + +[[package]] +name = "protobuf-codegen" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32777b0b3f6538d9d2e012b3fad85c7e4b9244b5958d04a6415f4333782b7a77" +dependencies = [ + "anyhow", + "once_cell", + "protobuf", + "protobuf-parse", + "regex", + "tempfile", + "thiserror", +] + +[[package]] +name = "protobuf-parse" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96cb37955261126624a25b5e6bda40ae34cf3989d52a783087ca6091b29b5642" +dependencies = [ + "anyhow", + "indexmap 1.9.3", + "log", + "protobuf", + "protobuf-support", + "tempfile", + "thiserror", + "which", +] + +[[package]] +name = "protobuf-support" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1ed294a835b0f30810e13616b1cd34943c6d1e84a8f3b0dcfe466d256c3e7e7" +dependencies = [ + "thiserror", +] + +[[package]] +name = "psm" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +dependencies = [ + "cc", +] + +[[package]] +name = "quote" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_users" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +dependencies = [ + "getrandom", + "libredox", + "thiserror", +] + +[[package]] +name = "regalloc2" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" +dependencies = [ + "hashbrown 0.13.2", + "log", + "rustc-hash", + "slice-group-by", + "smallvec", +] + +[[package]] +name = "regex" +version = "1.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax 0.8.3", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.3", +] + +[[package]] +name = "regex-syntax" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" + +[[package]] +name = "regex-syntax" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "roxmltree" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f" + +[[package]] +name = "rsa" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" +dependencies = [ + "const-oid", + "digest", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1", + "pkcs8", + "rand_core", + "signature", + "spki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom", +] + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "ryu" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scroll" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ab8598aa408498679922eff7fa985c25d58a90771bd6be794434c5277eab1a6" +dependencies = [ + "scroll_derive", +] + +[[package]] +name = "scroll_derive" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f81c2fde025af7e69b1d1420531c8a8811ca898919db177141a85313b1cb932" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + +[[package]] +name = "serde" +version = "1.0.197" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.197" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", +] + +[[package]] +name = "serde_json" +version = "1.0.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +dependencies = [ + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core", +] + +[[package]] +name = "slice-group-by" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +dependencies = [ + "serde", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "sptr" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a" + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "structmeta" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ad9e09554f0456d67a69c1584c9798ba733a5b50349a6c0d0948710523922d" +dependencies = [ + "proc-macro2", + "quote", + "structmeta-derive", + "syn 2.0.50", +] + +[[package]] +name = "structmeta-derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a60bcaff7397072dca0017d1db428e30d5002e00b6847703e2e42005c95fbe00" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", +] + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "target-lexicon" +version = "0.12.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" + +[[package]] +name = "tempfile" +version = "3.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +dependencies = [ + "cfg-if", + "fastrand", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "thiserror" +version = "1.0.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", +] + +[[package]] +name = "time" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tlsh-fixed" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f762ca8308eda1e38512dc88a99f021e5214699ba133de157f588c8bfd0745c7" + +[[package]] +name = "toml" +version = "0.8.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" +dependencies = [ + "indexmap 2.2.6", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-segmentation" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" + +[[package]] +name = "unicode-width" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "utf8-width" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" +checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "uuid" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +dependencies = [ + "getrandom", +] + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "walrus" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c03529cd0c4400a2449f640d2f27cd1b48c3065226d15e26d98e4429ab0adb7" +dependencies = [ + "anyhow", + "gimli 0.26.2", + "id-arena", + "leb128", + "log", + "walrus-macro", + "wasm-encoder 0.29.0", + "wasmparser 0.80.2", +] + +[[package]] +name = "walrus-macro" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e5bd22c71e77d60140b0bd5be56155a37e5bd14e24f5f87298040d0cc40d7" +dependencies = [ + "heck 0.3.3", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.50", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" + +[[package]] +name = "wasm-encoder" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18c41dbd92eaebf3612a39be316540b8377c871cb9bde6b064af962984912881" +dependencies = [ + "leb128", +] + +[[package]] +name = "wasm-encoder" +version = "0.201.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9c7d2731df60006819b013f64ccc2019691deccf6e11a1804bc850cd6748f1a" +dependencies = [ + "leb128", +] + +[[package]] +name = "wasm-encoder" +version = "0.208.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6425e84e42f7f558478e40ecc2287912cb319f2ca68e5c0bb93c61d4fc63fa17" +dependencies = [ + "leb128", +] + +[[package]] +name = "wasmparser" +version = "0.80.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "449167e2832691a1bff24cde28d2804e90e09586a448c8e76984792c44334a6b" + +[[package]] +name = "wasmparser" +version = "0.201.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84e5df6dba6c0d7fafc63a450f1738451ed7a0b52295d83e868218fa286bf708" +dependencies = [ + "bitflags", + "indexmap 2.2.6", + "semver", +] + +[[package]] +name = "wasmprinter" +version = "0.201.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a67e66da702706ba08729a78e3c0079085f6bfcb1a62e4799e97bbf728c2c265" +dependencies = [ + "anyhow", + "wasmparser 0.201.0", +] + +[[package]] +name = "wasmtime" +version = "19.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e300c0e3f19dc9064e3b17ce661088646c70dbdde36aab46470ed68ba58db7d" +dependencies = [ + "addr2line", + "anyhow", + "async-trait", + "bincode", + "bumpalo", + "cfg-if", + "encoding_rs", + "fxprof-processed-profile", + "gimli 0.28.1", + "indexmap 2.2.6", + "ittapi", + "libc", + "log", + "object", + "once_cell", + "paste", + "rayon", + "rustix", + "semver", + "serde", + "serde_derive", + "serde_json", + "target-lexicon", + "wasm-encoder 0.201.0", + "wasmparser 0.201.0", + "wasmtime-cache", + "wasmtime-component-macro", + "wasmtime-component-util", + "wasmtime-cranelift", + "wasmtime-environ", + "wasmtime-fiber", + "wasmtime-jit-debug", + "wasmtime-jit-icache-coherence", + "wasmtime-runtime", + "wasmtime-slab", + "wasmtime-winch", + "wat", + "windows-sys 0.52.0", +] + +[[package]] +name = "wasmtime-asm-macros" +version = "19.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "110aa598e02a136fb095ca70fa96367fc16bab55256a131e66f9b58f16c73daf" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "wasmtime-cache" +version = "19.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4e660537b0ac2fc76917fb0cc9d403d2448b6983a84e59c51f7fea7b7dae024" +dependencies = [ + "anyhow", + "base64 0.21.7", + "bincode", + "directories-next", + "log", + "rustix", + "serde", + "serde_derive", + "sha2", + "toml", + "windows-sys 0.52.0", + "zstd", +] + +[[package]] +name = "wasmtime-component-macro" +version = "19.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "091f32ce586251ac4d07019388fb665b010d9518ffe47be1ddbabb162eed6007" +dependencies = [ + "anyhow", + "proc-macro2", + "quote", + "syn 2.0.50", + "wasmtime-component-util", + "wasmtime-wit-bindgen", + "wit-parser", +] [[package]] -name = "utf8parse" -version = "0.2.1" +name = "wasmtime-component-util" +version = "19.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "0dd17dc1ebc0b28fd24b6b9d07638f55b82ae908918ff08fd221f8b0fefa9125" [[package]] -name = "wasm-bindgen" -version = "0.2.91" +name = "wasmtime-cranelift" +version = "19.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" +checksum = "e923262451a4b5b39fe02f69f1338d56356db470e289ea1887346b9c7f592738" dependencies = [ + "anyhow", "cfg-if", - "wasm-bindgen-macro", + "cranelift-codegen", + "cranelift-control", + "cranelift-entity", + "cranelift-frontend", + "cranelift-native", + "cranelift-wasm", + "gimli 0.28.1", + "log", + "object", + "target-lexicon", + "thiserror", + "wasmparser 0.201.0", + "wasmtime-cranelift-shared", + "wasmtime-environ", + "wasmtime-versioned-export-macros", ] [[package]] -name = "wasm-bindgen-backend" -version = "0.2.91" +name = "wasmtime-cranelift-shared" +version = "19.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" +checksum = "508898cbbea0df81a5d29cfc1c7c72431a1bc4c9e89fd9514b4c868474c05c7a" dependencies = [ - "bumpalo", + "anyhow", + "cranelift-codegen", + "cranelift-control", + "cranelift-native", + "gimli 0.28.1", + "object", + "target-lexicon", + "wasmtime-environ", +] + +[[package]] +name = "wasmtime-environ" +version = "19.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7e3f2aa72dbb64c19708646e1ff97650f34e254598b82bad5578ea9c80edd30" +dependencies = [ + "anyhow", + "bincode", + "cpp_demangle", + "cranelift-entity", + "gimli 0.28.1", + "indexmap 2.2.6", "log", + "object", + "rustc-demangle", + "serde", + "serde_derive", + "target-lexicon", + "thiserror", + "wasm-encoder 0.201.0", + "wasmparser 0.201.0", + "wasmprinter", + "wasmtime-component-util", + "wasmtime-types", +] + +[[package]] +name = "wasmtime-fiber" +version = "19.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9235b643527bcbac808216ed342e1fba324c95f14a62762acfa6f2e6ca5edbd6" +dependencies = [ + "anyhow", + "cc", + "cfg-if", + "rustix", + "wasmtime-asm-macros", + "wasmtime-versioned-export-macros", + "windows-sys 0.52.0", +] + +[[package]] +name = "wasmtime-jit-debug" +version = "19.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92de34217bf7f0464262adf391a9950eba440f9dfc7d3b0e3209302875c6f65f" +dependencies = [ + "object", "once_cell", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", + "rustix", + "wasmtime-versioned-export-macros", ] [[package]] -name = "wasm-bindgen-macro" -version = "0.2.91" +name = "wasmtime-jit-icache-coherence" +version = "19.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" +checksum = "c22ca2ef4d87b23d400660373453e274b2251bc2d674e3102497f690135e04b0" dependencies = [ - "quote", - "wasm-bindgen-macro-support", + "cfg-if", + "libc", + "windows-sys 0.52.0", ] [[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.91" +name = "wasmtime-runtime" +version = "19.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" +checksum = "1806ee242ca4fd183309b7406e4e83ae7739b7569f395d56700de7c7ef9f5eb8" +dependencies = [ + "anyhow", + "cc", + "cfg-if", + "encoding_rs", + "indexmap 2.2.6", + "libc", + "log", + "mach", + "memfd", + "memoffset", + "paste", + "psm", + "rustix", + "sptr", + "wasm-encoder 0.201.0", + "wasmtime-asm-macros", + "wasmtime-environ", + "wasmtime-fiber", + "wasmtime-jit-debug", + "wasmtime-versioned-export-macros", + "wasmtime-wmemcheck", + "windows-sys 0.52.0", +] + +[[package]] +name = "wasmtime-slab" +version = "19.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20c58bef9ce877fd06acb58f08d003af17cb05cc51225b455e999fbad8e584c0" + +[[package]] +name = "wasmtime-types" +version = "19.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cebe297aa063136d9d2e5b347c1528868aa43c2c8d0e1eb0eec144567e38fe0f" +dependencies = [ + "cranelift-entity", + "serde", + "serde_derive", + "thiserror", + "wasmparser 0.201.0", +] + +[[package]] +name = "wasmtime-versioned-export-macros" +version = "19.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffaafa5c12355b1a9ee068e9295d50c4ca0a400c721950cdae4f5b54391a2da5" dependencies = [ "proc-macro2", "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", + "syn 2.0.50", ] [[package]] -name = "wasm-bindgen-shared" -version = "0.2.91" +name = "wasmtime-winch" +version = "19.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" +checksum = "d618b4e90d3f259b1b77411ce573c9f74aade561957102132e169918aabdc863" +dependencies = [ + "anyhow", + "cranelift-codegen", + "gimli 0.28.1", + "object", + "target-lexicon", + "wasmparser 0.201.0", + "wasmtime-cranelift-shared", + "wasmtime-environ", + "winch-codegen", +] + +[[package]] +name = "wasmtime-wit-bindgen" +version = "19.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c7a253c8505edd7493603e548bff3af937b0b7dbf2b498bd5ff2131b651af72" +dependencies = [ + "anyhow", + "heck 0.4.1", + "indexmap 2.2.6", + "wit-parser", +] + +[[package]] +name = "wasmtime-wmemcheck" +version = "19.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9a8c62e9df8322b2166d2a6f096fbec195ddb093748fd74170dcf25ef596769" + +[[package]] +name = "wast" +version = "208.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc00b3f023b4e2ccd2e054e240294263db52ae962892e6523e550783c83a67f1" +dependencies = [ + "bumpalo", + "leb128", + "memchr", + "unicode-width", + "wasm-encoder 0.208.1", +] + +[[package]] +name = "wat" +version = "1.208.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58ed38e59176550214c025ea2bd0eeefd8e86b92d0af6698d5ba95020ec2e07b" +dependencies = [ + "wast", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "winch-codegen" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d15869abc9e3bb29c017c003dbe007a08e9910e8ff9023a962aa13c1b2ee6af" +dependencies = [ + "anyhow", + "cranelift-codegen", + "gimli 0.28.1", + "regalloc2", + "smallvec", + "target-lexicon", + "wasmparser 0.201.0", + "wasmtime-environ", +] [[package]] name = "windows-core" @@ -456,7 +2816,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets", + "windows-targets 0.52.3", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", ] [[package]] @@ -465,7 +2834,22 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets", + "windows-targets 0.52.3", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -474,53 +2858,314 @@ version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d380ba1dc7187569a8a9e91ed34b8ccfc33123bbacb8c0aed2d1ad7f3ef2dc5f" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.52.3", + "windows_aarch64_msvc 0.52.3", + "windows_i686_gnu 0.52.3", + "windows_i686_msvc 0.52.3", + "windows_x86_64_gnu 0.52.3", + "windows_x86_64_gnullvm 0.52.3", + "windows_x86_64_msvc 0.52.3", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68e5dcfb9413f53afd9c8f86e56a7b4d86d9a2fa26090ea2dc9e40fba56c6ec6" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + [[package]] name = "windows_aarch64_msvc" version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8dab469ebbc45798319e69eebf92308e541ce46760b49b18c6b3fe5e8965b30f" +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + [[package]] name = "windows_i686_gnu" version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a4e9b6a7cac734a8b4138a4e1044eac3404d8326b6c0f939276560687a033fb" +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + [[package]] name = "windows_i686_msvc" version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28b0ec9c422ca95ff34a78755cfa6ad4a51371da2a5ace67500cf7ca5f232c58" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + [[package]] name = "windows_x86_64_gnu" version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "704131571ba93e89d7cd43482277d6632589b18ecf4468f591fbae0a8b101614" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42079295511643151e98d61c38c0acc444e52dd42ab456f7ccfd5152e8ecf21c" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + [[package]] name = "windows_x86_64_msvc" version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0770833d60a970638e989b3fa9fd2bb1aaadcf88963d1659fd7d9990196ed2d6" + +[[package]] +name = "winnow" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-parser" +version = "0.201.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "196d3ecfc4b759a8573bf86a9b3f8996b304b3732e4c7de81655f875f6efdca6" +dependencies = [ + "anyhow", + "id-arena", + "indexmap 2.2.6", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.201.0", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "x509-parser" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69" +dependencies = [ + "asn1-rs", + "data-encoding", + "der-parser", + "lazy_static", + "nom", + "oid-registry", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "yansi" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" + +[[package]] +name = "yara-x" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b23afc9e22d403f12e8fdd6451ae155cf10500f299de993b71c761433acc9b95" +dependencies = [ + "aho-corasick", + "anyhow", + "array-bytes", + "ascii_tree", + "base64 0.22.1", + "bincode", + "bitmask", + "bitvec", + "bstr", + "const-oid", + "crc32fast", + "der-parser", + "digest", + "dsa", + "ecdsa", + "fmmap", + "globwalk", + "indexmap 2.2.6", + "intaglio", + "itertools", + "lazy_static", + "linkme", + "md-5", + "md2", + "memchr", + "memx", + "nom", + "num-derive", + "num-traits", + "p256", + "p384", + "protobuf", + "protobuf-codegen", + "protobuf-parse", + "regex-automata", + "regex-syntax 0.8.3", + "roxmltree", + "rsa", + "rustc-hash", + "serde", + "serde_json", + "sha1", + "sha2", + "smallvec", + "thiserror", + "tlsh-fixed", + "uuid", + "walrus", + "wasmtime", + "x509-parser", + "yansi", + "yara-x-macros", + "yara-x-parser", + "yara-x-proto", +] + +[[package]] +name = "yara-x-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02976b0ad9eec42f779b51ae861034be90ec0e5a9543ff8e3d11ac85ad821d2e" +dependencies = [ + "convert_case", + "darling", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "yara-x-parser" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e6179afd15082d5fbbc22c8231afe8e6b1b40c837a901d6bbe9421fa096d7f8" +dependencies = [ + "annotate-snippets", + "base64 0.22.1", + "bitmask", + "bstr", + "itertools", + "lazy_static", + "num-traits", + "pest", + "pest_derive", + "thiserror", + "yansi", + "yara-x-macros", +] + +[[package]] +name = "yara-x-proto" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a27576e92be2902c0fa8ab250bc405ffe6718915f362320c4881f33fc109e2f9" +dependencies = [ + "protobuf", + "protobuf-codegen", + "protobuf-parse", +] + +[[package]] +name = "zerocopy" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zstd" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.10+zstd.1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/Cargo.toml b/Cargo.toml index 28541e8..a81720d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,12 @@ goblin = "0.8.1" byte-unit = "4.0.10" chrono = "0.4" thiserror = "1.0.59" +regex = "1.10.4" serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } + +yara-x = { version = "0.3.0", optional = true } + +[features] +advanced_scan = ["dep:yara-x"] \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md index 3d87efd..f8305ea 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright 2020 Alan Cao +Copyright 2024 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/src/check/elf.rs b/src/check/elf.rs index 09c1a74..7a8a2c1 100644 --- a/src/check/elf.rs +++ b/src/check/elf.rs @@ -1,13 +1,10 @@ //! ### ELF-Specific Compilation Checks: //! -//! * Binary Type -//! * Static Compilation -//! * Stripped Executable -//! * Compiler Runtime +//! * Static compilation //! * Linker Path //! * Minimum glibc Version //! -//! ### Exploit Mitigations: +//! ### ELF-Specific Exploit Mitigations: //! //! * NX (Non-eXecutable bit) stack //! * Stack Canaries @@ -17,44 +14,123 @@ use goblin::elf::dynamic::{tag_to_str, Dyn}; use goblin::elf::{header, program_header, Elf}; +use regex::Regex; use serde_json::json; +use std::collections::HashSet; +use std::fmt::{self, Display}; use crate::check::{Analyze, GenericMap}; use crate::BinResult; +use super::UniversalCompilationProperties; + const GLIBC: &str = "GLIBC_2."; -impl Analyze for Elf<'_> { - fn compilation(&self, bytes: &[u8]) -> BinResult { - let mut comp_map: GenericMap = GenericMap::new(); +enum LinuxCompiler { + Gcc(Option), + Clang(Option), + Unknown, +} - // supported: shared object (pie exec or .so) or executable - comp_map.insert( - "Binary Type".to_string(), - json!(header::et_to_str(self.header.e_type)), - ); +impl Display for LinuxCompiler { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match self { + Self::Gcc(Some(ver)) => write!(f, "GCC version {}", ver), + Self::Gcc(None) => write!(f, "GCC version "), + Self::Clang(Some(ver)) => write!(f, "Clang/LLVM version {}", ver), + Self::Clang(None) => write!(f, "Clang/LLVM version "), + _ => write!(f, ""), + } + } +} + +impl LinuxCompiler { + /// Given data from `.comment`, deduce a compiler + version triplet. + /// TODO(alan): need more binary artifacts to test and make this better. + fn parse(compiler_string: &str) -> LinuxCompiler { + // parse for unique version triplets in the string + let ver_triplet_re = Regex::new(r"\b\d+\.\d+(\.\d+)?\b").unwrap(); + let ver_set: Vec<&str> = ver_triplet_re + .find_iter(compiler_string) + .map(|mat| mat.as_str()) + .collect(); + + let unique_vers: HashSet<&str> = ver_set.into_iter().collect(); + let versions: Vec<&str> = unique_vers.into_iter().collect(); + let min_ver = versions.first().map(|s| s.to_string()); - // pattern match for compilers - for test in self.section_headers.clone().into_iter() { - let _symbol = self.shdr_strtab.get_at(test.sh_name); - if let Some(sym) = _symbol {} + // parse for the actual compiler + if compiler_string.contains("clang") { + LinuxCompiler::Clang(min_ver) + } else if compiler_string.contains("GCC:") { + LinuxCompiler::Gcc(min_ver) + } else { + LinuxCompiler::Unknown } - //let runtime = self.detect_compiler_runtime(rules::ELF_COMPILER_RULES, bytes)?; - //comp_map.insert("Compiler Runtime".to_string(), json!(runtime)); + } +} - // static executable: check if PT_INTERP segment exists - let static_exec: bool = !self - .program_headers - .iter() - .any(|ph| program_header::pt_to_str(ph.p_type) == "PT_INTERP"); - comp_map.insert("Statically Compiled".to_string(), json!(static_exec)); +#[derive(serde::Deserialize, serde::Serialize, Debug)] +pub enum Relro { + Partial, + Full, + None, +} - // path to linker if dynamic linking enabled - if let Some(linker) = self.interpreter { - comp_map.insert("Linker Path".to_string(), json!(linker)); +impl UniversalCompilationProperties for Elf<'_> { + // common: shared object (pie exec or .so) or non-pie executable + fn binary_type(&self) -> &str { + header::et_to_str(self.header.e_type) + } + + fn is_stripped(&self) -> bool { + self.syms.is_empty() + } + + fn compiler_runtime(&self, bytes: &[u8]) -> Option { + // most simple: `.comment` section annotating the compiler version + let mut compilation_string: Option<&str> = None; + for section in self.section_headers.clone().into_iter() { + let _symbol = self.shdr_strtab.get_at(section.sh_name); + if let Some(sym) = _symbol { + if sym == ".comment" { + let comment_section = &bytes[section.sh_offset as usize + ..(section.sh_offset + section.sh_size) as usize]; + if let Ok(comment_str) = std::str::from_utf8(comment_section) { + compilation_string = Some(comment_str); + } + } + } + } + + if let Some(comp_string) = compilation_string { + let comp_value = LinuxCompiler::parse(comp_string); + return Some(comp_value.to_string()); } + None + } +} + +trait ElfCompilationProperties { + fn is_statically_compiled(&self) -> bool; + fn linker_path(&self) -> Option<&str>; + fn libc(&self) -> f64; +} + +impl ElfCompilationProperties for Elf<'_> { + // elf static executable: check if PT_INTERP segment exists + fn is_statically_compiled(&self) -> bool { + self.program_headers + .iter() + .any(|ph| program_header::pt_to_str(ph.p_type) == "PT_INTERP") + } + + fn linker_path(&self) -> Option<&str> { + self.interpreter + } - // parse minimum glibc version needed + // TODO(alan): match on other stdlib runtimes + fn libc(&self) -> f64 { let mut glibcs: Vec = vec![]; for sym in self.dynstrtab.to_vec().unwrap() { if sym.starts_with(GLIBC) { @@ -63,75 +139,120 @@ impl Analyze for Elf<'_> { glibcs.push(version); } } - let min_ver = glibcs.iter().fold(f64::INFINITY, |a, &b| a.min(b)); - comp_map.insert( - "Minimum Libc Version".to_string(), - json!(format!("2.{:?}", min_ver)), - ); - comp_map.insert( - "Stripped Executable".to_string(), - json!(self.syms.is_empty()), - ); - Ok(comp_map) + if !glibcs.is_empty() { + glibcs.iter().fold(f64::INFINITY, |a, &b| a.min(b)) + } else { + 0.0 + } } +} - fn mitigations(&self) -> GenericMap { - let mut mitigate_map: GenericMap = GenericMap::new(); +pub trait ElfMitigations { + fn executable_stack(&self) -> bool; + fn stack_canary(&self) -> bool; + fn fortify_source(&self) -> bool; + fn position_independent(&self) -> bool; + fn relro(&self) -> Relro; +} - // features we are checking for - let mut nx_bit: bool = false; - let mut relro: String = "NONE".to_string(); - let mut stack_canary: bool = false; - let mut fortify_source: bool = false; - - // iterate over program headers for exploit mitigation fingerprints - for ph in self.program_headers.iter() { - // check for NX bit - if program_header::pt_to_str(ph.p_type) == "PT_GNU_STACK" && ph.p_flags == 6 { - nx_bit = true; - } +impl ElfMitigations for Elf<'_> { + fn executable_stack(&self) -> bool { + self.program_headers + .iter() + .any(|ph| program_header::pt_to_str(ph.p_type) == "PT_GNU_STACK" && ph.p_flags == 6) + } - // check for RELRO - if program_header::pt_to_str(ph.p_type) == "PT_GNU_RELRO" { - // check for full/partial RELRO support by checking dynamic section for DT_BIND_NOW flag. - // DT_BIND_NOW takes precedence over lazy binding and processes relocations before actual execution. - if let Some(segs) = &self.dynamic { - let dyn_seg: Option = segs - .dyns - .iter() - .find(|tag| tag_to_str(tag.d_tag) == "DT_BIND_NOW") - .cloned(); - - if dyn_seg.is_some() { - relro = "FULL".to_string(); - } else { - relro = "PARTIAL".to_string(); - } - } + fn stack_canary(&self) -> bool { + self.syms + .iter() + .filter_map(|sym| self.strtab.get_at(sym.st_name)) + .any(|symstr| symstr == "__stack_chk_fail" || symstr == "__stack_chk_guard") + } + + fn fortify_source(&self) -> bool { + // TODO: list fortified symbols + self.syms + .iter() + .filter_map(|sym| self.strtab.get_at(sym.st_name)) + .any(|symstr| symstr.ends_with("_chk")) + } + + fn position_independent(&self) -> bool { + matches!(self.header.e_type, 3) + } + + fn relro(&self) -> Relro { + if !self + .program_headers + .iter() + .any(|ph| program_header::pt_to_str(ph.p_type) == "PT_GNU_RELRO") + { + return Relro::None; + } + + // check for full/partial RELRO support by checking dynamic section for DT_BIND_NOW flag. + // DT_BIND_NOW takes precedence over lazy binding and processes relocations before actual execution. + if let Some(segs) = &self.dynamic { + let dyn_seg: Option = segs + .dyns + .iter() + .find(|tag| tag_to_str(tag.d_tag) == "DT_BIND_NOW") + .cloned(); + + if dyn_seg.is_some() { + return Relro::Full; + } else { + return Relro::Partial; } } - mitigate_map.insert("Executable Stack (NX Bit)".to_string(), json!(nx_bit)); - mitigate_map.insert("Read-Only Relocatable (RELRO)".to_string(), json!(relro)); - mitigate_map.insert( - "Position Independent Executable (PIE)".to_string(), - json!(matches!(self.header.e_type, 3)), + Relro::None + } +} + +impl Analyze for Elf<'_> { + fn compilation(&self, bytes: &[u8]) -> BinResult { + let mut comp_map: GenericMap = GenericMap::new(); + comp_map.insert("Binary Type".to_string(), json!(self.binary_type())); + comp_map.insert("Stripped Executable".to_string(), json!(self.is_stripped())); + comp_map.insert( + "Statically Compiled".to_string(), + json!(self.is_statically_compiled()), ); - // find symbols for stack canary and FORTIFY_SOURCE - for _sym in self.syms.iter() { - let _symbol = self.strtab.get_at(_sym.st_name); - if let Some(symbol) = _symbol { - if symbol == "__stack_chk_fail" { - stack_canary = true; + if let Some(comp) = self.compiler_runtime(bytes) { + comp_map.insert("Compiler Runtime".to_string(), json!(comp)); + } - // TODO: make tighter - } else if symbol.ends_with("_chk") { - fortify_source = true; - } - } + // path to linker if dynamic linking enabled + if let Some(linker) = self.linker_path() { + comp_map.insert("Linker Path".to_string(), json!(linker)); + } + + if self.libc() != 0.0 { + comp_map.insert( + "Minimum Libc Version".to_string(), + json!(format!("2.{:?}", self.libc())), + ); } - mitigate_map.insert("Stack Canary".to_string(), json!(stack_canary)); - mitigate_map.insert("FORTIFY_SOURCE".to_string(), json!(fortify_source)); + Ok(comp_map) + } + + fn mitigations(&self) -> GenericMap { + let mut mitigate_map: GenericMap = GenericMap::new(); + mitigate_map.insert( + "Executable Stack (NX Bit)".to_string(), + json!(self.executable_stack()), + ); + mitigate_map.insert( + "Read-Only Relocatable (RELRO)".to_string(), + json!(self.relro()), + ); + mitigate_map.insert( + "Position Independent Executable (PIE)".to_string(), + json!(self.position_independent()), + ); + mitigate_map.insert("Stack Canary".to_string(), json!(self.stack_canary())); + mitigate_map.insert("FORTIFY_SOURCE".to_string(), json!(self.fortify_source())); mitigate_map } diff --git a/src/check/mach.rs b/src/check/mach.rs index 9c0b0c1..ed54baa 100644 --- a/src/check/mach.rs +++ b/src/check/mach.rs @@ -1,66 +1,127 @@ -//! Checks for following exploit mitigations: +//! ### Mach-O Specific Compilation Checks: +//! +//! * TODO +//! +//! ### Exploit Mitigations: //! //! * NX (Non-eXecutable bit) stack //! * NX (Non-eXecutable bit) heap //! * Position-Independent Executable //! * Stack Canaries //! * Restricted segment -use goblin::mach::MachO; +//! * __PAGEZERO segment +use goblin::mach::{header, MachO}; use serde_json::json; use crate::check::{Analyze, GenericMap}; use crate::BinResult; +use super::UniversalCompilationProperties; + const MH_PIE: u32 = 0x200000; const MH_ALLOW_STACK_EXECUTION: u32 = 0x20000; const MH_NO_HEAP_EXECUTION: u32 = 0x1000000; -impl Analyze for MachO<'_> { - fn compilation(&self, _bytes: &[u8]) -> BinResult { - todo!() +impl UniversalCompilationProperties for MachO<'_> { + fn binary_type(&self) -> &str { + header::filetype_to_str(self.header.filetype) } - fn mitigations(&self) -> GenericMap { - let mut mitigate_map: GenericMap = GenericMap::new(); + fn is_stripped(&self) -> bool { + self.symbols.is_none() + } + + fn compiler_runtime(&self, _bytes: &[u8]) -> Option { + unimplemented!() + } +} - let nx_stack: bool = matches!(self.header.flags & MH_ALLOW_STACK_EXECUTION, 0); - mitigate_map.insert("Executable Stack".to_string(), json!(nx_stack)); +trait MachOMitigations { + fn executable_stack(&self) -> bool; + fn executable_heap(&self) -> bool; + fn position_independent(&self) -> bool; + fn stack_canary(&self) -> bool; + fn restricted_segment(&self) -> bool; + fn pagezero_segment(&self) -> bool; +} - let nx_heap: bool = matches!(self.header.flags & MH_NO_HEAP_EXECUTION, 0); - mitigate_map.insert("Executable Heap".to_string(), json!(nx_heap)); +impl MachOMitigations for MachO<'_> { + fn executable_stack(&self) -> bool { + matches!(self.header.flags & MH_ALLOW_STACK_EXECUTION, 0) + } - let aslr: bool = matches!(self.header.flags & MH_PIE, 0); - mitigate_map.insert( - "Position Independent Executable / ASLR".to_string(), - json!(aslr), - ); + fn executable_heap(&self) -> bool { + matches!(self.header.flags & MH_NO_HEAP_EXECUTION, 0) + } - // check for stack canary by finding canary functions in imports - let stack_canary: bool = match self.imports() { + fn position_independent(&self) -> bool { + matches!(self.header.flags & MH_PIE, 0) + } + + // Check for stack canary by finding canary functions in imports + fn stack_canary(&self) -> bool { + match self.imports() { Ok(imports) => imports .iter() .any(|x| x.name == "__stack_chk_fail" || x.name == "__stack_chk_guard"), Err(_) => false, - }; - mitigate_map.insert("Stack Canary".to_string(), json!(stack_canary)); + } + } + + // Check for __RESTRICT section for stopping dylib injection + fn restricted_segment(&self) -> bool { + self.segments + .iter() + .filter_map(|s| s.name().ok()) + .any(|s| s.to_lowercase() == "__restrict") + } - // check for __RESTRICT section for stopping dynlib injection - let restrict: bool = self - .segments + fn pagezero_segment(&self) -> bool { + self.segments .iter() - .filter_map(|s| { - if let Ok(name) = s.name() { - Some(name.to_string()) - } else { - None - } - }) - .any(|s| s.to_lowercase() == "__restrict"); - mitigate_map.insert("__RESTRICT segment".to_string(), json!(restrict)); + .filter_map(|s| s.name().ok()) + .any(|s| s.to_lowercase() == "__PAGEZERO") + } +} + +impl Analyze for MachO<'_> { + fn compilation(&self, _bytes: &[u8]) -> BinResult { + let mut comp_map = GenericMap::new(); + comp_map.insert("Binary Type".to_string(), json!(self.binary_type())); + comp_map.insert("Debug Stripped".to_string(), json!(self.is_stripped())); + Ok(comp_map) + } + + fn mitigations(&self) -> GenericMap { + let mut mitigate_map: GenericMap = GenericMap::new(); + mitigate_map.insert( + "Executable Stack".to_string(), + json!(self.executable_stack()), + ); + mitigate_map.insert("Executable Heap".to_string(), json!(self.executable_heap())); + mitigate_map.insert( + "Position Independent Executable / ASLR".to_string(), + json!(self.position_independent()), + ); + mitigate_map.insert("Stack Canary".to_string(), json!(self.stack_canary())); + mitigate_map.insert( + "__RESTRICT segment".to_string(), + json!(self.restricted_segment()), + ); mitigate_map } fn instrumentation(&self) -> GenericMap { - unimplemented!(); + let mut instr_map: GenericMap = GenericMap::new(); + let asan: bool = match self.imports() { + Ok(imports) => imports.iter().any(|x| x.name.starts_with("__asan")), + Err(_) => false, + }; + + if asan { + instr_map.insert("Address Sanitizer (ASAN)".to_string(), json!(true)); + } + + instr_map } } diff --git a/src/check/mod.rs b/src/check/mod.rs index 535429a..c6a2122 100644 --- a/src/check/mod.rs +++ b/src/check/mod.rs @@ -7,32 +7,58 @@ use crate::BinResult; // represents map used to store tabulated results pub type GenericMap = std::collections::BTreeMap; -/// Defines trait implemented by each supported libgoblin binary format to expose common and -/// reusable functions for parsing out features and doing static analysis. -pub trait Analyze { - fn detect_compiler_runtime(&self, os_specific: &str, bytes: &[u8]) -> BinResult { - /* - // initialize with universal compiler runtime rules first, then add os_specific ones - let mut compiler = Compiler::new()?; - compiler.add_rules_str(UNIVERSAL_COMPILER_RULES)?; - compiler.add_rules_str(os_specific)?; - - // compile rules and match - let rules = compiler.compile_rules()?; - let matches = rules.scan_mem(&bytes, 5)?; - if matches.is_empty() { - return Ok("N/A".to_string()); - } - - if let MetadataValue::String(name) = matches[0].metadatas[0].value { - Ok(name.to_string()) - } else { - Ok("N/A".to_string()) - }*/ - Ok("N/A".to_string()) +/// Used only if `advanced_scan` feature is enabled, as this relies on byte matching with +/// the new experimental YARA-X crate. +#[cfg(feature = "advanced_scan")] +pub fn detect_compiler_runtime(bytes: &[u8]) -> BinResult<()> { + let universal_runtime_rules: &str = r#" + rule rust { + meta: + name = "rustc" + strings: + $mangled = /_ZN\w+rustc_demangle\w+\d+/ + condition: + any of them + } + + rule golang { + meta: + name = "go" + strings: + $a = "runtime.decoderune" + $b = "golang" + condition: + $a or $b } - /// To be implemented for each specific binary format + rule pyinstaller { + meta: + name = "Python / PyInstaller" + strings: + $pyi = "pyi_bootstrap" + condition: + $pyi + } +"#; + + let mut compiler = yara_x::Compiler::new(); + let rules = compiler.build(); + let mut scanner = yara_x::Scanner::new(&rules); + let results = scanner.scan(bytes)?; + + Ok(()) +} + +/// Compilation properties we assess on every binary format we support. +pub trait UniversalCompilationProperties { + fn binary_type(&self) -> &str; + fn is_stripped(&self) -> bool; + //fn is_cxx(&self) -> bool; + fn compiler_runtime(&self, bytes: &[u8]) -> Option; +} + +/// Defines trait implemented by each supported libgoblin binary format +pub trait Analyze { fn compilation(&self, bytes: &[u8]) -> BinResult; fn mitigations(&self) -> GenericMap; fn instrumentation(&self) -> GenericMap; diff --git a/src/check/pe.rs b/src/check/pe.rs index a9e8d8f..b6e048e 100644 --- a/src/check/pe.rs +++ b/src/check/pe.rs @@ -1,10 +1,8 @@ //! ### PE-Specific Compilation Checks: //! -//! * Binary Type -//! * Compiler Runtime -//! * Debug Info Stripped +//! * TODO //! -//! ### Exploit Mitigations: +//! ### PE-Specific Exploit Mitigations: //! //! * Data Execution Prevention (DEP / NX) //! * Dynamic Base @@ -19,77 +17,127 @@ use serde_json::json; use crate::check::{Analyze, GenericMap}; use crate::BinResult; -impl Analyze for PE<'_> { - fn compilation(&self, bytes: &[u8]) -> BinResult { - let mut comp_map = GenericMap::new(); +use super::UniversalCompilationProperties; - // supported: DLL or EXE - let bintype: &str = match self.is_lib { +impl UniversalCompilationProperties for PE<'_> { + fn binary_type(&self) -> &str { + match self.is_lib { true => "DLL", false => "EXE", - }; - comp_map.insert("Binary Type".to_string(), json!(bintype)); + } + } - // debug info stripped - let debug_stripped: bool = matches!( + fn is_stripped(&self) -> bool { + matches!( self.header.coff_header.characteristics & IMAGE_FILE_DEBUG_STRIPPED, 0 - ); - comp_map.insert("Debug Stripped".to_string(), json!(debug_stripped)); + ) + } - // pattern match for compilers - //let runtime = self.detect_compiler_runtime(rules::PE_COMPILER_RULES, bytes)?; - //comp_map.insert("Compiler Runtime".to_string(), json!(runtime)); - Ok(comp_map) + // TODO + fn compiler_runtime(&self, _bytes: &[u8]) -> Option { + unimplemented!() } +} - fn mitigations(&self) -> GenericMap { - let mut mitigation_checks: GenericMap = GenericMap::new(); +trait PeMitigations { + fn _dll_characteristics(&self) -> u16; + fn data_execution_prevention(&self) -> bool; + fn dynamic_base(&self) -> bool; + fn structured_exception_handling(&self) -> bool; + fn isolation_aware_execution(&self) -> bool; + fn aslr(&self) -> bool; + fn high_entropy(&self) -> bool; + fn control_flow_guard(&self) -> bool; + fn code_integrity(&self) -> bool; +} +impl PeMitigations for PE<'_> { + fn _dll_characteristics(&self) -> u16 { if let Some(optional_header) = self.header.optional_header { - let dll_chars: u16 = optional_header.windows_fields.dll_characteristics; - let image_chars: u16 = self.header.coff_header.characteristics; + return optional_header.windows_fields.dll_characteristics; + } + 0 + } - // context independent mitigations - let dep: bool = matches!(dll_chars & 0x0100, 0); - mitigation_checks.insert("Data Execution Protection (DEP)".to_string(), json!(dep)); + fn data_execution_prevention(&self) -> bool { + matches!(self._dll_characteristics() & 0x0100, 0) + } - let dynamic_base: bool = matches!(dll_chars & 0x0040, 0); - mitigation_checks.insert("Dynamic Base".to_string(), json!(dynamic_base)); + fn dynamic_base(&self) -> bool { + matches!(self._dll_characteristics() & 0x0040, 0) + } - let seh: bool = matches!(dll_chars & 0x0400, 0); - mitigation_checks.insert( - "Structured Exception Handling (SEH)".to_string(), - json!(!seh), - ); + fn structured_exception_handling(&self) -> bool { + matches!(self._dll_characteristics() & 0x0400, 0) + } - let isolation_aware: bool = matches!(dll_chars & 0x0200, 0); - mitigation_checks.insert( - "Isolation-Aware Execution".to_string(), - json!(!isolation_aware), - ); + fn isolation_aware_execution(&self) -> bool { + matches!(self._dll_characteristics() & 0x0200, 0) + } - // context dependent mitigations: some don't work without existence of other checks + fn aslr(&self) -> bool { + self.dynamic_base() + && matches!( + self.header.coff_header.characteristics & IMAGE_FILE_RELOCS_STRIPPED, + 0 + ) + } - let aslr: bool = dynamic_base && matches!(image_chars & IMAGE_FILE_RELOCS_STRIPPED, 0); - mitigation_checks.insert( - "Address Space Layout Randomization (ASLR)".to_string(), - json!(aslr), - ); + fn high_entropy(&self) -> bool { + self.aslr() && matches!(self._dll_characteristics() & 0x0020, 0) + } - let high_entropy: bool = aslr && matches!(dll_chars & 0x0020, 0); - mitigation_checks.insert("High Entropy".to_string(), json!(high_entropy)); + fn control_flow_guard(&self) -> bool { + self.aslr() && matches!(self._dll_characteristics() & 0x4000, 0) + } - let cfg: bool = aslr && matches!(dll_chars & 0x4000, 0); - mitigation_checks.insert("Control Flow Guard (CFG)".to_string(), json!(cfg)); + fn code_integrity(&self) -> bool { + self.aslr() && matches!(self._dll_characteristics() & 0x0080, 0) + } +} - let code_integrity: bool = aslr && matches!(dll_chars & 0x0080, 0); - mitigation_checks.insert("Code Integrity".to_string(), json!(code_integrity)); - } +impl Analyze for PE<'_> { + fn compilation(&self, _bytes: &[u8]) -> BinResult { + let mut comp_map = GenericMap::new(); + comp_map.insert("Binary Type".to_string(), json!(self.binary_type())); + comp_map.insert("Debug Stripped".to_string(), json!(self.is_stripped())); + Ok(comp_map) + } + + fn mitigations(&self) -> GenericMap { + let mut mitigation_checks: GenericMap = GenericMap::new(); + + // context independent mitigations + mitigation_checks.insert( + "Data Execution Protection (DEP)".to_string(), + json!(self.data_execution_prevention()), + ); + mitigation_checks.insert("Dynamic Base".to_string(), json!(self.dynamic_base())); + mitigation_checks.insert( + "Structured Exception Handling (SEH)".to_string(), + json!(!self.structured_exception_handling()), + ); + mitigation_checks.insert( + "Isolation-Aware Execution".to_string(), + json!(!self.isolation_aware_execution()), + ); + + // context dependent mitigations: some don't work without existence of other checks + mitigation_checks.insert( + "Address Space Layout Randomization (ASLR)".to_string(), + json!(self.aslr()), + ); + mitigation_checks.insert("High Entropy".to_string(), json!(self.high_entropy())); + mitigation_checks.insert( + "Control Flow Guard (CFG)".to_string(), + json!(self.control_flow_guard()), + ); + mitigation_checks.insert("Code Integrity".to_string(), json!(self.code_integrity())); mitigation_checks } fn instrumentation(&self) -> GenericMap { - unimplemented!(); + GenericMap::new() } } diff --git a/src/detect.rs b/src/detect.rs deleted file mode 100644 index edb0363..0000000 --- a/src/detect.rs +++ /dev/null @@ -1,154 +0,0 @@ -//! Implements the main interface struct necessary in order to consume, parse and detect binary -//! inputs. Should be used to detect format and security mitigations for a singular binary. -#![allow(clippy::match_bool)] - -use crate::check::{Analyze, GenericMap}; -use crate::{BinError, BinResult}; - -use goblin::mach::Mach; -use goblin::Object; - -use byte_unit::Byte; -use chrono::prelude::*; -use serde_json::{json, Value}; - -use std::fs; -use std::path::PathBuf; - -/// Interfaces static analysis and wraps around parsed information for serialization. -#[derive(serde::Serialize)] -pub struct Detector { - basic: GenericMap, - compilation: GenericMap, - mitigations: GenericMap, - instrumentation: GenericMap, -} - -impl Detector { - pub fn run(binpath: PathBuf) -> BinResult { - let mut basic_map = GenericMap::new(); - - // get absolute path to executable - let _abspath: PathBuf = fs::canonicalize(&binpath)?; - let abspath = _abspath.to_str().unwrap().to_string(); - basic_map.insert("Absolute Path".to_string(), json!(abspath)); - - // parse out initial metadata used in all binary fomrats - let metadata: fs::Metadata = fs::metadata(&binpath)?; - - // filesize with readable byte unit - let size: u128 = metadata.len() as u128; - let byte = Byte::from_bytes(size); - let filesize: String = byte.get_appropriate_unit(false).to_string(); - basic_map.insert("File Size".to_string(), json!(filesize)); - - // parse out readable modified timestamp - if let Ok(time) = metadata.accessed() { - let datetime: DateTime = time.into(); - let stamp: String = datetime.format("%Y-%m-%d %H:%M:%S").to_string(); - basic_map.insert("Last Modified".to_string(), json!(stamp)); - } - - // read raw binary from path - let data: Vec = std::fs::read(&binpath)?; - - // parse executable as format and run format-specific mitigation checks - match Object::parse(&data)? { - Object::Elf(elf) => Ok(Self { - basic: { - use goblin::elf::header; - - basic_map.insert("Binary Format".to_string(), json!("ELF")); - - // get architecture - let arch: String = header::machine_to_str(elf.header.e_machine).to_string(); - basic_map.insert("Architecture".to_string(), json!(arch)); - - // get entry point - let entry_point: String = format!("0x{:x}", elf.header.e_entry); - basic_map.insert("Entry Point Address".to_string(), json!(entry_point)); - basic_map - }, - compilation: elf.compilation(&data)?, - mitigations: elf.mitigations(), - instrumentation: elf.instrumentation(), - }), - Object::PE(pe) => Ok(Self { - basic: { - basic_map.insert("Binary Format".to_string(), json!("PE/EXE")); - - // get architecture - let arch: String = if pe.is_64 { - String::from("PE32+") - } else { - String::from("PE32") - }; - basic_map.insert("Architecture".to_string(), json!(arch)); - - // get entry point - let entry_point: String = format!("0x{:x}", pe.entry); - basic_map.insert("Entry Point Address".to_string(), json!(entry_point)); - basic_map - }, - compilation: pe.compilation(&data)?, - mitigations: pe.mitigations(), - instrumentation: pe.instrumentation(), - }), - Object::Mach(Mach::Binary(mach)) => Ok(Self { - basic: { - basic_map.insert("Binary Format".to_string(), json!("Mach-O")); - basic_map - }, - compilation: mach.compilation(&data)?, - mitigations: mach.mitigations(), - instrumentation: mach.instrumentation(), - }), - _ => Err(BinError::Internal(String::from( - "unsupported filetype for analysis", - ))), - } - } - - /// Output all the finalized report collected on the specific executable, writing to - /// JSON path if specificed not as `-`. - pub fn output(&self, json: Option) -> BinResult<()> { - if let Some(_path) = json { - let output: &str = &serde_json::to_string_pretty(self)?; - if _path == "-" { - println!("{}", output); - return Ok(()); - } else { - fs::write(_path, output)?; - return Ok(()); - } - } - - // will always be printed - Detector::table("BASIC", self.basic.clone()); - Detector::table("COMPILATION", self.compilation.clone()); - Detector::table("EXPLOIT MITIGATIONS", self.mitigations.clone()); - - // get instrumentation if any are set - if !self.instrumentation.is_empty() { - Detector::table("INSTRUMENTATION", self.instrumentation.clone()); - } - Ok(()) - } - - #[inline] - pub fn table(name: &str, mapping: GenericMap) { - println!("-----------------------------------------------"); - println!("{}", name); - println!("-----------------------------------------------\n"); - for (name, feature) in mapping { - let value: String = match feature { - Value::Bool(true) => String::from("\x1b[0;32m✔️\x1b[0m"), - Value::Bool(false) => String::from("\x1b[0;31m✖️\x1b[0m"), - Value::String(val) => val, - _ => unimplemented!(), - }; - println!("{0: <45} {1}", name, value); - } - println!(); - } -} diff --git a/src/lib.rs b/src/lib.rs index 089b146..49c2c8a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,20 @@ +//! Implements the main interface necessary in order to parse binary inputs. +//! Should be used to detect format and security mitigations for a single binary. +#![allow(clippy::match_bool)] + +use crate::check::{Analyze, GenericMap}; + +use goblin::mach::Mach; +use goblin::Object; + +use byte_unit::Byte; +use chrono::prelude::*; +use serde_json::{json, Value}; + +use std::fs::{self, Metadata}; +use std::path::PathBuf; + pub mod check; -pub mod detect; /// Custom error type for all errors types that binsec might encounter #[derive(thiserror::Error, Debug)] @@ -17,3 +32,159 @@ pub enum BinError { } pub type BinResult = Result; + +/// Interfaces static analysis and wraps around parsed information for serialization. +#[derive(serde::Serialize)] +pub struct Detector { + basic: GenericMap, + compilation: GenericMap, + mitigations: GenericMap, + instrumentation: GenericMap, +} + +impl Detector { + pub fn run(binpath: PathBuf) -> BinResult { + let mut basic_map: std::collections::BTreeMap = GenericMap::new(); + + // get absolute path to executable + let _abspath: PathBuf = fs::canonicalize(&binpath)?; + let abspath = _abspath.to_str().unwrap().to_string(); + basic_map.insert("Absolute Path".to_string(), json!(abspath)); + + // parse out initial metadata used in all binary fomrats + let metadata: Metadata = fs::metadata(&binpath)?; + + // filesize with readable byte unit + let size: u128 = metadata.len() as u128; + let byte = Byte::from_bytes(size); + let filesize: String = byte.get_appropriate_unit(false).to_string(); + basic_map.insert("File Size".to_string(), json!(filesize)); + + // parse out readable modified timestamp + if let Ok(time) = metadata.accessed() { + let datetime: DateTime = time.into(); + let stamp: String = datetime.format("%Y-%m-%d %H:%M:%S").to_string(); + basic_map.insert("Last Modified".to_string(), json!(stamp)); + } + + // read raw binary from path + let data: Vec = std::fs::read(&binpath)?; + + // parse executable as format and run format-specific mitigation checks + match Object::parse(&data)? { + Object::Elf(elf) => Ok(Self { + basic: { + use goblin::elf::header; + + basic_map.insert("Binary Format".to_string(), json!("ELF")); + + // get architecture + let arch: String = header::machine_to_str(elf.header.e_machine).to_string(); + basic_map.insert("Architecture".to_string(), json!(arch)); + + // get entry point + let entry_point: String = format!("0x{:x}", elf.header.e_entry); + basic_map.insert("Entry Point Address".to_string(), json!(entry_point)); + basic_map + }, + compilation: elf.compilation(&data)?, + mitigations: elf.mitigations(), + instrumentation: elf.instrumentation(), + }), + Object::PE(pe) => Ok(Self { + basic: { + basic_map.insert("Binary Format".to_string(), json!("PE/EXE")); + + // get architecture + let arch: &str = if pe.is_64 { "PE32+" } else { "PE32" }; + basic_map.insert("Architecture".to_string(), json!(arch)); + + // get entry point + let entry_point: String = format!("0x{:x}", pe.entry); + basic_map.insert("Entry Point Address".to_string(), json!(entry_point)); + basic_map + }, + compilation: pe.compilation(&data)?, + mitigations: pe.mitigations(), + instrumentation: pe.instrumentation(), + }), + Object::Mach(Mach::Binary(mach)) => Ok(Self { + basic: { + use goblin::mach::constants::cputype; + use goblin::mach::load_command::CommandVariant; + + basic_map.insert("Binary Format".to_string(), json!("Mach-O")); + + // all other constants are likely not being used + let cputype = match mach.header.cputype() { + cputype::CPU_TYPE_I386 => "i386", + cputype::CPU_TYPE_X86_64 => "x86_64", + cputype::CPU_TYPE_ARM => "arm", + cputype::CPU_TYPE_ARM64 => "arm64", + _ => "", + }; + basic_map.insert("Architecture".to_string(), json!(cputype)); + + for cmd in &mach.load_commands { + if let CommandVariant::Main(entry) = cmd.command { + let entry_point: String = format!("0x{:x}", entry.entryoff); + basic_map.insert("Entry Point".to_string(), json!(entry_point)); + } + } + + basic_map + }, + compilation: mach.compilation(&data)?, + mitigations: mach.mitigations(), + instrumentation: mach.instrumentation(), + }), + bin => Err(BinError::Internal(format!( + "unsupported filetype for analysis: {:?}", + bin + ))), + } + } + + /// Output all the finalized report collected on the specific executable, writing to + /// JSON path if specificed not as `-`. + pub fn output(&self, json: Option) -> BinResult<()> { + if let Some(_path) = json { + let output: &str = &serde_json::to_string_pretty(self)?; + if _path == "-" { + println!("{}", output); + return Ok(()); + } else { + fs::write(_path, output)?; + return Ok(()); + } + } + + // will always be printed + Detector::table("BASIC", &self.basic); + Detector::table("COMPILATION", &self.compilation); + Detector::table("EXPLOIT MITIGATIONS", &self.mitigations); + + // get instrumentation if any are set + if !self.instrumentation.is_empty() { + Detector::table("INSTRUMENTATION", &self.instrumentation); + } + Ok(()) + } + + #[inline] + pub fn table(name: &str, mapping: &GenericMap) { + println!("-----------------------------------------------"); + println!("{}", name); + println!("-----------------------------------------------\n"); + for (name, feature) in mapping { + let value: String = match feature { + Value::Bool(true) => String::from("\x1b[0;32m✔️\x1b[0m"), + Value::Bool(false) => String::from("\x1b[0;31m✖️\x1b[0m"), + Value::String(val) => val.clone(), + _ => unimplemented!(), + }; + println!("{0: <45} {1}", name, value); + } + println!(); + } +} diff --git a/src/main.rs b/src/main.rs index 97edd3d..acce49d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,4 @@ -use binsec::detect::Detector; -use binsec::BinResult; - +use binsec::{BinResult, Detector}; use clap::Parser; use std::path::PathBuf; @@ -15,11 +13,8 @@ struct Args { fn main() { let cli_args: Args = Args::parse(); - match run(cli_args) { - Err(e) => { - eprintln!("{}", e); - } - _ => {} + if let Err(e) = run(cli_args) { + eprintln!("{}", e); } }