People often ask me "How did you learn how to hack?" The answer: by reading. This page is a collection of the blog posts and other articles that I have accumulated over the years of my journey. Enjoy!
authorizedTypes list, which is found in the web.config file for ASP.net. Alongside this allowlist, are a specific list of denied types from allowed namespaces that are known to be dangerous, such as the System.Workflow.ComponentModel.Compiler option. The post is finding a way to circumvent this allowlist and denylist. Compile() function is offered by the WorkflowCompiler for building applications, based on specific parameters. But, this allowed namespace is heavily locked down via the denylist for the types that can be used within it. Since denylists are hard to get right, is there a way around this? WorkflowCompiler functionality is implemented within WorkflowCompilerInternal. The WorkflowCompilerInternal code does not have the same denylist as the other one and is implicitly allowed via another option in the list. This means that we can access the bulk of the WorkflowCompiler functionality through the internal version!Compile operation can be directly called via the WorkflowCompilerInternal function. Using this function, code can be compiled without the specific restrictions, allowing for arbitrary code to be ran without a workflow on the server. The full POC and walkthrough of the exploit are in the article.