{"id":7982,"date":"2025-05-23T19:00:53","date_gmt":"2025-05-23T11:00:53","guid":{"rendered":"https:\/\/www.wangonc.com\/?p=7982"},"modified":"2025-05-30T17:32:23","modified_gmt":"2025-05-30T09:32:23","slug":"common-pitfalls-when-installing-ida-plugins-on-macos","status":"publish","type":"post","link":"https:\/\/www.wangonc.com\/index.php\/2025\/05\/23\/common-pitfalls-when-installing-ida-plugins-on-macos\/","title":{"rendered":"macOS\u4e0bIDA\u63d2\u4ef6\u5b89\u88c5\u7684\u4e00\u4e9b\u5751"},"content":{"rendered":"<h2>\u5b89\u88c5unicorn<\/h2>\n<p>\u76f4\u63a5\u901a\u8fc7pip\u5b89\u88c5Unicorn\u662f\u65e0\u6cd5\u5b89\u88c5\u7684\uff0c\u4f1a\u62a5\u9519\u3002\u5177\u4f53\u6765\u8bf4\u5b89\u88c5\u65b9\u6cd5\u5982\u4e0b\uff1a<br \/>\n\u9996\u5148\u5728pypi\u4e0b\u8f7dunicorn\u6700\u65b0\u7248\u672c\u7684\u4ee3\u7801\uff0c<a href=\"https:\/\/pypi.org\/project\/unicorn\/#files\">https:\/\/pypi.org\/project\/unicorn\/#files<\/a> ,\u7136\u540e\u89e3\u538b\uff0c\u8fdb\u5165\u76ee\u5f55\uff0c\u6267\u884c\u5982\u4e0b\u64cd\u4f5c<\/p>\n<pre><code class=\"language-shell\">brew install unicorn #brew\u5b89\u88c5unicorn\u53d6\u5176\u4e00\u90e8\u5206\u5e93\ncp \/opt\/homebrew\/opt\/unicorn\/lib\/lib* .\/prebuilt # \u5bf9\u4e8eintel\u82af\u7247\u5219\u662f\/usr\/local\/opt\/unicorn\/lib\/lib*<\/code><\/pre>\n<p>\u8fd9\u65f6\u5e93\u5df2\u7ecf\u53ef\u4ee5\u88ab\u672c\u5730\u5b89\u88c5\u4e86\uff0c\u4f46\u662f\u6211\u8fd9\u91cc\u65e0\u6cd5\u89e3\u6790\u7248\u672c\u53f7\uff0c\u89e3\u6790\u5230\u7684\u7248\u672c\u53f7\u662f0.0.0\uff0c\u624b\u52a8\u4fee\u6539<code>setup.cfg<\/code>\uff0c\u5728metadata\u4e0b\u6dfb\u52a0version\uff08\u5982\u679c\u6ca1\u6709metasata\u5c31\u6dfb\u52a0\u4e00\u4e2ametadata\uff09\uff0c\u5982\u4e0b\uff08\u4fee\u6539\u4e3a\u6b63\u786e\u7684\u7248\u672c\u53f7\uff09<\/p>\n<pre><code class=\"language-ini\">[metadata]\nversion = 2.1.3<\/code><\/pre>\n<p>\u7136\u540e\u6267\u884c<code>python setup.py install<\/code>\u5373\u53ef\u5b89\u88c5\u6210\u529f<\/p>\n<h2>\u5b89\u88c5keystone<\/h2>\n<p>\u8fd9\u91cckeystone\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7<code>pip install keystone-engine<\/code>\u88ab\u5b89\u88c5\uff0c\u4f46\u662f\u7f3a\u5c11\u4e00\u4e9b\u52a8\u6001\u5e93\uff0c\u4f7f\u7528\u7684\u65f6\u5019\u4f1a\u62a5\u9519<code>ImportError: ERROR: fail to load the dynamic library.<\/code>\u3002\u9700\u8981\u624b\u52a8\u7f16\u8bd1keystone\u5e76\u5b89\u88c5\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b<\/p>\n<p>\u9996\u5148\u62c9\u53d6\u4ee3\u7801<\/p>\n<pre><code class=\"language-shell\">git clone https:\/\/github.com\/keystone-engine\/keystone.git<\/code><\/pre>\n<p>\u56e0\u4e3akeystone\u7684\u5e74\u4ee3\u5b9e\u5728\u662f\u592a\u4e45\u8fdc\u4e86\uff0c\u6240\u4ee5\u9700\u8981\u624b\u52a8\u4fee\u6539\u9879\u76ee\u4e2d\u7684\u4e00\u4e9b\u7f16\u8bd1\u914d\u7f6e\uff0c\u4e3b\u8981\u4fee\u6539\u7684\u6709\u4e09\u4e2a\u6587\u4ef6\uff0c\u4ee3\u7801\u6839\u76ee\u5f55\u4e0b\u7684<code>CMakeLists.txt<\/code>\uff0c<code>llvm\/CMakeLists.txt<\/code>\u3001<code>kstool\/CMakeLists.txt<\/code>\u8fd9\u4e09\u4e2a\u3002\u5c06\u6240\u6709\u7684<code>cmake_minimum_required(VERSION 2.8.7)<\/code>\u6539\u4e3a<code>cmake_minimum_required(VERSION 3.10)<\/code>\uff0c\u7136\u540e\u5c06\u6240\u6709\u7684<code>cmake_policy(SET CMP0051 OLD)<\/code>\u6539\u4e3a<code>cmake_policy(SET CMP0051 NEW)<\/code><\/p>\n<p>\u7136\u540e\u9700\u8981\u4e00\u4e9b\u7f16\u8bd1\u9009\u9879,\u8fd9\u91cc\u901a\u8fc7\u4e00\u4e9b\u4e34\u65f6\u73af\u5883\u53d8\u91cf\u6765\u505a<\/p>\n<pre><code class=\"language-shell\">export CXXFLAGS=&quot;-stdlib=libc++&quot;\nexport LDFLAGS=&quot;-stdlib=libc++ -lc++abi -lc++&quot;\nexport CMAKE_CXX_FLAGS=&quot;-stdlib=libc++&quot;\nexport CMAKE_EXE_LINKER_FLAGS=&quot;-stdlib=libc++ -lc++abi -lc++&quot;\nexport CMAKE_SHARED_LINKER_FLAGS=&quot;-stdlib=libc++ -lc++abi -lc++&quot;\nexport CMAKE_MODULE_LINKER_FLAGS=&quot;-stdlib=libc++ -lc++abi -lc++&quot;<\/code><\/pre>\n<p>\u8fd9\u65f6\u5c31\u53ef\u4ee5\u7f16\u8bd1\u5b89\u88c5\u4e86\uff0c\u5982\u4e0b<\/p>\n<pre><code class=\"language-shell\">mkdir build\ncd build\n..\/make-share.sh\nsudo make install<\/code><\/pre>\n<p>\u8fd9\u65f6keystone\u5c31\u80fd\u6b63\u5e38\u4f7f\u7528\u4e86\u3002<\/p>\n<p>\u5982\u679c\u4f9d\u65e7\u4e0d\u884c\uff0c\u7528\u5982\u4e0b\u547d\u4ee4\u770b\u4e00\u4e0b\u5177\u4f53\u539f\u56e0\uff0c\u53ef\u80fd\u662f\u7f3a\u4e86\u4ec0\u4e48\u4f9d\u8d56\u5e93<\/p>\n<pre><code class=\"language-shell\">python -c &quot;\nimport ctypes\ntry:\n    lib = ctypes.CDLL(&#039;\/usr\/local\/lib\/libkeystone.dylib&#039;)\n    print(&#039;Library loaded successfully&#039;)\nexcept Exception as e:\n    print(f&#039;Failed to load library: {e}&#039;)\n&quot;<\/code><\/pre>\n<p>\u5982\u679c\u7f3a\u5c11libc++abi.1.dylib\uff0c\u4ecellvm\u91cc\u9762\u590d\u5236\u5373\u53ef\uff0c\u590d\u5236\u5230conda\u7684\u76ee\u5f55\u4e0b\uff0c\u6216\u8005\u8f6f\u8fde\u63a5\u8fc7\u53bb\uff0c\u4e00\u822c\u6765\u8bf4\u9700\u8981libc++abi.dylib\u548clibunwind.dylib\u3002<\/p>\n<h2>\u5b89\u88c5IDA Feeds<\/h2>\n<p>\u8fd9\u4e0d\u7b97\u662f\u5751\uff0c\u987a\u4fbf\u4e00\u8d77\u8bb0\u5f55\u4e00\u4e0b\uff0c\u9488\u5bf99.1\u3002<\/p>\n<p>\u9996\u5148\u5b89\u88c5idalib\uff0c\u5728ida\u76ee\u5f55\u4e0b\u7684idalib\/python<\/p>\n<pre><code class=\"language-shell\">python -m pip install .\/Contents\/MacOS\/idalib\/python\/.<\/code><\/pre>\n<p>\u5b89\u88c5ida feeds\u7684\u4f9d\u8d56<\/p>\n<pre><code class=\"language-shell\">python -m pip install -r .\/Contents\/MacOS\/plugins\/ida_feeds\/requirements.txt<\/code><\/pre>\n<p>\u914d\u7f6eida_feeds\/config.json\u4e2d\u7684flair\u8def\u5f84\uff0c\u9700\u8981\u628a<code>config.sample.json<\/code>\u6539\u540d\u4e3a<code>config.json<\/code>\u3002<\/p>\n<p>flair\u5728\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u5728ida\u76ee\u5f55\u7684<code>\/Contents\/MacOS\/tools<\/code>\u4e2d\uff0c\u6211\u8fd9\u91cc\u662fida pro 9.1\uff0c\u5c31\u662f<code>\/Applications\/IDA Professional 9.1.app\/Contents\/MacOS\/tools\/flair<\/code>\uff08\u6587\u4ef6\u5939\u7684\u8def\u5f84\uff09\uff0c\u5199\u5728config.json\u4e2d\u5373\u53ef\uff08\u611f\u89c9\u50cf\u662f\u534a\u6210\u54c1\uff0c\u90fd\u5728\u76ee\u5f55\u4e0b\u4e3a\u4ec0\u4e48\u6ca1\u6709\u9ed8\u8ba4\u8def\u5f84\uff09<\/p>\n<p>\u4e0b\u8f7d\u6cc4\u9732\u4e2d\u4e00\u8d77\u7684<code>signatures-bundles-9.1.zip<\/code>\uff0c\u8fd9\u65f6\u989d\u5916\u63d0\u4f9b\u7684\u4e00\u4e9b\u7b7e\u540d\u6587\u4ef6\uff0c\u5c06\u5176\u590d\u5236\u5230ida\u76ee\u5f55\u4e0b\u7684<code>.\/Contents\/Macos\/sig<\/code>\u76ee\u5f55\u4e0b\u5373\u53ef\u3002<\/p>\n<p>\u53ef\u4ee5\u770b\u5230\u63d2\u4ef6\u5df2\u7ecf\u53ef\u4ee5\u4f7f\u7528\u4e86<br \/>\n<div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.wangonc.com\/wp-content\/uploads\/2025\/05\/image-1747997705369.png'><img class=\"lazyload lazyload-style-3\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/www.wangonc.com\/wp-content\/uploads\/2025\/05\/image-1747997705369.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"file\" \/><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5unicorn \u76f4\u63a5\u901a\u8fc7pip\u5b89\u88c5Unicorn\u662f\u65e0\u6cd5\u5b89\u88c5\u7684\uff0c\u4f1a\u62a5\u9519\u3002\u5177\u4f53\u6765\u8bf4\u5b89\u88c5\u65b9\u6cd5\u5982\u4e0b\uff1a \u9996\u5148\u5728pyp [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,44],"tags":[18,129,128],"series":[],"class_list":["post-7982","post","type-post","status-publish","format-standard","hentry","category-toss-record","category-reverse-engineering","tag-idapro","tag-python","tag-128"],"_links":{"self":[{"href":"https:\/\/www.wangonc.com\/index.php\/wp-json\/wp\/v2\/posts\/7982","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wangonc.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wangonc.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wangonc.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wangonc.com\/index.php\/wp-json\/wp\/v2\/comments?post=7982"}],"version-history":[{"count":6,"href":"https:\/\/www.wangonc.com\/index.php\/wp-json\/wp\/v2\/posts\/7982\/revisions"}],"predecessor-version":[{"id":7993,"href":"https:\/\/www.wangonc.com\/index.php\/wp-json\/wp\/v2\/posts\/7982\/revisions\/7993"}],"wp:attachment":[{"href":"https:\/\/www.wangonc.com\/index.php\/wp-json\/wp\/v2\/media?parent=7982"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wangonc.com\/index.php\/wp-json\/wp\/v2\/categories?post=7982"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wangonc.com\/index.php\/wp-json\/wp\/v2\/tags?post=7982"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/www.wangonc.com\/index.php\/wp-json\/wp\/v2\/series?post=7982"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}