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

form action urls not followed? #424

Open
dkegel-fastly opened this issue Nov 24, 2022 · 1 comment
Open

form action urls not followed? #424

dkegel-fastly opened this issue Nov 24, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@dkegel-fastly
Copy link
Contributor

dkegel-fastly commented Nov 24, 2022

Describe the bug

Given the page http://localhost containing

<form action="/xss.php">
  <input type="text" id="xss" name="xss"><br>
  <input type="submit" value="Submit">
  </ul>
</form>

the command

dalfox url http://localhost

fetches from

http://localhost/?xss=DalFox

when it should fetch from

http://localhost/app.php?xss=DalFox

It seems ParameterAnalysis() is ignoring the url part of the form action? See

doc.Find("form").Each(func(i int, s *goquery.Selection) {

doc.Find("form").Each(func(i int, s *goquery.Selection) {
        action, _ := s.Attr("action")
        if strings.HasPrefix(action, "/") || strings.HasPrefix(action, "?") { // assuming this is a relative URL
                url, _ := url.Parse(action)
                query := url.Query()
                for aParam := range query { 
                        p, dp = setP(p, dp, aParam, options)
                        count = count + 1
                }                                  
        }       
})      

Environment

  • Dalfox Version: c344c58
  • Installed from: github clone
@dkegel-fastly dkegel-fastly added the bug Something isn't working label Nov 24, 2022
@dkegel-fastly
Copy link
Contributor Author

Is the intent to delegate all crawling to some external tool like katana?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant