当前位置:网站首页>WordPress的管理员用户名是如何泄露的
WordPress的管理员用户名是如何泄露的
2022-06-10 14:22:00 【fmz2222】
WordPress 的管理员账户很容易就能获取,虽然说拿到了管理员账号,用处不是很大,但是不排除有些小白的密码是简单的数字密码。被攻击者爆破或者撞库成功,从而获得后台的管理员账户。
那么。攻击者是怎样拿到你的Wordpress 【管理员用户名】的,以及如何保护自己的管理员账户不被获取,这篇文章就来谈谈!!!
获取
1、先说说管理员账户如何泄露
攻击者或者攻击程序构造了:https://www.5uapk.com/wp-json/wp/v2/users/ 的URL进行GET,这样99%会返回一串信息,里面包含了你的管理员账户。如下:
- [{"id":1,"name":"daniao","url":"","description":"","link":"https:\/\/daniao.com\/author\/daniao","slug":"daniao","avatar_urls":{"24":"https:\/\/cn.gravatar.com\/avatar\/28f745cefb1ad2da1747cdcfccc0ddfa?s=24&d=mm&r=g","48":"https:\/\/cn.gravatar.com\/avatar\/28f745cefb1ad2da1747cdcfccc0ddfa?s=48&d=mm&r=g","96":"https:\/\/cn.gravatar.com\/avatar\/28f745cefb1ad2da1747cdcfccc0ddfa?s=96&d=mm&r=g"},"meta":[],"_links":{"self":[{"href":"https:\/\/daniao.com\/wp-json\/wp\/v2\/users\/1"}],"collection":[{"href":"https:\/\/daniao.com\/wp-json\/wp\/v2\/users"}]}}]
以上信息可以发现:daniao就是管理员账号,真实已被隐藏,这里只为了演示。
2、确认是否使用了wordpress程序
其实上面的代码差不多已经确认你用的是wp程序了,这里还是提及一下:
攻击者或者攻击程序通过构造 https://www.5uapk.com//wp-includes/wlwmanifest.xml 的URL进行GET,来判断你是否使用了Wordpress程序。以及你的后台登录地址!输入后你会得到这样的反馈。所以修改后台登录地址很重要。
- <manifest xmlns="http://schemas.microsoft.com/wlw/manifest/weblog">
- <options>
- <clientType>WordPress</clientType>
- <supportsKeywords>Yes</supportsKeywords>
- <supportsGetTags>Yes</supportsGetTags>
- </options>
- <weblog>
- <serviceName>WordPress</serviceName>
- <imageUrl>images/wlw/wp-icon.png</imageUrl>
- <watermarkImageUrl>images/wlw/wp-watermark.png</watermarkImageUrl>
- <homepageLinkText>View site</homepageLinkText>
- <adminLinkText>Dashboard</adminLinkText>
- <adminUrl>
- <![CDATA[ {blog-postapi-url}/../wp-admin/ ]]>
- </adminUrl>
- <postEditingUrl>
- <![CDATA[ {blog-postapi-url}/../wp-admin/post.php?action=edit&post={post-id} ]]>
- </postEditingUrl>
- </weblog>
- <buttons>
- <button>
- <id>0</id>
- <text>Manage Comments</text>
- <imageUrl>images/wlw/wp-comments.png</imageUrl>
- <clickUrl>
- <![CDATA[ {blog-postapi-url}/../wp-admin/edit-comments.php ]]>
- </clickUrl>
- </button>
- </buttons>
- </manifest>
3、确认你的用户id
攻击者还会通过构造 < https://www.5uapk.com?author=1 //?author=2 //?author=3> 来确认你的管理员id,以此来和上面的匹配。
保护
既然知道了,那么如何防护呢,继续往下看吧。
4、设置访问权限
1)禁止访问/wp-json/wp/v2/users/,如果是宝塔的话,可以在网站配置或者伪静态中设置如下代码。
此处为隐藏的内容!
发表评论并刷新,方可查看
4)效果
这时候访问上述网页,就会被屏蔽结果。如图:


5、如果你是宝塔而且安装了专业版防火墙,还可以这样设置
在禁止访问的url中添加以下规则:
- /wp-json/wp/v2/users
- /wp-includes/wlwmanifest.xml
此时访问,会出现防火墙拦截的提示。

6、最后
这其实不是个漏洞,所以不用紧张,其实稍微注意点安全的小伙伴早就修改了一个非常强壮的密码,隐藏了登录后台,禁用了xmlrpc.php。
1)如果要禁用xmlrpc.php,可以利用nginx,代码如下,放置还是和上面一样,放在伪静态设置中。
- location ^~ /xmlrpc.php { return 403; }
是否禁用根据自己需要吧,如果出现升级错误,那么可以删除掉或者禁用掉代码即可。
2)其实有一些主题的管理员账号是显示在文章里面的,感觉这样真的是……,我们可以在wp后台设置一个昵称,这样文章会显示昵称在文章中。
3)各位小伙伴可以通过以上URL测试一下自己的Wordpress站点。看看是不是可以拿到敏感信息。如果特别敏感,就赶紧设置权限。
边栏推荐
- C#多线程学习笔记二
- .NET C#基础(7):接口 - 人如何和猫互动
- Resolve the error reported when installing gerapy: error: cannot uninstall 'certificate' It is a distutils installed project...
- erp odoo 权限管理5年系统设置经验小结 真经验分享
- [discrete mathematics review series] III. concept and operation of sets
- C multithreading learning note 1
- 互联网公司研发效能团队为啥必须独立?何时独立?
- Beijing / Shanghai internal promotion | recruitment of full-time interns in the system and network group of Microsoft Research Asia
- Docker部署一个Redis集群
- Yanrong looks at how to realize the optimal storage solution of data Lake in a hybrid cloud environment
猜你喜欢

Win10 virtual machine download and installation process

Flutter listview, column, row learning personal summary 2

【离散数学期复习系列】五、一些特殊的图

2022广东省安全员A证第三批(主要负责人)考试练习题及在线模拟考试

SIGIR 2022 | HKU and Wuhan University put forward kgcl: a recommendation system based on knowledge map comparative learning

STM8S103f单片机的开发(1)LED灯的点亮

Flutter drawer learning summary 6
![[discrete mathematics review series] III. concept and operation of sets](/img/b5/5c7d077490875dbe0ff4777f6b0a7a.png)
[discrete mathematics review series] III. concept and operation of sets
![[special introduction] round table forum -- the integration of AI and audio and video technology](/img/51/c383175f416469e9dcf6f941f1becc.png)
[special introduction] round table forum -- the integration of AI and audio and video technology

Still saying that university rankings are a joke? The latest regulation: Top50 universities in the world can be directly settled in Shanghai!
随机推荐
STM8S103f单片机的开发(1)LED灯的点亮
Brief description of adaptive function
Flutter Icon Stack LIsttitle...学习总结3
Analysis on the use of coordinatorlayout
【离散数学期复习系列】五、一些特殊的图
C multithreading learning note 3
Basic concept of data warehouse
P3379 [template] nearest common ancestor (LCA)
Gin blog 总结1
Ue5 Comment convertir les coordonnées de l'écran en coordonnées du monde et en direction du monde
Bottomnavigationview is used in conjunction with viewpager, to modify icon size, to remove text, etc
For the first time, the Pentagon admitted to funding 46 biological facilities in Ukraine. Russia once revealed that only three were safe
ScrollView 初始化的时候不在最顶部?
超强实操!手把手教学Kinect深度图与RGB摄像头的标定与配准
Why should the R & D effectiveness team of Internet companies be independent? When is independence?
什么是CAS 以及 CAS 中的 ABA 问题
算力网络照进现实,浩鲸科技如何构建?
net core天马行空系列-可用于依赖注入的,数据库表和c#实体类互相转换的接口实现
【离散数学期复习系列】六、树
C#多线程学习笔记一