Hacking The Interwebs

利用UPnP漏洞进行攻击
本文探讨了如何利用UPnP协议中的漏洞进行攻击,详细介绍了使用Flash构造SOAP请求的方法,无需XSS即可远程配置路由器。

通过flash构造soap请求走UPNP协议来黑家庭用的小交换机

“With great power comes great responsibility”, but those with great power
usually aren’t that responsible. Nevertheless, we try to be responsible as
much as we can. In the following post, ap
<http://www.gnucitizen.org/about/ap>  (Adrian Pastor; pagvac) and I
<http://www.gnucitizen.org/about/pdp>  (pdp) are going to expose some
secrets, which may make you question our values at first, will definitely
make you feel worried about “Why is all this possible?”, and may even make
you hate us in your guts for what we have done. It is important to
understand the magnitude of the problem we are planning to talk about, and
that we cannot go to any vendor to ask for a solution, because it is not a
bug what we have to deal with, but rather a combination of design problems.
It is an issue, which needs to be resolved right now and the only way to do
that is to go public with whatever we’ve got on our table.

During the last week we’ve tried to prepare you for this very moment by
exposing bits
<http://www.gnucitizen.org/blog/hacking-with-upnp-universal-plug-and-play>
and pieces on how UPnP works and why it is so important to keep it in mind
when testing and securing networks. We’ve also talked
<http://www.gnucitizen.org/blog/bt-home-flub-pwnin-the-bt-home-hub-5>  about
how the Universal Plug and Play can be combined with simple XSS attacks in
order to create a powerful mechanism for remotely reconfiguring vulnerable
routers without any means of authentication or authorization with the
targeted device. Today, we are going to show you that UPnP can be exploited
across the Web without the need of XSS. This is the next logical,
evolutionary step of UPnP exploitation which by far has the highest level of
severity.

We’ve talked
<http://www.gnucitizen.org/blog/hacking-with-upnp-universal-plug-and-play>
earlier that the UPnP stack consists of several technologies: SSDP (Simple
Service Discovery Protocol), GENA (Generic Event Notification Architecture),
SOAP (Simple Object Access Protocol) and XML. The UPnP control process
starts with the discovery stage. Here, a multicast SSDP packet is submitted
to 239.255.255.250:1900. Any device that listens on this multicast port will
then respond with information about their service description if they are
happy with the body of the discovery packet. The UPnP control actuator will
then read the description and look for available methods. Each method is
associated with a control point (URL and a header) and method parameters
which may or may not be required. Once the method information is obtained,
the UPnP actuator will pick the method that suits best the given task that
needs to be performed and submit a SOAP message to the control point in
order to actualize it. “This is how UPnP works in general!”

When attacking UPnP from within the network where the UPnP enabled device is
located, we pretty much proceed with the method described above. If we want
to attack a UPnP enabled device across the Web, then we have a few problems
that needs to be solved. First of all, from the Web, we cannot send and
process SSDP. SSDP is based on UDP and it deals with multicast packets which
is something browsers and Web technologies in general will probably never
learn how to work with. The only stage that we can safely perform from the
Web is the actual SOAP request, which is the very last stage of the control
mechanism described in the previous paragraph.

Adrian did an amazing job explaining
<http://www.gnucitizen.org/blog/bt-home-flub-pwnin-the-bt-home-hub-5>  how
someone can reconfigure your BT Home Hub router via a pre-auth XSS. In his
post, Adrian describes a mechanism where the victim visits a malicious page,
which makes use of a XSS vulnerability that exists within the BT Home Hub
router, in order to add a portforwarding rule within the targeted device
firewall. Once the XSSed SOAP request is actualized, the attacker will be
able to get access to an internal service over the portforward. Given the
fact that the attacker can change the primary DNS server of the target
router, as well, the problem seams to be more then scary and very, very
concerning. At this stage you are probably thinking that closing the XSS
hole on the router pre-auth pages will definitely solve the problem for
good, but I am afraid to inform you that you will be wrong.

To the point: SOAP Messages are nothing but POST requests with contentType
equal to application/xml, a SOAPAction header and a request body that
complies with the SOAP message format. These three request values cannot be
changed with JavaScript unless we deal with the XMLHttpRequest object.
Though, in order to successfully use this object, we need to comply with the
Same Origin Policies (SOP) and that will mean that we need an XSS
vulnerability, as Adrian proposed
<http://www.gnucitizen.org/blog/bt-home-flub-pwnin-the-bt-home-hub-5>  in
his article. However, it is less known that these values can be easily set
with Flash. The following code demonstrates the attack vector:

http://www.gnucitizen.org/projects/hacking-the-interwebs/Test.mxml

The Test.mxml Flash Application performs several operations.

1.      At first, the MXML script creates an URLRequest object to the
targeted UPnP control point URL. In our case, this is
http://192.168.1.254/upnp/control/igd/wanpppcInternet, which is the PPP
control point of BT Home Hub. Keep in mind that other devices can be
exploited as well by changing that URL to match their setup.
2.      Then we define the request method which has to be POST.
3.      The next expression defines the request data. This is the actual
SOAP Message which will add the portforwarding rule.
4.      We need to set the contentType to application/xml.
5.      Then we push the SOAPAction header into the Array of headers.
6.      And finally we open the URLRequest with navigateToURL. The respond
will render within _self.

Shockwave Flash 9.0 r115 (the latest at the time of writing but not
automatically deployed) seams to incorrectly supply the request headers.
This may make the attack to fail if you use Firefox, Opera or Safari and the
attacked router or UPnP device is picky about CR and CRLF line endings.
Earlier flash versions does not have this problem/bug. Keep in mind that
most devices will accept the request although the line endings are mixed up
a bit.

When the victim visits the malicious SWF file, the above 6 steps will
silently execute in the background. At that moment the attacker will have
control over the service the portforwarding rule was assigned for for. Keep
in mind that no XSS is required, it is a matter of visiting the wrong
resource at the wrong time. Also, keep in mind that 99% of home routers are
vulnerable to this attack as all of them support UPnP to one degree or
another.

I repeat myself far too much, but I guess I have another opportunity to
mention that adding a portforwarding is only one of the many things someone
can do to your router. The most malicious of all malicious things is to
change the primary DNS server. That will effectively turn the router and the
network it controls into a zombie which the attacker can take advantage of
whenever they feel like it. It is also possible to reset the admin
credentials and create the sort of onion routing network all the bad guys
want. We hope that by exposing this information, we will drastically improve
the situation for the future. I think that this is a lot better than keeping
it for ourselves or risking it all by given the criminals the opportunity to
have in possession a secret which no one else is aware of.

GNUCITIZEN is a Cutting Edge, Ethical Hacker Outfit, Information Think Tank,
which primarily deals with all aspects of the art of hacking. Our work has
been featured in established magazines and information portals, such as
Wired, Eweek, The Register, PC Week, IDG, BBC and many others. The members
of the GNUCITIZEN group are well known and well established experts in the
Information Security, Black Public Relations (PR) Industries and Hacker
Circles with widely recognized experience in the government and corporate
sectors and the open source community.

GNUCITIZEN is an ethical, white-hat organization that doesn’t hide
anything. We strongly believe that knowledge belongs to everyone and we make
everything to ensure that our readers have access to the latest cutting-edge
research and get alerted of the newest security threats when they come. Our
experience shows that the best way of protection is mass information. And we
mean that literally!!! It is in the public’s best interest to make our
findings accessible to vast majority of people, simply because it is proven
that the more people know about a certain problem, the better.

download: Harmless/Useless
<http://www.gnucitizen.org/projects/hacking-the-interwebs/Test.mxml>  Proof
of Concept - use for demonstration and eduction purposes only

The only way to protect yourself is to turn off UPnP. Yes, that will make
your life harder and probably your skype or msn wont work as flawlessly as
before but it is a trade-off you have to learn to live with.

 
多源数据接入 支持校园各业务系统数据接入:包括教务系统(学生成绩、课程信息)、学工系统(奖惩记录、资助信息)、后勤系统(宿舍分配、能耗数据)、图书馆系统(借阅记录、馆藏信息)、一卡通系统(消费数据、门禁记录)等。 接入方式:提供数据库直连(MySQL、SQL Server)、文件导入(CSV、Excel、JSON)、API 接口调用等多种方式,支持实时同步与定时批量同步。 数据标准化与治理 建立校园数据标准体系:统一数据格式(如日期格式、学号编码规则)、定义核心数据元(如 “学生” 包含学号、姓名、专业等必选字段)、规范代码集(如性别代码 “1 - 男,2 - 女”)。 数据清洗:自动检测并处理缺失值、重复值、异常值(如成绩 > 100 分),通过规则引擎实现数据校验(如 “学生年龄需在 16-30 岁之间”)。 元数据管理:记录数据来源、格式、更新频率、负责人等信息,生成数据血缘图谱,追踪数据从产生到应用的全生命周期。 二、数据共享与交换核心功能 分布式数据存储 基于 Hadoop HDFS 实现海量数据存储:结构化数据(成绩、消费记录)存入 HBase,非结构化数据(文档、图片、视频)直接存储于 HDFS,日志类数据通过 Flume 采集至 HDFS。 支持数据分片与副本机制,确保数据高可用(默认 3 副本存储),满足校园 PB 级数据存储需求。 数据交换引擎 构建点对点数据交换通道:各部门系统可通过交换引擎向平台上传数据或申请获取授权数据,支持同步 / 异步交换模式。 交换流程管理:定义数据交换规则(如 “学工系统每日向平台同步新增学生信息”),记录交换日志(成功 / 失败状态、数据量),失败时自动重试。 数据脱敏:对敏感数据(如身份证号、银行卡号)在交换过程中进行脱敏处理(如显示 “110********5678”),兼顾共享与隐私保护。
用户信息管理 支持用户注册(手机号 / 社交账号登录)、个人信息完善(如年龄、性别、饮食禁忌、偏好菜系等)。 记录用户行为数据:浏览历史、收藏 / 点赞美食、评分记录(1-5 星)、消费记录(如外卖订单、到店消费)、搜索关键词等。 美食数据管理 存储美食基础信息:名称、分类(中餐 / 西餐 / 日料等)、子类别(川菜 / 粤菜 / 汉堡等)、食材、口味标签(辣 / 甜 / 清淡等)、价格区间、商家信息(名称、地址、评分)、图片等。 支持商家入驻与信息更新,管理员审核美食数据合规性(如食材描述真实性)。 二、协同过滤推荐核心功能 基于用户的协同过滤(User-based CF) 计算用户相似度:通过用户对美食的评分、浏览记录等行为,使用余弦相似度 / 皮尔逊相关系数识别 “相似用户群体”(如用户 A 和用户 B 对 80% 的川菜评分一致)。 生成推荐:向目标用户推送 “相似用户喜欢但目标用户未体验过” 的美食(如相似用户高分推荐的新川菜馆)。 基于物品的协同过滤(Item-based CF) 计算美食相似度:分析用户对不同美食的共同评分 / 点击行为,挖掘美食间的关联(如 “点过麻婆豆腐的用户中有 70% 也点过回锅肉”)。 生成推荐:为用户推送 “与已喜欢美食相似” 的菜品(如用户刚收藏了水煮鱼,推荐酸菜鱼、毛血旺)。 混合推荐策略 结合两种协同过滤算法结果,根据场景动态调整权重(如冷启动用户优先基于物品的推荐,活跃用户侧重基于用户的推荐)。 融合用户显式偏好(如标注 “不吃辣”)过滤推荐结果,避免无效推荐。 三、用户交互与推荐展示 个性化推荐页 首页展示 “为你推荐” 列表,按推荐优先级排序,显示美食图片、名称、匹配度(如 “98% 的相似用户喜欢”)、用户评分、距离(适用于到店推荐)等。 支持按场景筛选推荐(如 “午餐推荐”“周末聚餐推荐”“性价比推荐”)。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值