Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reverse-engineer a private RESTful API?

Is there a way to reverse-engineer a private RESTful API?

Say, I have a website that uses this API, and I was able to figure out some access point urls of the API. Now, for those urls I need to figure out which JSON payload it will except. Is there a methodical way to do this?

like image 475
Nikolay Derkach Avatar asked Nov 11 '13 14:11

Nikolay Derkach


People also ask

What is reverse engineering an API?

Reverse engineering, also called back engineering, is the process by which a man-made object is deconstructed to reveal its designs, architecture, or to extract knowledge from the object. Knowing how an API actually behaves enables you to identify flaws and security vulnerabilities like accidental data leakage.

Is reverse engineering an API legal?

Is reverse engineering API illegal? Yes, it is illegal; until it is public & the author has no issue with you if you run reverse engineering on their API.

Do hackers use reverse engineering?

Hackers often use reverse engineering to find vulnerabilities in systems and devices. In many cases, hackers will obtain a copy of the software or hardware they want to attack. They will disassemble it, looking for ways to bypass security features or exploit weaknesses.

How do I reverse engineer API with Postman?

Find the request that you would like to import into Postman. Select it, right click, and then select Copy as cURL. In the Postman app, click the Import button in the top left, and tab over to Paste Raw Text. Paste your cURL request here, and confirm the import.


2 Answers

I would look into HTTP Toolkit. It's a great tool that logs network requests including URLs, headers, body, and more. HTTP Toolkit can be used to view requests coming from a browser, terminal, JVM, Android device, etc. It's open source and works on Mac, Linux, and Windows. HTTP Toolkit sources HTTP Toolkit request

like image 56
Noah Broyles Avatar answered Oct 04 '22 08:10

Noah Broyles


For future reference, some applications to do so are:

  • Wireshark (as suggested by @rekire)
  • proxy application such as BURP Suite. Have a look at this tutorial for using BURP with Mac.

Download, if available, an existing client/mobile app for the API you are about to investigate and look at the data the application sends and retrieves.

like image 28
maggix Avatar answered Oct 04 '22 07:10

maggix