# 网站检测到Linux提权

**URL:** <https://forum.90sec.com/t/topic/2976>\
**Category:** 技术文章\
**Created:** [2011 年11 月 28 日 16:26 UTC](https://forum.90sec.com/t/topic/2976 "2011-11-28T16:26:15Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

作者： ![M3loee](https://forum.90sec.com/user_avatar/forum.90sec.com/m3loee/32/11354_2.png) [@M3loee](https://forum.90sec.com/u/M3loee)\
发布日期： [2011 年11 月 28 日 16:26 UTC](https://forum.90sec.com/t/topic/2976/1 "2011-11-28T16:26:15Z")

</div>

_本帖最后由 M3loee 于 2011-11-29 00:29 编辑_

\*\* 看了xiaobo大牛在1月份提权的一台Linux服务器视频后，也想着去尝试提权，毕竟目前来说Linux玩的很少。  
这是他原来找的该网站的注射点：[http://www.xxxx.com/view.jsp?id=1](http://www.xxxx.com/view.jsp?id=1)，注射完后直接传jsp马，也直接是root权限。  
本想依葫芦画瓢却发现网站早换成php的了，无奈，再来检测一遍吧！  
打开[http://www.xxxx.com](http://www.xxxx.com) ，习惯的加了个robots.txt：

```
[图片1.png](/discuz-migration/attachments/d70b8864d946a452c5e745903765b2c00bbdc9863924d6fd7852fd77f32012c3)

    结合主页（主页就不发了，怕被轮xx）和以往经验，觉得是phpcms，先来试试2008的默认注射：flash_upload.php?modelid=1：

[图片2.png](/discuz-migration/attachments/2e1a4e651278e78dcf58a2a82f8b62a495cd2a8bf7a5b565a8ce5250b633baef)

嗯，确定是phpcms2008的了，第一次我搞2008的时候，同样是这个页面迷惑了我，我当时直接就放弃了，以为不存在。后来绕了一圈才发现原来依旧可以射。
直接丢到havij里：

[图片3.png](/discuz-migration/attachments/55e00dc6c4b133d60e30e09ce885a22f55acec28a88a80fb4e059b5806a230c3)

    破之登录后台直接上传php轻松拿到shell:

[图片4.png](/discuz-migration/attachments/61ef13f5ae2f006a1c05c99f57798e31301a75c7d2c4a8182df7fdb43e29dfc1)

uname-a查看内核版本：2.6.18-194.e15，据说成功率不高。		
不管他了，先反弹到本地:

[图片5.png](/discuz-migration/attachments/43ba1c1ec2f163f38881b9255c2064fa130b7b0ea14585f8ae86316dc5823e97)

看到了不是root权限，传相应的exp到/tmp目录下，
cd /tmp 
ls

[图片6.png](/discuz-migration/attachments/15e42821e2aab90a892ea7c76fdc34910dcc4b4d2a08c5ff018aead6ca1dc3bb)

chmod +x 2.6.18-194
./2.6.18-194

[图片7.png](/discuz-migration/attachments/c72fac3586baeb095d01a5275c24ce6f3bd947bf1dc766c1ca8903e041e885a4)

    扫下端口:

[图片8.png](/discuz-migration/attachments/8d640501bcf4625b51b8b8fca33d629235e3104e69b5a874152cb2139c099dd4)

    开了22端口，果断添加用户尝试ssh登录。

[图片9.png](/discuz-migration/attachments/ea56eb6a350ec0b329c78261a884a9446ac7c01d309b925d62a5e539094058ef)

加完用户就putty上去补补洞神马的。

总结：时隔半年，该公司虽然意识到把网站系统换了，但在本质上还是缺乏安全意识，最终还是导致网站服务器的沦陷。
OK，补完漏洞闪人了，白白。    

```

\*\*

历史附件补充：

[历史附件 1（需登录并具有帖子访问权限）](https://forum.90sec.com/discuz-migration/attachments/d70b8864d946a452c5e745903765b2c00bbdc9863924d6fd7852fd77f32012c3)

[历史附件 2（需登录并具有帖子访问权限）](https://forum.90sec.com/discuz-migration/attachments/2e1a4e651278e78dcf58a2a82f8b62a495cd2a8bf7a5b565a8ce5250b633baef)

[历史附件 3（需登录并具有帖子访问权限）](https://forum.90sec.com/discuz-migration/attachments/55e00dc6c4b133d60e30e09ce885a22f55acec28a88a80fb4e059b5806a230c3)

[历史附件 4（需登录并具有帖子访问权限）](https://forum.90sec.com/discuz-migration/attachments/61ef13f5ae2f006a1c05c99f57798e31301a75c7d2c4a8182df7fdb43e29dfc1)

[历史附件 5（需登录并具有帖子访问权限）](https://forum.90sec.com/discuz-migration/attachments/43ba1c1ec2f163f38881b9255c2064fa130b7b0ea14585f8ae86316dc5823e97)

[历史附件 6（需登录并具有帖子访问权限）](https://forum.90sec.com/discuz-migration/attachments/15e42821e2aab90a892ea7c76fdc34910dcc4b4d2a08c5ff018aead6ca1dc3bb)

[历史附件 7（需登录并具有帖子访问权限）](https://forum.90sec.com/discuz-migration/attachments/c72fac3586baeb095d01a5275c24ce6f3bd947bf1dc766c1ca8903e041e885a4)

[历史附件 8（需登录并具有帖子访问权限）](https://forum.90sec.com/discuz-migration/attachments/8d640501bcf4625b51b8b8fca33d629235e3104e69b5a874152cb2139c099dd4)

[历史附件 9（需登录并具有帖子访问权限）](https://forum.90sec.com/discuz-migration/attachments/ea56eb6a350ec0b329c78261a884a9446ac7c01d309b925d62a5e539094058ef)

---

<div class="post-metadata">

作者： ![cfking](https://forum.90sec.com/letter_avatar_proxy/v4/letter/c/3da27b/32.png) [@cfking](https://forum.90sec.com/u/cfking)\
发布日期： [2011 年11 月 28 日 16:46 UTC](https://forum.90sec.com/t/topic/2976/2 "2011-11-28T16:46:38Z")

</div>

向楼主的补洞精神学习

---

<div class="post-metadata">

作者： ![Agile](https://forum.90sec.com/user_avatar/forum.90sec.com/agile/32/11326_2.png) [@Agile](https://forum.90sec.com/u/Agile)\
发布日期： [2011 年11 月 29 日 02:05 UTC](https://forum.90sec.com/t/topic/2976/3 "2011-11-29T02:05:00Z")

</div>

别和我一样 给服务器做安全 结果淫荡的管理员把我后门账户全部删了 服务器多进不去了 嘿嘿 支持楼主

---

<div class="post-metadata">

作者： ![Chmodx](https://forum.90sec.com/user_avatar/forum.90sec.com/chmodx/32/11355_2.png) [@Chmodx](https://forum.90sec.com/u/Chmodx)\
发布日期： [2011 年11 月 29 日 10:50 UTC](https://forum.90sec.com/t/topic/2976/4 "2011-11-29T10:50:57Z")

</div>

为什么图片挂了？ 是我的原因吗？

---

<div class="post-metadata">

作者： ![lovehkba](https://forum.90sec.com/user_avatar/forum.90sec.com/lovehkba/32/11343_2.png) [@lovehkba](https://forum.90sec.com/u/lovehkba)\
发布日期： [2011 年11 月 29 日 11:39 UTC](https://forum.90sec.com/t/topic/2976/5 "2011-11-29T11:39:07Z")

</div>

我表示我也看不见图片神马原因啊

---

<div class="post-metadata">

作者： ![user10](https://forum.90sec.com/user_avatar/forum.90sec.com/user10/32/11334_2.png) [@user10](https://forum.90sec.com/u/user10)\
发布日期： [2011 年11 月 29 日 12:45 UTC](https://forum.90sec.com/t/topic/2976/6 "2011-11-29T12:45:49Z")

</div>

多谢分享，学习了。我觉得90sec的水印该弄小一点。。。。

---

<div class="post-metadata">

作者： ![yasmong](https://forum.90sec.com/letter_avatar_proxy/v4/letter/y/c4cdca/32.png) [@yasmong](https://forum.90sec.com/u/yasmong)\
发布日期： [2011 年11 月 29 日 15:51 UTC](https://forum.90sec.com/t/topic/2976/7 "2011-11-29T15:51:23Z")

</div>

好文章啊，正在学linux提权

---

<div class="post-metadata">

作者： ![595722950](https://forum.90sec.com/letter_avatar_proxy/v4/letter/5/aeb1de/32.png) [@595722950](https://forum.90sec.com/u/595722950)\
发布日期： [2011 年11 月 29 日 17:15 UTC](https://forum.90sec.com/t/topic/2976/8 "2011-11-29T17:15:19Z")

</div>

谢谢 我来过{:4\_40:}

---

<div class="post-metadata">

作者： ![M3loee](https://forum.90sec.com/user_avatar/forum.90sec.com/m3loee/32/11354_2.png) [@M3loee](https://forum.90sec.com/u/M3loee)\
发布日期： [2011 年11 月 30 日 02:52 UTC](https://forum.90sec.com/t/topic/2976/9 "2011-11-30T02:52:49Z")

</div>

\*\*回复 [4#](http://www.90sec.org/redirect.php?goto=findpost&pid=7354&ptid=881) _Chmodx_ \*\*

```
没有

```

---

<div class="post-metadata">

作者： ![M3loee](https://forum.90sec.com/user_avatar/forum.90sec.com/m3loee/32/11354_2.png) [@M3loee](https://forum.90sec.com/u/M3loee)\
发布日期： [2011 年11 月 30 日 02:53 UTC](https://forum.90sec.com/t/topic/2976/10 "2011-11-30T02:53:17Z")

</div>

\*\*回复 [5#](http://www.90sec.org/redirect.php?goto=findpost&pid=7355&ptid=881) _lovehkba_ \*\*

```
RP+长相问题

```

---

<div class="post-metadata">

作者： ![EchoEye](https://forum.90sec.com/letter_avatar_proxy/v4/letter/e/bc79bd/32.png) [@EchoEye](https://forum.90sec.com/u/EchoEye)\
发布日期： [2011 年11 月 30 日 03:28 UTC](https://forum.90sec.com/t/topic/2976/11 "2011-11-30T03:28:00Z")

</div>

最后加那个账户果断权限不够，没有加到root组

---

<div class="post-metadata">

作者： ![user21](https://forum.90sec.com/letter_avatar_proxy/v4/letter/u/6bbea6/32.png) [@user21](https://forum.90sec.com/u/user21)\
发布日期： [2011 年11 月 30 日 04:07 UTC](https://forum.90sec.com/t/topic/2976/12 "2011-11-30T04:07:29Z")

</div>

熬夜的孩纸伤不起 {:4\_37:}

---

<div class="post-metadata">

作者： ![lovehkba](https://forum.90sec.com/user_avatar/forum.90sec.com/lovehkba/32/11343_2.png) [@lovehkba](https://forum.90sec.com/u/lovehkba)\
发布日期： [2011 年11 月 30 日 04:41 UTC](https://forum.90sec.com/t/topic/2976/13 "2011-11-30T04:41:29Z")

</div>

\*\*回复 [10#](http://www.90sec.org/redirect.php?goto=findpost&pid=7482&ptid=881) _M3loee_ \*\*

```
那个时候看的时候却实看不到图片，现在显示正常了啊

```

---

<div class="post-metadata">

作者： ![M3loee](https://forum.90sec.com/user_avatar/forum.90sec.com/m3loee/32/11354_2.png) [@M3loee](https://forum.90sec.com/u/M3loee)\
发布日期： [2011 年11 月 30 日 05:12 UTC](https://forum.90sec.com/t/topic/2976/14 "2011-11-30T05:12:18Z")

</div>

\*\*回复 [11#](http://www.90sec.org/redirect.php?goto=findpost&pid=7487&ptid=881) _EchoEye_ \*\*

```
嗯 图是渗透完毕后再截的，可能截图时忘了 “useradd -g root testing”，你挺细心的。

```

---

<div class="post-metadata">

作者： ![desperado](https://forum.90sec.com/letter_avatar_proxy/v4/letter/d/3ab097/32.png) [@desperado](https://forum.90sec.com/u/desperado)\
发布日期： [2011 年12 月 1 日 09:38 UTC](https://forum.90sec.com/t/topic/2976/15 "2011-12-01T09:38:03Z")

</div>

\*\*回复 [15#](http://www.90sec.org/redirect.php?goto=findpost&pid=7514&ptid=881) _M3loee_ \*\*  
大牛，手上有个linux的shell，能否帮忙看看啊。

---

<div class="post-metadata">

作者： ![user364](https://forum.90sec.com/letter_avatar_proxy/v4/letter/u/e5b9ba/32.png) [@user364](https://forum.90sec.com/u/user364)\
发布日期： [2011 年12 月 2 日 08:21 UTC](https://forum.90sec.com/t/topic/2976/16 "2011-12-02T08:21:15Z")

</div>

看懂了。。。。。

---

<div class="post-metadata">

作者： ![M3loee](https://forum.90sec.com/user_avatar/forum.90sec.com/m3loee/32/11354_2.png) [@M3loee](https://forum.90sec.com/u/M3loee)\
发布日期： [2011 年12 月 2 日 08:34 UTC](https://forum.90sec.com/t/topic/2976/17 "2011-12-02T08:34:28Z")

</div>

\*\*回复 [16#](http://www.90sec.org/redirect.php?goto=findpost&pid=7711&ptid=881) _desperado_ \*\*

```
我菜啊 这个还得去找yesu

```

---

<div class="post-metadata">

作者： ![qingfeng](https://forum.90sec.com/letter_avatar_proxy/v4/letter/q/eb8c5e/32.png) [@qingfeng](https://forum.90sec.com/u/qingfeng)\
发布日期： [2011 年12 月 3 日 03:03 UTC](https://forum.90sec.com/t/topic/2976/18 "2011-12-03T03:03:40Z")

</div>

内网用户，表示悲伤路过！

---

<div class="post-metadata">

作者： ![Curtain](https://forum.90sec.com/letter_avatar_proxy/v4/letter/c/f14d63/32.png) [@Curtain](https://forum.90sec.com/u/Curtain)\
发布日期： [2011 年12 月 3 日 04:09 UTC](https://forum.90sec.com/t/topic/2976/19 "2011-12-03T04:09:08Z")

</div>

直接就有chmod -x 的权限.? root?

---

<div class="post-metadata">

作者： ![564402547](https://forum.90sec.com/letter_avatar_proxy/v4/letter/5/3ec8ea/32.png) [@564402547](https://forum.90sec.com/u/564402547)\
发布日期： [2011 年12 月 3 日 07:39 UTC](https://forum.90sec.com/t/topic/2976/20 "2011-12-03T07:39:26Z")

</div>

看到水印 我表示压力不小

[下一页](https://forum.90sec.com/t/topic/2976.md?page=2)
