Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] Add run any byte code/dll in deserialization chain #162

Open
Chestnuts4 opened this issue May 18, 2024 · 3 comments
Open

Comments

@Chestnuts4
Copy link

Chestnuts4 commented May 18, 2024

in TextFormattingRunProperties chain, we can run any system command in deserialization vulunraibilitu, but sometime we want to run any byte code or dll in target, so do you think that feature should be added, if you do I would apply PR.

ref:https://russtone.io/2023/05/30/programming-with-xaml/

@irsdl
Copy link
Collaborator

irsdl commented May 18, 2024

Hi, I think this has already been added here: https://github.com/pwntester/ysoserial.net/blob/master/ysoserial/Generators/XamlAssemblyLoadFromFileGenerator.cs

I am personally against having this as a separate gadget but more as a variant or a plugin. However, it is certainly a useful addition to have (you can basically call many functions with this as many do for example to deserialize another payload).

Please let us know if you meant something else other than this existing gadget.

@Chestnuts4
Copy link
Author

Chestnuts4 commented May 19, 2024

I reviewed

https://github.com/pwntester/ysoserial.net/blob/master/ysoserial/Generators/XamlAssemblyLoadFromFileGenerator.cs#L104-L106

but when it call GetType method the <ObjectDataProvider.MethodParameters/> tag is not closed.

I haven't tried using this gadget yet, it just doesn't seem to work, I will try to use this gadget later

@irsdl
Copy link
Collaborator

irsdl commented May 24, 2024

This gadget has been created by the blog post's author you were referring to. If it has any bugs, it would be great to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants