当前位置:网站首页>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站点。看看是不是可以拿到敏感信息。如果特别敏感,就赶紧设置权限。
边栏推荐
- [special introduction] round table forum -- the integration of AI and audio and video technology
- C multithreading learning note 2
- 还在说大学排名是笑话?最新规定:世界top50大学可以直接落户上海!
- Microsoft Word 教程,如何在 Word 中更改页边距、创建新闻稿栏?
- QT 基于QScrollArea的界面嵌套移动
- QT interface nested movement based on qscrollarea
- What is CAS and ABA in CAS
- STM8S103f单片机的开发(1)LED灯的点亮
- [C language] pointer function, function pointer and array function
- [big guy show] aiops in the eyes of Borui data, choosing the right track and the right people
猜你喜欢

Ue5 how to convert screen coordinates to world coordinates and World Directions

Flutter drawer learning summary 6

【专题介绍】圆桌论坛——AI与音视频技术的融合之路

Mutual transformation among lists, arrays and tensors

列表、数组和张量之间的相互转化
![[discrete mathematics review series] VI. tree](/img/ec/2755c9328a04483080789b366f2d96.png)
[discrete mathematics review series] VI. tree

Flyter page Jump to transfer parameters, tabbar learning summary 5

【解决】每次加载已经训练好的模型,生成的向量会有不同

Binary tree and figure 1

2022 examination question bank and online simulation examination for main principals of hazardous chemical business units
随机推荐
ScrollView 初始化的时候不在最顶部?
Yanrong looks at how to realize the optimal storage solution of data Lake in a hybrid cloud environment
消息中间件的消费模式
Simulated 100 questions and online simulated examination for safety production management personnel of hazardous chemical production units in 2022
Adding, deleting, modifying and querying databases with JDBC
这个牛逼的低代码生成器,现在开源了!
这些难搞的内存问题你都懂了吗?
Bottomnavigationview is used in conjunction with viewpager, to modify icon size, to remove text, etc
【离散数学期复习系列】五、一些特殊的图
one
odoo 权限管理(访问权限及记录规则)结合实用,升级角色管理
Microsoft Word 教程,如何在 Word 中更改页边距、创建新闻稿栏?
Beijing / Shanghai internal promotion | recruitment of full-time interns in the system and network group of Microsoft Research Asia
【离散数学期复习系列】四、图
微信小程序 返回上一页并传参
【離散數學期複習系列】二、一階邏輯(謂詞邏輯)
Is it safe to open an account in qiniu
Flutter learning personal summary 1
Gin blog 总结1
微信小程序 关闭当前页面