Penetration Testing with Kali Linux
PWK - Copyright © 2023 OffSec Services Limited. All rights reserved.
231
These kind of programming mistakes happen to various degrees when building web applications
that rely on custom APIs, often due to lack of testing and secure coding best practices.
So far we have relied on curl to manually assess the target’s API so that we could get a better
sense of the entire traffic flow.
This
approach, however, will not properly scale whenever
the number of APIs becomes
significant. Luckily, we can recreate all the above steps from within Burp.
As an example, let’s replicate the latest admin login attempt and send it to the proxy by appending
the
–proxy 127.0.0.1:8080
to the command . Once done, from Burp’s
Repeater
tab, we can create
a new empty request and fill it with the same data as we did previously.
Figure 108: Crafting a POST request in Burp for API testing
Next, we’ll click on the
Send
button and verify the incoming response on the right pane.
Penetration Testing with Kali Linux
PWK - Copyright © 2023 OffSec Services Limited. All rights reserved.
232
Figure 109: Inspecting the API response value
Great! We were able to recreate the
same behavior within our proxy, which, among other
advantages, enables us to store any tested APIs in its database for later investigation.
Once we’ve tested a number of different APIs, we could navigate to the
Yüklə
Dostları ilə paylaş: