Skip to content

Instantly share code, notes, and snippets.

@jsyeo
Created September 2, 2015 10:01
Show Gist options
  • Save jsyeo/b6e8e84ab3980f04d3db to your computer and use it in GitHub Desktop.
Save jsyeo/b6e8e84ab3980f04d3db to your computer and use it in GitHub Desktop.
Subclassing a Class that Subclasses Thread
public class Main {
public static void main(String argv[]) {
A a = new B();
a.start();
}
static void vulnerableMethod() {
System.out.println("ur powned");
}
}
class A extends Thread {
}
class B extends A {
public void run() {
Main.vulnerableMethod();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment