<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>執行檔 on kenji.blog</title><link>http://kenji.blog/zh-tw/tags/%E5%9F%B7%E8%A1%8C%E6%AA%94/</link><description>Recent content in 執行檔 on kenji.blog</description><generator>Hugo -- gohugo.io</generator><language>zh-tw</language><copyright>kenjinote</copyright><lastBuildDate>Wed, 05 Apr 2023 23:31:06 +0900</lastBuildDate><atom:link href="http://kenji.blog/zh-tw/tags/%E5%9F%B7%E8%A1%8C%E6%AA%94/index.xml" rel="self" type="application/rss+xml"/><item><title>解析執行檔（exe）內容的工具</title><link>http://kenji.blog/zh-tw/p/%E8%A7%A3%E6%9E%90%E5%9F%B7%E8%A1%8C%E6%AA%94exe%E5%85%A7%E5%AE%B9%E7%9A%84%E5%B7%A5%E5%85%B7/</link><pubDate>Wed, 05 Apr 2023 23:31:06 +0900</pubDate><guid>http://kenji.blog/zh-tw/p/%E8%A7%A3%E6%9E%90%E5%9F%B7%E8%A1%8C%E6%AA%94exe%E5%85%A7%E5%AE%B9%E7%9A%84%E5%B7%A5%E5%85%B7/</guid><description>&lt;img src="http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_1.png" alt="Featured image of post 解析執行檔（exe）內容的工具" />&lt;h1 id="執行檔exe是什麼">執行檔（exe）是什麼
&lt;/h1>&lt;p>在 Windows 上可執行的檔案。基本上是以被稱為 PE 格式的形式撰寫。
包含為了執行的機器語言程式碼、圖示與圖片等資源。&lt;/p>
&lt;p>有幾款工具可以用來解析執行檔，因此這次將介紹它們。&lt;/p>
&lt;h2 id="7-zip">7-Zip
&lt;/h2>&lt;p>&lt;img src="http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img.png"
width="297"
height="170"
srcset="http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_hu9085a5feff69a2c6829ff5c46ff00393_6059_480x0_resize_box_3.png 480w, http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_hu9085a5feff69a2c6829ff5c46ff00393_6059_1024x0_resize_box_3.png 1024w"
loading="lazy"
alt="img.png"
class="gallery-image"
data-flex-grow="174"
data-flex-basis="419px"
>&lt;/p>
&lt;p>EXE 檔案有時會因為體積容易變大，而透過壓縮檔案來建立。在這種情況下，使用檔案壓縮與解壓縮軟體 7-Zip，可以將執行檔解壓縮並檢查其內容。同樣能進行解壓縮的工具還有一款叫作 WinRAR。&lt;/p>
&lt;h2 id="resource-hacker">Resource Hacker
&lt;/h2>&lt;p>&lt;img src="http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_2.png"
width="186"
height="186"
srcset="http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_2_hu79aaf5f76ad7c56f4d42723e7059a469_60178_480x0_resize_box_3.png 480w, http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_2_hu79aaf5f76ad7c56f4d42723e7059a469_60178_1024x0_resize_box_3.png 1024w"
loading="lazy"
alt="img_2.png"
class="gallery-image"
data-flex-grow="100"
data-flex-basis="240px"
>&lt;/p>
&lt;p>可以從 EXE 檔案中提取出資源（圖示、點陣圖、對話方塊、字串等）。此外，因為也具備二進位編輯器的功能，所以也能夠編輯並改寫 EXE 檔案的內容。&lt;/p>
&lt;h2 id="pe-explorer">PE Explorer
&lt;/h2>&lt;p>&lt;img src="http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_3.png"
width="186"
height="186"
srcset="http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_3_hueb15d1af1c62b25c13fb3d7dc03fc6df_64201_480x0_resize_box_3.png 480w, http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_3_hueb15d1af1c62b25c13fb3d7dc03fc6df_64201_1024x0_resize_box_3.png 1024w"
loading="lazy"
alt="img_3.png"
class="gallery-image"
data-flex-grow="100"
data-flex-basis="240px"
>&lt;/p>
&lt;p>可以解析 Windows 用的 PE 檔案（EXE、DLL、OCX、SYS、驅動程式）。PE Explorer 提供各種解析功能，例如顯示檔案結構、顯示檔案標頭、顯示目錄項目、顯示匯出的函式與符號等。&lt;/p>
&lt;h2 id="dependency-walker">Dependency Walker
&lt;/h2>&lt;p>&lt;img src="http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_4.png"
width="200"
height="200"
srcset="http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_4_hub63c69aff9d8b5946247e847a7ad1fc0_3219_480x0_resize_box_3.png 480w, http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_4_hub63c69aff9d8b5946247e847a7ad1fc0_3219_1024x0_resize_box_3.png 1024w"
loading="lazy"
alt="img_4.png"
class="gallery-image"
data-flex-grow="100"
data-flex-basis="240px"
>&lt;/p>
&lt;p>可以檢查 EXE 檔案所依賴的 DLL 檔案，並確認它們是否有被正確載入。此外，也能追蹤 DLL 檔案的函式呼叫。&lt;/p>
&lt;h2 id="ghidra">Ghidra
&lt;/h2>&lt;p>&lt;img src="http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_5.png"
width="498"
height="337"
srcset="http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_5_hu5dc3fee7c4c873ff8adc099ca0ffbefc_53940_480x0_resize_box_3.png 480w, http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_5_hu5dc3fee7c4c873ff8adc099ca0ffbefc_53940_1024x0_resize_box_3.png 1024w"
loading="lazy"
alt="img_5.png"
class="gallery-image"
data-flex-grow="147"
data-flex-basis="354px"
>&lt;/p>
&lt;p>由 NSA（美國國家安全局）開發並作為開源軟體免費公開的強大逆向工程工具。不僅能對 EXE 檔案進行反組譯（轉換為組合語言），還具備能反編譯成接近 C 語言形式的功能，非常受歡迎。&lt;/p>
&lt;h2 id="ida-free--ida-pro">IDA Free / IDA Pro
&lt;/h2>&lt;p>&lt;img src="http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_6.png"
width="256"
height="256"
srcset="http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_6_hu960ac9a27bf840a560548c99c16556b4_3581_480x0_resize_box_3.png 480w, http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_6_hu960ac9a27bf840a560548c99c16556b4_3581_1024x0_resize_box_3.png 1024w"
loading="lazy"
alt="img_6.png"
class="gallery-image"
data-flex-grow="100"
data-flex-basis="240px"
>&lt;/p>
&lt;p>在惡意軟體解析與逆向工程領域，成為全球業界標準的高階反組譯器與反編譯器。Pro 版非常昂貴，但如果是個人或非商業用途，可以免費使用功能限制版的「IDA Free」。&lt;/p>
&lt;h2 id="x64dbg-x32dbg">x64dbg (x32dbg)
&lt;/h2>&lt;p>&lt;img src="http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_7.png"
width="479"
height="430"
srcset="http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_7_hube21c1a0d75785c568f5805ce2a13d30_21845_480x0_resize_box_3.png 480w, http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_7_hube21c1a0d75785c568f5805ce2a13d30_21845_1024x0_resize_box_3.png 1024w"
loading="lazy"
alt="img_7.png"
class="gallery-image"
data-flex-grow="111"
data-flex-basis="267px"
>&lt;/p>
&lt;p>Windows 專用的開源除錯器。專門用於一邊執行執行檔，一邊以逐步執行來解析內容與記憶體狀態的「動態解析」，常被用於解讀 Crackme（用於解析練習的程式）或調查惡意軟體的行為。&lt;/p>
&lt;h2 id="ilspy--dotpeek">ILSpy / dotPeek
&lt;/h2>&lt;p>&lt;img src="http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_8.png"
width="256"
height="256"
srcset="http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_8_hu85c069d4379e159e6158cf86ba41fdc9_34476_480x0_resize_box_3.png 480w, http://kenji.blog/p/%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%ABexe%E3%81%AE%E4%B8%AD%E8%BA%AB%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%99%E3%82%8B%E3%83%84%E3%83%BC%E3%83%AB/img_8_hu85c069d4379e159e6158cf86ba41fdc9_34476_1024x0_resize_box_3.png 1024w"
loading="lazy"
alt="img_8.png"
class="gallery-image"
data-flex-grow="100"
data-flex-basis="240px"
>&lt;/p>
&lt;p>如果目標的 EXE 檔案是使用 C# 等 .NET 相關語言所建立，透過使用這些工具，可以將其反編譯到幾乎與原始程式碼相同的狀態，將內容完全曝光。&lt;/p>
&lt;p>雖然這些工具有助於檢查 EXE 檔案的內容，但必須注意。編輯檔案或將其用於不正當的用途，可能會引起著作權法或安全上的問題，因此請在充分理解的情況下使用。&lt;/p></description></item><item><title>如何在 Windows 中尋找路徑中的執行檔位置</title><link>http://kenji.blog/zh-tw/p/windows-%E3%81%A7%E3%83%91%E3%82%B9%E3%81%AE%E9%80%9A%E3%81%A3%E3%81%9F%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%AE%E5%A0%B4%E6%89%80%E3%82%92%E8%A6%8B%E3%81%A4%E3%81%91%E3%82%8B%E6%96%B9%E6%B3%95/</link><pubDate>Mon, 03 Apr 2023 00:02:55 +0900</pubDate><guid>http://kenji.blog/zh-tw/p/windows-%E3%81%A7%E3%83%91%E3%82%B9%E3%81%AE%E9%80%9A%E3%81%A3%E3%81%9F%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%AE%E5%A0%B4%E6%89%80%E3%82%92%E8%A6%8B%E3%81%A4%E3%81%91%E3%82%8B%E6%96%B9%E6%B3%95/</guid><description>&lt;img src="http://kenji.blog/p/windows-%E3%81%A7%E3%83%91%E3%82%B9%E3%81%AE%E9%80%9A%E3%81%A3%E3%81%9F%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%AE%E5%A0%B4%E6%89%80%E3%82%92%E8%A6%8B%E3%81%A4%E3%81%91%E3%82%8B%E6%96%B9%E6%B3%95/img.png" alt="Featured image of post 如何在 Windows 中尋找路徑中的執行檔位置" />&lt;h1 id="如何在-windows-中尋找路徑中的執行檔位置">如何在 Windows 中尋找路徑中的執行檔位置
&lt;/h1>&lt;p>當您指定一個執行檔來執行命令時，有時您會想知道該執行檔的確切位置。在這種情況下，您可以使用以下命令來找出執行檔的位置。&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-powershell" data-lang="powershell">&lt;span class="line">&lt;span class="cl">&lt;span class="nb">where &lt;/span>&lt;span class="p">&amp;lt;&lt;/span>&lt;span class="n">執行檔名稱&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>例如，如果您想知道小畫家 (mspaint.exe) 的位置，請執行以下操作：&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-powershell" data-lang="powershell">&lt;span class="line">&lt;span class="cl">&lt;span class="nb">where &lt;/span>&lt;span class="n">mspaint&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="py">exe&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;h1 id="參考">參考
&lt;/h1>&lt;ul>
&lt;li>&lt;a class="link" href="https://superuser.com/questions/49104/how-do-i-find-the-location-of-an-executable-in-windows" target="_blank" rel="noopener"
>How do I find the location of an executable in Windows?&lt;/a>&lt;/li>
&lt;/ul></description></item></channel></rss>