{"id":56,"date":"2026-01-22T04:47:39","date_gmt":"2026-01-22T04:47:39","guid":{"rendered":"https:\/\/blog.gpst.net.cn:4008\/?p=56"},"modified":"2026-01-28T06:24:16","modified_gmt":"2026-01-28T06:24:16","slug":"shcupx%e5%8a%a0%e5%af%86bash-shell%e8%84%9a%e6%9c%ac","status":"publish","type":"post","link":"https:\/\/opshub.com.cn\/?p=56","title":{"rendered":"shc+upx\u52a0\u5bc6bash shell\u811a\u672c"},"content":{"rendered":"\n<p>1\u3001\u5b89\u88c5shc<br>make<br>echo &#8220;y&#8221; |make install<br>2\u3001\u5b89\u88c5ucl<br>tar zvxf .\/ucl-1.03.tar.gz -C \/opt\/<br>.\/configure &amp;&amp; make &amp;&amp; make install (centos)<br>.\/configure CPPFLAGS=&#8221;$CPPFLAGS -std=c90 -fPIC&#8221; (ubuntu\/debian)<br>3\u3001\u5b89\u88c5lzma<br>mkdir -p \/opt\/lzma<br>tar jxf lzma443.tar.bz2 -C \/opt\/lzma<br>4\u3001\u5b89\u88c5upx<br>export UPX_UCLDIR=\/opt\/ucl-1.03<br>export UPX_LZMADIR=\/opt\/lzma\/<br>export UPX_LZMA_VERSION=0x443<br>make all &amp;&gt;\/dev\/null<br>mv ..\/upx-3.95-src \/opt\/upx<br>mkdir<br>5\u3001\u5b89\u88c5glibc-static<br>yum -y install glibc-static (centos)<br>apt-get install libc6-dev (ubuntu\/debian)<\/p>\n\n\n\n<p>6\u3001shc\u52a0\u5bc6\u811a\u672c<br>CFLAGS=-static \/usr\/local\/bin\/shc -T -r -f &#8220;&#8221;<br>7\u3001upx\u52a0\u58f3<br>\/opt\/upx\/src\/upx.out &#8220;.x&#8221;<br>8\u3001\u6dfb\u52a0boot\u9632\u6b62\u53cd\u7f16\u8bd1<\/p>\n\n\n\n<p><code>for ((i = 1; i &lt; 11; i++)); do dd if=\/dev\/urandom bs=17238 count=1 &gt;&gt;\".x\"; done &amp;&gt;\/dev\/null<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code><code>hexdump -ve '1\/1 \"%.2x\"' \"${FFF1}.x\" | sed 's\/546869732066696c65206973207061636b6564207769746820746865205550582065786563757461626c65207061636b657220687474703a2f2f7570782e73662e6e6574\/746e616562716769626236747976776665726e66777a4e6361787a676f7971677a68643563776563706673746e4b7768716d676e747278637a69746175676e696f6d766d\/g;s\/55505820332e393520436f707972696768742028432920313939362d323031382074686520555058205465616d2e20416c6c205269676874732052657365727665642e\/65757463626e7a7877696b71757474627461756f5770776878616a6732697571743070716e69666e6e6f694470676d74716c6b6c6d6764636f6e706e6765776478706e\/g;s\/555058\/647870\/g' | xxd -r -p &gt;\"&lt;\u4e8c\u8fdb\u5236\u6587\u4ef6&gt;.exe\"<\/code><\/code><\/code><\/pre>\n\n\n\n<p><br>9\u3001\u4ea7\u51fa\u7ed3\u679c:&#8221;&lt;\u4e8c\u8fdb\u5236\u6587\u4ef6&gt;.exe&#8221;<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>10\u3001\u5b89\u88c5\u5305\uff1a<\/p>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-ac1e7236-85b6-45dd-95b8-4e40ebfef120\" href=\"https:\/\/blog.opshub.com.cn\/wp-content\/uploads\/2026\/01\/ucl-1.03.tar.gz\">ucl-1.03.tar<\/a><a href=\"https:\/\/blog.opshub.com.cn\/wp-content\/uploads\/2026\/01\/ucl-1.03.tar.gz\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-ac1e7236-85b6-45dd-95b8-4e40ebfef120\">Download<\/a><\/div>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-b8848f13-d19b-40fa-8d76-75d2bd89efa1\" href=\"https:\/\/blog.opshub.com.cn\/wp-content\/uploads\/2026\/01\/shc-3.8.9b-3.8.9b.tar.gz\">shc-3.8.9b-3.8.9b.tar<\/a><a href=\"https:\/\/blog.opshub.com.cn\/wp-content\/uploads\/2026\/01\/shc-3.8.9b-3.8.9b.tar.gz\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-b8848f13-d19b-40fa-8d76-75d2bd89efa1\">Download<\/a><\/div>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-2288eded-691a-4fbc-ab60-1bf1308186b7\" href=\"https:\/\/blog.opshub.com.cn\/wp-content\/uploads\/2026\/01\/lzma443.tar.bz2\">lzma443.tar<\/a><a href=\"https:\/\/blog.opshub.com.cn\/wp-content\/uploads\/2026\/01\/lzma443.tar.bz2\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-2288eded-691a-4fbc-ab60-1bf1308186b7\">Download<\/a><\/div>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-763824f9-128f-4ac1-ab1f-4a728a5ae591\" href=\"https:\/\/blog.opshub.com.cn\/wp-content\/uploads\/2026\/01\/upx-3.95.tar.gz\">upx-3.95.tar<\/a><a href=\"https:\/\/blog.opshub.com.cn\/wp-content\/uploads\/2026\/01\/upx-3.95.tar.gz\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-763824f9-128f-4ac1-ab1f-4a728a5ae591\">Download<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001\u5b89\u88c5shcmakeecho &#8220;y&#8221; |make install2\u3001\u5b89\u88c5ucltar zvxf .\/ucl-1.03.tar.gz -C \/opt\/.\/configure &amp;&amp; make &amp;&amp; make install (centos).\/configure CPPFLAGS=&#8221;$CPPFLAGS -std=c90 -fPIC&#8221; (ubuntu\/debian)3\u3001\u5b89\u88c5lzmamkdir -p \/opt\/lzmatar jxf lzma443.tar.bz2 -C \/opt\/lzma4\u3001\u5b89\u88c5upxexport UPX_UCLDIR=\/opt\/ucl-1.03export UPX_LZMADIR=\/opt\/lzma\/export UPX_LZMA_VERSION=0x443make all &amp;&gt;\/dev\/nullmv ..\/upx-3.95-src \/opt\/upxmkdir5\u3001\u5b89\u88c5glibc-staticyum -y install glibc-static (centos)apt-get install libc6-dev (ubuntu\/debian) 6\u3001shc\u52a0\u5bc6\u811a\u672cCFLAGS=-static \/usr\/local\/bin\/shc -T -r -f &#8220;&#8221;7\u3001upx\u52a0\u58f3\/opt\/upx\/src\/upx.out &#8220;.x&#8221;8\u3001\u6dfb\u52a0boot\u9632\u6b62\u53cd\u7f16\u8bd1 for ((i = 1; i &lt; 11; i++)); do dd [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-56","post","type-post","status-publish","format-standard","hentry","category-9"],"_links":{"self":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/56","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=56"}],"version-history":[{"count":6,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/56\/revisions"}],"predecessor-version":[{"id":578,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/56\/revisions\/578"}],"wp:attachment":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=56"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=56"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=56"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}