InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/

Follow publication

Taking your web application pentesting to another level

bob van der staak
InfoSec Write-ups
Published in
8 min readAug 13, 2023

Introduction

What are BCheck Scripts?

Benefits of BCheck Scripting

How to start writing your first .bcheck script

The Host-Level Bcode explained

metadata:
language: v1-beta
name: "SAP authentication bypass check"
description: "Tests for Sap authentication bypass SAP Note 2258786 Checking if the public
endpoint of sap/admin/public is accessible which would leak the patch management and internal urls"

author: "Bob van der Staak"
tags: "SAP", "Authentication Bypass"

run for each:
potential_path =
"/sap/admin/public/index.html"


given host then
send request called check:
method: "GET"
path: {potential_path}

if "Administration" in {check.response.body} and {check.response.status_code} is "200" then
report issue:
severity: medium
confidence: certain
detail: `Sap information leaking found at the following path {potential_path}.`
remediation: "Follow the actions which are required in SAP Note 2258786"
end if
run for each:
potential_path =
"/sap/admin/public/index.html"

given host then
send request called check:
method: "GET"
path: {potential_path}
if "Administration" in {check.response.body} and {check.response.status_code} is "200" then
report issue:
severity: medium
confidence: certain
detail: `Sap information leaking found at the following path {potential_path}.`
remediation: "Follow the actions which are required in SAP Note 2258786"
end if

Other options explained

given [response|request|host] | [ [any|query|header|body|cookie]* + insertion point] then

Setup Burp Scanner to test .bcheck scripts

Run an audit scan to trigger your .bcheck script

Importing other Bchecks

What is still missing

Conclusion

Published in InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/

Written by bob van der staak

An enthousiastic ethical hacker and security researcher

No responses yet

Write a response