Bindiff

Author: g | 2025-04-24

★★★★☆ (4.1 / 3715 reviews)

yumi 2.0.7.8

BinDiff is a comparison tool for binary files Categories Windows. Log in / Sign up. Windows › System Tools › File Managers › BinDiff › 4.1. BinDiff 4.1. Download. BinDiff 4.1 From the command-line, run the BinDiff engine with. bindiff primary.BinExport secondary.BinExport This will create a file primary_vs_secondary.BinDiff in the current directory. The bindiff command should be in your system path. Launch the BinDiff UI, either via bindiff -ui or using the launcher for your operating system.

chrome??

bindiff/README.md at main google/bindiff - GitHub

Bindiff ghidra importerA Ghidra script that renames functions based on a CSV file from the bindiff tool, with filtering.InstallationIn Ghidra, open Tools -> Script manager -> Manage directories and add the directory containing the script (this one)You should now see a new cathegory called "bindiff scripts", inside which you will find this script and you will be able to start it.ExampleI have a statically linked stripped binary that I know it is using the GNU libc library.It would be great to at least recover libc's symbols, so that you don't have to analyze library functions to understand what they do.Steps:Open the binary you want to analyze in GhidraOpen the libc library in Ghidra (try to get the version was linked to the binary for better results)Export both programs using BinExportOpen bindiff and create a new diffIn the "Matched Functions" view select all the functions and right click -> copy selectionNOTE: You could also select only the ones you want to import, but the script also provide some basic filtering (minimum similarity and confidence).Feel also free to edit the script and add more complex filtering, by editing the filterFn functionPaste the selection in a file, should look something like this:We are now ready to start the script.Upon starting the script you will be asked for the CSV file and some filtering parameters, after that you should be all set

team fortress 2 web

bindiff/flow_graph.h at main google/bindiff - GitHub

Google has announced the release of security software BinDiff for free.In a blog post on Monday, Google software engineer Christian Blichmann said the software, a creation of zynamics -- which was acquired by Google in 2011 -- is now a free addition for security researcher toolkits.BinDiff is a comparison tool for scrutinising disassembled binary files and finding both similarities and differences in code through reverse engineering. The software can be used to identify and isolate flaws and bugs in software, namely, "fixes for vulnerabilities in vendor-supplied patches and to analyze multiple versions of the same binary," according to Blichmann.Binary files for x86, MIPS, ARM/AArch64, PowerPC, and other architectures can be analysed with the software.BinDiff can also be used to transfer fixes, port function names, comments and variables from one workstation to another. Google Security At Google, BinDiff acts as the underbelly of a large-scale malware processing pipeline used by the tech giant's security teams."Ever since zynamics joined Google in 2011, we have been committed to keeping our most valuable tools available to the security research community," Blichmann said. "We first lowered the price, and today we are taking the next logical step by making it available free of charge."By making the plugin free, Google has contributed towards better security by giving the community an advanced tool which doesn't burn a hole in your wallet to acquire. As BinDiff can be used not only to double-check vendor-issued security patches but as a means to find vulnerabilities in the first place, this could equip security researchers more effectively for bug bounties and disclosure programs.The software plugin is now free for researchers, but they will still have to purchase Hex-Rays IDA Pro disassembler, 6.8 or later, in order to take advantage of the freebie.Interested parties can download the software directly from zynamics. 10

bindiff/docs/README.md at main google/bindiff GitHub

. BinDiff is a comparison tool for binary files Categories Windows. Log in / Sign up. Windows › System Tools › File Managers › BinDiff › 4.1. BinDiff 4.1. Download. BinDiff 4.1 From the command-line, run the BinDiff engine with. bindiff primary.BinExport secondary.BinExport This will create a file primary_vs_secondary.BinDiff in the current directory. The bindiff command should be in your system path. Launch the BinDiff UI, either via bindiff -ui or using the launcher for your operating system.

bindiff/docs/concepts.md at main google/bindiff GitHub

An extensionless file simply named “0”.Each encoded or obfuscated layer will be highlighted in the table below along with code snippets for a better visual.StageObfuscation Techniques1.LNK Execution – PowerShell IEX to remote C2 server (above)2Reordering/Symbol Obfuscation, IEX ObfuscationFigure 43Byte Value Obfuscation, IEX ObfuscationFigure 54Raw Compression, IEX ObfuscationFigure 65Raw Compression, IEX ObfuscationFigure 76Raw Compression, IEX ObfuscationFigure 87Reordering, String Replace, backtick obfuscation, IEX ObfuscationFigure 98Final payload assembly executionStage (7): Anti-Analysis TechniquesJust before the last stage was downloaded and executed, stage 7 provided some interesting techniques involving obfuscation, counter forensics and anti-debugging.First the malicious PowerShell script kicks off with an AMSI evasion technique. This technique is fairly well-known and effectively attempts to disable AMSI code analysis state thus preventing malicious code analysis.Figure 10: AMSI EvasionCounter-forensics or anti-debugging techniques were quite prevalent and nearly hostile! The code first checks for processes matching a long list of those which could be used for monitoring process execution flow, or disassembly.This list includes:fiddler, procmon, sysmon, idapro,ida64, ida64pro, dnSpy, OllyScript, OllyDbg, x64dbg, ghidra, processhacker, pestudio, Radare2, peexplorer, relyze, pwndbg, binaryninja, ida37fw [sic!], httptoolkit, hexrays, Scylla, PEiD, bincat, BinDiff, efiXplorer, Windbg, Hiew, autoruns, PE-bear, pebear, depends, cerproThe script then leverages WMI to check information related to the desktop monitor. Any system with a screen height of less than 777 pixels high will cause the script to fail.Next, it uses WMI again to check for the system install date and memory information. If the date is less than three days, the script will fail.Native PowerShell commands are used for two more checks, one looking for Win32_PhysicalMemory property for memory matching “QEMU|VirtualBox|VirtualPC|VMware|Hypervisor“. Get-ComputerInfo is then used for computer properties containing (“CsDomain”,”HyperVisorPresent”) -like “*WORKGROUP*True*“. This checks for the presence of a hypervisor or a non-domain joined system.Figure 11: Counter-forensics / Anti-analysisMost malware, when it fails a sandbox, or anti-analysis check, will typically halt execution and quit. This hostility in this script was interesting. When the check fails, rather than quitting, it will disable the systems network adapters, use netsh to configure the Windows Firewall to block all inbound and outbound traffic, and then uses an obfuscated PowerShell command “(&gal [?r0]*m)” in place of the “Remove-Item” commandlet, to delete everything in the user’s profile directory, G:\, F:\, and E:\ drives recursively. Then the computer will shut down via the commandlet “Stop-Computer”.The next bit of code is interesting. If the system’s language is set to “*zh*” (Chinese) or to “*ru*” (Russian), then the code will simply exit and the computer will shut down.Figure 12: Language DetectionStage (7): Disable LoggingAnother trivial check it performs is looking for the amount of physical memory, and if it is less than 4gb, it’ll shut down the machine it’s running on quietly. If all checks pass, the malicious script

bindiff/docs/disassemblers.md at main google/bindiff GitHub

追記と修正2024/01/09: FOR710 についてはプロ視点で賛否両論あったので表現を変えました2024/01/09: FLARE-VM の構築部分でも書きましたが、解析環境と普段生活する環境は分離しましょう。VMWare or VirtualBox を使ってください。普段使いの環境にここで述べた解析ツールをいきなりインストールするとAnti-Virusに検知される可能性もあります。 TL;DR 将来的にベンダーレポートやカンファレンス発表レベルでの"マルウェア解析"を想定した話ですとりあえず FLARE-VM 環境を作ってインストールされたツールを見る・触るところから始めるといいんじゃないでしょうか TL;DR はじめに "マルウェア解析" のスコープと前提知識の明確化 ツールの選択元(プール) : FLARE-VM FLARE-VM に入っている中でもよく使うツール PEStudio IDA Free (Pro) FakeNet Yara FLARE-VM に入ってないけどよく使うので別途入れているツール FileInsight Process Hacker bindiff BlobRunner Hayabusa おわりに はじめに 最近は引きこもりをやめてときどき外部に顔を出すようになり、マルウェア解析やインテリジェンス関連の話をする機会も増えました。それに伴って、「これってどうやってやっているんですか?」「参考になる本やWebサイトありますか?」といったマルウェア解析に使うツールややりかたに関する質問もポツポツいただくようになりました。「(もう令和もはじまって6年目になるし、勉強できるプラットフォームや本も大量に転がっているし、筆者への会話デッキの一つとしてみんな話題を振ってくれているんだろうなぁ)」とか筆者は思っていたのですが、先日とあるところでやったセキュリティイベントのアンケートにて「Windows バイナリの Reversing なんて初めてやるし、ツールとかどんなのがあるかわからないし、事前に教えてほしい」といった意見を目にして、意外と適切なツールをググって探してくるのも初学者にとっては難しいのかもしれないと考え方を改めました。たしかに SEO の仕組みを考えても古い記事は検索上位に出にくくなるし、現在進行形で入門を考えている方向けの記事があってもいいのかもしれないと思い、筆者が利用するツールやそのツール選択の元となっているプールについてダンプしてみます。内容的には「何番煎じなんだろう......」ってものですが、マルウェア解析のツール選定に関わるエントリーレベルの記事にありつけていない人がいれば何かの参考にしていただけると幸いです。ちなみに筆者のバックグラウンドは、マルウェア解析関連の仕事を5年1年に1回くらいカンファレンスで話すSANS FOR610, Zero2Automated Certifiedマルウェア解析, インシデントレスポンス, 脅威インテリジェンス関連本を20冊くらい読んだ程度です。知らないツールやプラットフォームもいっぱいありますし、筆者のやり方は特殊で思想が偏っている可能性もあります。もっと有用・一般的なものがあれば追記いたしますのでコメントしてください。 ツールの選択元(プール) : FLARE-VM さて、余談が長くなってしまったのですが本題に戻ります。 まず大前提をお話しすると、「マルウェア解析においてツール選定が決定的となるような場面は少ない」というのが筆者の考えです。どちらかというとコンピュータサイエンスの基礎知識やツールに対する練度の方が重要で、いくつかのポイントを自分の使いやすいもので見れればそれで充分ではないかと思います。筆者の感覚で「何かしら自分の手に馴染むツールを抑えていたほうがいいんじゃない?」思うのは、以下の5つくらいです。(より具体的にあげるとフォレンジック関連ツール、各々の言語ごとの解析ツール、モジュールレベルのはなし.......と様々ありますがキリがなくなってしまうので、今回は一般的なマルウェア解析=>レポーティングの流れでほぼ必ず通るものに絞りました。また、python や VSCode といったセキュリティ関係なく使う系のツールは省略しています。)バイナリエディタ表層解析ツールデバッガディスアセンブラ(デコンパイル機能含む)シグネチャマッチングができるツール大項目を5つあげましたが、各々のツールをいちいち調べて集めてくるのも少々面倒です。なので、解析ツールを学ぶエントリーとしては分析に必要なツール一式が導入されているディストリビューションを利用して、仮想環境マシンを作成し、中に入っているツールを調べて使ってみるのが一番よいかなと思います。ペンテストで言うところの 「まずは Kali Linux 落としてきて中身見てみたら」のニュアンスですね。筆者の一番のおすすめは、mandiant がOpen-Sourceで提供している Windows OSベースのディストリビューション FLARE-VM です。github.com筆者も大量のマルウェアアナリストを見ているわけではありませんが、VMWare 製品上に Windows 仮想マシンを立て FLARE-VM をインストールしている方を非常によく見ます。(もしかしたら、Ghidra実践ガイド での環境構築で述べられているのが影響しているかもしれません。) ツールも大量にインストールされるので、公式の Installation instruction を参考にしながら導入してみてください。現在は GUI でインストールするツールが決められるので、とりあえず200個近くあるツールすべてインストールしてみましょう。画面遷移後に 3時間くらい放置すれば以下のようなデスクトップに切り替わると思います。これでひとまず導入は完了です。(余談ですが、昔の FLARE-VM のデスクトップイメージは水色のMマークでしたが、いつの間にか某アンダーなテイルのメタ〇ンっぽいキャラになってました。いつの間に変わったんだろうか。)FLARE-VM インストール後のデスクトップあとは、デスクトップにある "Tools" ディレクトリを見てみましょう。様々なツールが並んでいると思います。知ってる単語や興味のある単語から子階層を漁って、ツールを調べて触ってみるといいんじゃないでしょうか。 FLARE-VM に入っている中でもよく使うツール FLARE-VM インストールして中を見てみましょうだとさすがに不親切だと思ったので、筆者自身が中からよく引っ張り出すツールも簡単にまとめてみます。 PEStudio www.winitor.comマルウェア解析に限らずリバースエンジニアリングで最も大切なことは「自分が今向き合っているモノは何なのか」のあたりをつけることなのではないかと筆者は考えています。.NET で作られていれば de4dot や dnSpy を使って難読化解除やデコンパイルをしますし、pyinstaller や nexe によって実行ファイル化されたツールであればネイティブコードの抽出を目指す人が多いでしょう。つまり、対象がWindows PEファイルであれば最適な分析手法を割り出すためのワンクッションがあったほうが効率的です。そのためのツールの1種別が表層解析系のツールで、筆者は PEStudio を好んで使用します。ただし、この項目についてはめっちゃ派閥がわかれると思います。pe-beer や CFF Explorer のほうがツールとして使いやすいという人もいますし、malwoverview のようなツールでトリアージは自動化している人、Detect It Easy のような最低限の表層解析ツールで十分の人もいます。ここまでいろいろ書きましたが、ぶっちゃけ最適な解析ツールを導出することができればなんでもよいと思うので、あとは皆さんが触ってみたフィーリングやレベル感によって使いやすいものを決めてください。筆者はなんで PEStudio 使っているかというと strings の部分が優先度順で並ぶのと全体的にグラフィカルでわかりやすいからです。 IDA Free (Pro) hex-rays.com最強です。純粋なマルウェア解析をやっている時間の9割以上がこのツールを触っている時間と言っても過言ではないかもしれません。チラッと目次を見てもらった方には「あれ、デバッガ書いてなくね?」と思った方もいらっしゃるかもしれませんが、現在は x64 のアーキテクチャであれば Free からデコンパイルもできるしデバッグもできるのでほぼこのツールで完結します。つよいです。IDA Free decompiler & debuggerただし Free だと x86 や arm まではデコンパイルできないので、そういう場合は Ghidra でディスアセンブル/デコンパイルしながら x64dbg を使うという人が多いのではないかなと思います。(ただやはり Ghidra を使うとデコンパイルの精度やショートカットの微妙さなどが気になるので、できることなら IDA 使いたいなと筆者はよく感じます。あと、バージョンアップのたびにプラグインをビルドしたり python3 がデフォルトで使えないのがあまりにも厳しい。。。)また、最近なぜか WinDbg を使いますという声もちらほら聞きます。たしかに先日 かえるのほんだな さんが0円というまさかのバグ価格でWinDbg本を公開されていたので、こちらを参考にしながらデバッガの勉強をするのも非常にありな選択肢だと思います。techbookfest.org雑にまとめますが、基本 IDA を使う練度を上げて使えない部分は他のツールでカバーするというのが一番実践的だと思う、というのが筆者の主観です。 FakeNet github.comFLARE チームが作成したネットワーク通信のエミュレートツールです。デフォルトだとほぼすべてのネットワーク トラフィックをインターセプト、リダイレクトし FakeNet 側で指定したカスタムレスポンスを返させることができます。つまり、マルウェア解析の場面ではホストオンリーの環境でもC2サーバの擬似応答を返させることでデバッグ解析を継続させることができるという強力なサポートをが得られるツールです。(リバエン力が高くない筆者にとっては、ここまでの上三つがとりあえず使うツール3強な気がしています。)試しに FakeNet を起動した状態で google へ curl を叩いてみると、FakeNet からの fake レスポンスを返してくれることがわかります。FakeNet sampleDNS も解決してローカルホストにリダイレクトさせてくれるので、ここからC2サーバのレスポンスを作りこみ、解析をより深く行うこともできたりします。FakeNet に届いた通信は pcap 形式でdumpしてくれるので、事後分析もしやすいです。総じて優秀なので、デバッグしながら解析している際には脇で動かさない手はないでしょう。mandiant さんの公式ブログを見るとカスタムレスポンスのつくり方なども書いてあるので、興味がわいた方はこちらを参考にカスタムしてみてください。www.mandiant.com Yara github.comファイルに対するシグネチャマッチングのデファクトスタンダードです。多くのベンダー・組織がマルウェアの検知ルールとして Yara rule を公開しており、さらにセキュリティ製品でもこの Yara が導入可能となっているものが多いです。なので、解析で Yara を使わなくても純粋に Yara の読み書きができるというだけでも得をする場面はあるかなと筆者は想像しています。特にマルウェア解析を仕事にしている人だと、解析結果から Yara ルールを作成して、それを組織のセキュリティ製品に組み込んで運用できる状態にしてもらうことをアウトプットの一つにしていたりするのではないかなと思います。ルールのイメージがわかない方は JPCERT/CC さんが公開しているものなどを参考にしてください。脇道にそれたので話を解析に戻します。主に解析後の話を中心として Yara を記述しましたが、筆者のトリアージプロセスの一つとして Yara をかけるというのは最初期段階で行います。「シグネチャでマルウェアのファミリ判定されれば儲けもの」くらいのモチベーションです。たしかに標的型検体や Pack されているマルウェアなどからはいい結果が得られませんが、ものの数秒くらいのロスにしかならないのでとりあえず JPCERT/CC さんなどのGithubに公開されているルールをかけて損はないと思います。またシグネチャマッチングとは少々異なりますが、実行ファイルがどんなことをしていそうかというのを推定してくれる capa というケーパビリティツールもあります。 github.com筆者は自分でルールを作りこむことまではしたことなく mandiant さんが提供するルールを IDA Pro のプラグインから使ってトリアージに活用しているだけなのですが、IIJ さんのブログなどを参考にすると自身でルールを書いてもっと有用な使い方ができそうな気がしています。皆さんはぜひ有効活用してください。eng-blog.iij.ad.jp FLARE-VM に入ってないけどよく使うので別途入れているツール 本当は上で終わるつもりだったのですが、なんだかんだ3割くらいは別途ツールをインストールして使っている気がするのでこちらも書いてみます。静的解析で使う細かめの話が多いです。ご了承ください。 bindiff github.com最近 Open-Source になったことで話題となったディスアセンブルコードの比較ツールです。同じところで何年も働いていると一度解析したことのあるマルウェアの亜種とは何回も戦うことになり、詳細を全部確認すると無限に時間がとられてしまいます。なので、限られた時間で読む部分にあたりをつける、さらにはコードの更新部分を第三者にわかりやすく説明するためにかなり重宝されます。(特に、非エンジニアに説明する意味だと後者はデカいと思います。)具体的なイメージが見たい方は moly さんのブログを参考にしてください。Ghidra での解析差分をサクッとそしてビジュアブルに図示できることがわかると思います。morimolymoly.hateblo.jpちなみに IDA Pro を使っている方は diaphora という便利なプラグインがあるためこちらを使っている方が多いかもしれません。こちらでも bindiff と同等のことができますが、関数をクリックするだけで IDA の該当の関数に飛んでくれるので非常に親和性が高いです。 Pro がある人はこっちも試してみることをおすすめします。github.com BlobRunner github.comかなり tips よりのツールだが、「抽出した shellcode をサクッとデバッグしたい。。。」とアナリストならば一度は思ったことがありそうな要望を叶えてくれるツール。Initial Accessでは全部が shellcode でできたようなツールがポンポン降ってくるような昨今ではすごく有用だと思います。筆者もかつては「指定したファイルを読み込んで、Executable なメモリに配置して、3分sleepして、call する。。。」なんてツールを書いて使っていましたが、BlobRunner だとデバッガでアタッチしたあとにエンターキー押せば breakpoint まで飛んでくれるので利便性高いですね。OALabs さんは他にも API hashing の解決を補助してくれる hashdb のようなプロジェクトや Youtube channel で解析手法なんかを公開していて非常に有用なので、時間に余裕のある方はチラ見してみてください。(筆者自身も、こういうところから便利そうなツールの情報を盗むことが多いです)github.com おわりに けっこうコンパクトにまとめたつもりがかなりぐちゃった内容になってしまいました。もっと体系的に学びたいと思った方がいれば、学生の場合はセキュリティ・キャンプの脅威解析クラス, 社会人の場合はFOR710なんかがいいんじゃないかなと思っていましたが賛否両論あるようなので、現場の解析経験ある人から知見を吸収してみましょう。最後になりますが、一歩目の踏み出し方がわからない方の参考になったり、何かしら新しい知見が得られた方がいれば幸いです。それでは。

bindiff/docs/version-history.md at main google/bindiff GitHub

. BinDiff is a comparison tool for binary files Categories Windows. Log in / Sign up. Windows › System Tools › File Managers › BinDiff › 4.1. BinDiff 4.1. Download. BinDiff 4.1

Comments

User7182

Bindiff ghidra importerA Ghidra script that renames functions based on a CSV file from the bindiff tool, with filtering.InstallationIn Ghidra, open Tools -> Script manager -> Manage directories and add the directory containing the script (this one)You should now see a new cathegory called "bindiff scripts", inside which you will find this script and you will be able to start it.ExampleI have a statically linked stripped binary that I know it is using the GNU libc library.It would be great to at least recover libc's symbols, so that you don't have to analyze library functions to understand what they do.Steps:Open the binary you want to analyze in GhidraOpen the libc library in Ghidra (try to get the version was linked to the binary for better results)Export both programs using BinExportOpen bindiff and create a new diffIn the "Matched Functions" view select all the functions and right click -> copy selectionNOTE: You could also select only the ones you want to import, but the script also provide some basic filtering (minimum similarity and confidence).Feel also free to edit the script and add more complex filtering, by editing the filterFn functionPaste the selection in a file, should look something like this:We are now ready to start the script.Upon starting the script you will be asked for the CSV file and some filtering parameters, after that you should be all set

2025-04-12
User9458

Google has announced the release of security software BinDiff for free.In a blog post on Monday, Google software engineer Christian Blichmann said the software, a creation of zynamics -- which was acquired by Google in 2011 -- is now a free addition for security researcher toolkits.BinDiff is a comparison tool for scrutinising disassembled binary files and finding both similarities and differences in code through reverse engineering. The software can be used to identify and isolate flaws and bugs in software, namely, "fixes for vulnerabilities in vendor-supplied patches and to analyze multiple versions of the same binary," according to Blichmann.Binary files for x86, MIPS, ARM/AArch64, PowerPC, and other architectures can be analysed with the software.BinDiff can also be used to transfer fixes, port function names, comments and variables from one workstation to another. Google Security At Google, BinDiff acts as the underbelly of a large-scale malware processing pipeline used by the tech giant's security teams."Ever since zynamics joined Google in 2011, we have been committed to keeping our most valuable tools available to the security research community," Blichmann said. "We first lowered the price, and today we are taking the next logical step by making it available free of charge."By making the plugin free, Google has contributed towards better security by giving the community an advanced tool which doesn't burn a hole in your wallet to acquire. As BinDiff can be used not only to double-check vendor-issued security patches but as a means to find vulnerabilities in the first place, this could equip security researchers more effectively for bug bounties and disclosure programs.The software plugin is now free for researchers, but they will still have to purchase Hex-Rays IDA Pro disassembler, 6.8 or later, in order to take advantage of the freebie.Interested parties can download the software directly from zynamics. 10

2025-04-05
User7330

An extensionless file simply named “0”.Each encoded or obfuscated layer will be highlighted in the table below along with code snippets for a better visual.StageObfuscation Techniques1.LNK Execution – PowerShell IEX to remote C2 server (above)2Reordering/Symbol Obfuscation, IEX ObfuscationFigure 43Byte Value Obfuscation, IEX ObfuscationFigure 54Raw Compression, IEX ObfuscationFigure 65Raw Compression, IEX ObfuscationFigure 76Raw Compression, IEX ObfuscationFigure 87Reordering, String Replace, backtick obfuscation, IEX ObfuscationFigure 98Final payload assembly executionStage (7): Anti-Analysis TechniquesJust before the last stage was downloaded and executed, stage 7 provided some interesting techniques involving obfuscation, counter forensics and anti-debugging.First the malicious PowerShell script kicks off with an AMSI evasion technique. This technique is fairly well-known and effectively attempts to disable AMSI code analysis state thus preventing malicious code analysis.Figure 10: AMSI EvasionCounter-forensics or anti-debugging techniques were quite prevalent and nearly hostile! The code first checks for processes matching a long list of those which could be used for monitoring process execution flow, or disassembly.This list includes:fiddler, procmon, sysmon, idapro,ida64, ida64pro, dnSpy, OllyScript, OllyDbg, x64dbg, ghidra, processhacker, pestudio, Radare2, peexplorer, relyze, pwndbg, binaryninja, ida37fw [sic!], httptoolkit, hexrays, Scylla, PEiD, bincat, BinDiff, efiXplorer, Windbg, Hiew, autoruns, PE-bear, pebear, depends, cerproThe script then leverages WMI to check information related to the desktop monitor. Any system with a screen height of less than 777 pixels high will cause the script to fail.Next, it uses WMI again to check for the system install date and memory information. If the date is less than three days, the script will fail.Native PowerShell commands are used for two more checks, one looking for Win32_PhysicalMemory property for memory matching “QEMU|VirtualBox|VirtualPC|VMware|Hypervisor“. Get-ComputerInfo is then used for computer properties containing (“CsDomain”,”HyperVisorPresent”) -like “*WORKGROUP*True*“. This checks for the presence of a hypervisor or a non-domain joined system.Figure 11: Counter-forensics / Anti-analysisMost malware, when it fails a sandbox, or anti-analysis check, will typically halt execution and quit. This hostility in this script was interesting. When the check fails, rather than quitting, it will disable the systems network adapters, use netsh to configure the Windows Firewall to block all inbound and outbound traffic, and then uses an obfuscated PowerShell command “(&gal [?r0]*m)” in place of the “Remove-Item” commandlet, to delete everything in the user’s profile directory, G:\, F:\, and E:\ drives recursively. Then the computer will shut down via the commandlet “Stop-Computer”.The next bit of code is interesting. If the system’s language is set to “*zh*” (Chinese) or to “*ru*” (Russian), then the code will simply exit and the computer will shut down.Figure 12: Language DetectionStage (7): Disable LoggingAnother trivial check it performs is looking for the amount of physical memory, and if it is less than 4gb, it’ll shut down the machine it’s running on quietly. If all checks pass, the malicious script

2025-04-23

Add Comment