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

The problem of deserializing AES\3DES in Viewstate #122

Open
wpf97 opened this issue Jul 14, 2022 · 3 comments · May be fixed by #170
Open

The problem of deserializing AES\3DES in Viewstate #122

wpf97 opened this issue Jul 14, 2022 · 3 comments · May be fixed by #170

Comments

@wpf97
Copy link

wpf97 commented Jul 14, 2022

Hello!

Viewstate, generate a payload encrypted as AES and 3DES, and the test cannot be deserialized. The query data is (if the signature algorithm is aes/3des, no matter whether the encryption function is enabled or not, we just need to sign the data first, encrypt it again, and then sign it again as mentioned earlier. Then send it to the server, asp.net enters getdecodeddata(), and then encryptordecryptdata() first for verification and decryption, and then verify it again after coming out.), How to solve this problem? There are also lower versions of V2 Net2.0viewstate deserialization how should I use the chain?

Attempted code

ysoserial. exe -p ViewState -g TextFormattingRunProperties -c "echo 123 > c:\windows\temp\test.txt" --path="/hello.aspx" --apppath="/" --decryptionalg="AES" --decryptionkey="xxxxxxxxxx" --validationalg="AES" --validationkey="xxxxxxxxxx"

ysoserial. exe -p ViewState -g TextFormattingRunProperties -c "echo 123 > c:\windows\temp\test.txt" --path="/hello.aspx" --apppath="/" --decryptionalg="AES" --decryptionkey="xxxxxxxxxx" --validationalg="3DES" --validationkey="xxxxxxxxxx"

@irsdl
Copy link
Collaborator

irsdl commented Aug 16, 2022

I am not sure whether I have understood what you are going to achieve here. The validation algorithm should use a hashing algorithm rather than an encryption one. Therefore AES/3DES cannot be used for this purpose.

@meme-lord
Copy link

@irsdl they're mentioned in MS documentation as validation algorithms here: https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/hh831711(v=ws.11)
Whether it actually works as a validation algorithm is another question

@irsdl
Copy link
Collaborator

irsdl commented Jan 8, 2024

Thanks, I will have a look. It sounds like you are right. I need to see how it's been implemented to get them in here.

@hexcat hexcat linked a pull request Sep 16, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants