Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
Jrohy-trojan-unauth-poc — CVE-2024-55215 | Kitploit
工具/GitHubGitHub/ainrm/jrohy-trojan-unauth-poc
身份验证与授权漏洞分析漏洞利用Web应用程序漏洞利用渗透测试红队
GitHubainrm/jrohy-trojan-unauth-poc

Jrohy-trojan-unauth-poc

CVE-2024-55215

查看仓库
2231年前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

Jrohy/trojan 未授权修改管理员密码

Jrohy/trojan 是一个基于 Go 开发的自动化部署 trojan 服务的开源项目,其 web 端初始化接口 /auth/register 在用户配置后未能正常关闭,导致未经授权的访问者可以直接修改管理员密码

项目地址:

  • https://github.com/Jrohy/trojan

影响版本:

  • v2.0.0 - v2.15.3

漏洞原理

注册路由,使用 updateUser 函数处理/auth/register请求

root@kitploit:~
// https://github.com/Jrohy/trojan/tree/v2.15.3/web/auth.go#L155

func Auth(r *gin.Engine, timeout int) *jwt.GinJWTMiddleware {
	jwtInit(timeout)

	newInstall := gin.H{"code": 201, "message": "No administrator account found inside the database", "data": nil}
	r.NoRoute(authMiddleware.MiddlewareFunc(), func(c *gin.Context) {
		claims := jwt.ExtractClaims(c)
		fmt.Printf("NoRoute claims: %#v\n", claims)
		c.JSON(404, gin.H{"code": 404, "message": "Page not found"})
	})
	...
	r.POST("/auth/register", updateUser)

从请求中提取password,传入SetValue

root@kitploit:~
// https://github.com/Jrohy/trojan/tree/v2.15.3/web/auth.go#L113

func updateUser(c *gin.Context) {
	responseBody := controller.ResponseBody{Msg: "success"}
	defer controller.TimeCost(time.Now(), &responseBody)
	username := c.DefaultPostForm("username", "admin")
	pass := c.PostForm("password")
	err := core.SetValue(fmt.Sprintf("%s_pass", username), pass)
	if err != nil {
		responseBody.Msg = err.Error()
	}
	c.JSON(200, responseBody)
}

更新数据库,写入新密码

root@kitploit:~
// https://github.com/Jrohy/trojan/tree/v2.15.3/core/leveldb.go#L30

func SetValue(key string, value string) error {
	db, err := leveldb.OpenFile(dbPath, nil)
	if err != nil {
		return err
	}
	defer db.Close()
	return db.Put([]byte(key), []byte(value), nil)
}

漏洞证明

20241127170540

下载工具