Comments (5)
The viewstate that is failing is probably encrypted. Using a test website configured for AES with an explicit key, I got viewstate of "fJpcff0hiVevQIysiaIKgkx2dnueLNYQKHvN+8Da9mpyY/IsL6xhIen3niz0KDUiJ3ztn6ejt8rum6jZysGCJmRo8iZ45u1LT+3lhxGySYpLtQ4m0hP5/WHlMLyT0H2Lk2aCxcxFh6TVDf6+jXbMYXLEgDs=", which gave me the same error, but, once decrypted and skipping the first 32 bytes (randomness to use as a makeshift IV, I guess...), I have "/wEPDwUKMTY1NDU2MTA1Mg8WAh4EVEVTVAUFVkFMVUVkZK3h5yv0mrM9ifh43lDf449iCgYMOaWxxQ==", which processes fine. I had to chop off the last 20 bytes of the encrypted viewstate before decrypting as the signature is appended to the ciphertext.
Supporting encrypted viewstate shouldn't be difficult, as it's a basic CBC with standard crypto algorithms, but would require extra parameters to pass the decryption key and cipher. Since the signature has to be split off before decryption and thus also before parsing, the current process of parsing to the end of the statebag and whatever remains is the signature wouldn't work, so the signature format would need to be explicitly specified as well.
I ought to be able to cook up a pullrequest for this.
from viewstate.
Enums to define the decryption and validation modes would seem to be in order... Would it be ok to have them in viewstate.py, or should they be a separate file as was requested for the color table in PullRequest#12?
from viewstate.
@rpimonitrbtch thanks for taking the lead on this! It would be a much appreciated feature to have. Please go ahead with whatever you feel would be right for the codebase, then we can review and see if any changes are needed.
from viewstate.
@rpimonitrbtch Also please note I did some codebase cleanup today and released v0.5.2
so make sure you rebase your branch onto that.
from viewstate.
I also have the same problem, even I use the updated code @rpimonitrbtch @yuvadm
from viewstate.
Related Issues (15)
- "NameError: name 'path' is not defined" when installing HOT 2
- Issue with decoding the following viewstate HOT 6
- Optional decoded structure flattening
- Support MAC values
- Support datetime parsing HOT 1
- Support color parsing HOT 2
- Python 2.7.x compatibility? HOT 2
- Add sphinx documentation
- Re-encoding viewstate HOT 1
- YSOSerial.net Payloads could not be processed HOT 1
- unhashable type: 'list' HOT 1
- Unknown marker 12
- IndexError when decoding (old?) viewstate
- Dectect when mac not enabled HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from viewstate.