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

Fix Telerik Spellcheck Handler False Positive #2275

Merged
merged 4 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bbot/modules/telerik.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ async def handle_event(self, event):
# The standard behavior for the spellcheck handler without parameters is a 500
if status_code == 500:
# Sometimes webapps will just return 500 for everything, so rule out the false positive
validate_result, _ = await self.test_detector(base_url, self.helpers.rand_string())
validate_result, _ = await self.test_detector(base_url, f"{self.helpers.rand_string()}.axd")
self.debug(validate_result)
validate_status_code = getattr(validate_result, "status_code", 0)
if validate_status_code not in (0, 500):
Expand Down
6 changes: 6 additions & 0 deletions bbot/test/test_step_2/module_tests/test_module_telerik.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ async def setup_before_prep(self, module_test):
respond_args = {"status": 500}
module_test.set_expect_requests(expect_args=expect_args, respond_args=respond_args)

# Simulate SpellCheckHandler false positive detection
expect_args = {"method": "GET", "uri": "/AAAAAAAAAAAAAA.axd"}
respond_args = {"status": 200}
module_test.set_expect_requests(expect_args=expect_args, respond_args=respond_args)

# Simulate DialogHandler detection
expect_args = {"method": "GET", "uri": "/App_Master/Telerik.Web.UI.DialogHandler.aspx"}
respond_args = {
Expand Down Expand Up @@ -64,6 +69,7 @@ async def setup_before_prep(self, module_test):
module_test.set_expect_requests(expect_args=expect_args, respond_args=respond_args)

async def setup_after_prep(self, module_test):
module_test.scan.modules["telerik"].helpers.rand_string = lambda *args, **kwargs: "AAAAAAAAAAAAAA"
module_test.scan.modules["telerik"].telerikVersions = ["2014.2.724", "2014.3.1024", "2015.1.204"]
module_test.scan.modules["telerik"].DialogHandlerUrls = [
"Admin/ServerSide/Telerik.Web.UI.DialogHandler.aspx",
Expand Down
Loading