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

Hangs when encountering a page with a JavaScript alert box #260

Open
lappsec opened this issue Oct 28, 2024 · 1 comment
Open

Hangs when encountering a page with a JavaScript alert box #260

lappsec opened this issue Oct 28, 2024 · 1 comment

Comments

@lappsec
Copy link

lappsec commented Oct 28, 2024

Describe the bug
When Gowitness attempts to screenshot a page that pops up a JS alert box it hangs indefinitely. There are no errors (when using the debug flag) but the scan will never complete and has to be forcefully ended.

To Reproduce
I have encountered this on live systems but reproduced it on a local server, so the example domain in my screenshots will not work but you can set up your own and test.

  1. On your web server, set up index.html to pop an alert box. For example: <script>alert('Yo')</script>
  2. Run a normal scan: gowitness scan single -u --screenshot-path /tmp/test -D
  3. It will hang and you'll have to Ctrl-C the SOB.
  4. Remove the alert from the html and try again, it will work fine.

Expected behavior
I'd expect a screenshot or, at the very least, for the timeout to kick in and skip that host. I did try messing with the timeout flag too but it didn't make a difference.

Screenshots
The screenshots show the page displaying the alert box in the browser and then running gowitness twice. The first time the JS alert box is present on the page and gowitness has to be stopped. The second run is after it was removed and no JS was on the page.

Screenshot 2024-10-28 092800
Screenshot 2024-10-28 093742

Version Information:

  • OS: Ubuntu 20.04.5 LTS
  • gowitness: 3.0.4
  • Chromium: 130.0.6723.58 snap
@leonjza
Copy link
Member

leonjza commented Oct 28, 2024

Thanks for the report. That behaviour implies that the alert box handling is not working as expected for chromedp here, and probably for gorod here too then.

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

No branches or pull requests

2 participants