gRPC-Web अनुरोधों में Content-Type: application/grpc-web-text का उपयोग करता है जो बेस64 एन्कोडेड फॉर्म में protobuf की तरह है, आप gprc-coder टूल का उपयोग कर सकते हैं, और आप इसका Burp Suite Extension भी इंस्टॉल कर सकते हैं।
जब आप एक अन्तर्गत संदेश को डिकोड करते हैं, तो आप उसमें विभिन्न प्रकार की जानकारी प्राप्त कर सकते हैं जैसे कि उपयोगकर्ता नाम, पासवर्ड, या अन्य संदेश। एक बार जब आपने संदेश को सफलतापूर्वक डिकोड कर लिया है, तो आप उसमें जानकारी को संशोधित कर सकते हैं और उसे फिर से कोड करके भेज सकते हैं। इस तरह, आप अनुप्रयोगों या सिस्टमों में संदेशों को संशोधित करने और उन्हें प्रभावी ढंग से उपयोग करने की क्षमता प्राप्त कर सकते हैं।
आप gRPC-वेब पेंटेस्ट सुइट में gRPC-वेब कोडर बर्प सुइट एक्सटेंशन का उपयोग कर सकते हैं जो आसान है। आप इसके रेपो में स्थापना और उपयोग निर्देश पढ़ सकते हैं।
जीआरपीसी-वेब जावास्क्रिप्ट फ़ाइलों का विश्लेषण
हर gRPC-वेब एप्लिकेशन में कम से कम एक जावास्क्रिप्ट फ़ाइल होती है। आप नए संदेश, एंडपॉइंट और सेवाएं खोजने के लिए फ़ाइल का विश्लेषण कर सकते हैं। gRPC-स्कैन टूल का उपयोग करने की कोशिश करें।
जावास्क्रिप्ट gRPC-वेब फ़ाइल डाउनलोड करें
grpc-scan.py के साथ स्कैन करें:
python3grpc-scan.py--filemain.js
आउटपुट का विश्लेषण करें और नए एंडप्वाइंट्स और नई सेवाओं का परीक्षण करें:
Output:
Found Endpoints:
/grpc.gateway.testing.EchoService/Echo
/grpc.gateway.testing.EchoService/EchoAbort
/grpc.gateway.testing.EchoService/NoOp
/grpc.gateway.testing.EchoService/ServerStreamingEcho
/grpc.gateway.testing.EchoService/ServerStreamingEchoAbort
Found Messages:
grpc.gateway.testing.EchoRequest:
+------------+--------------------+--------------+
| Field Name | Field Type | Field Number |
+============+====================+==============+
| Message | Proto3StringField | 1 |
+------------+--------------------+--------------+
| Name | Proto3StringField | 2 |
+------------+--------------------+--------------+
| Age | Proto3IntField | 3 |
+------------+--------------------+--------------+
| IsAdmin | Proto3BooleanField | 4 |
+------------+--------------------+--------------+
| Weight | Proto3FloatField | 5 |
+------------+--------------------+--------------+
| Test | Proto3StringField | 6 |
+------------+--------------------+--------------+
| Test2 | Proto3StringField | 7 |
+------------+--------------------+--------------+
| Test3 | Proto3StringField | 16 |
+------------+--------------------+--------------+
| Test4 | Proto3StringField | 20 |
+------------+--------------------+--------------+
grpc.gateway.testing.EchoResponse:
+--------------+--------------------+--------------+
| Field Name | Field Type | Field Number |
+==============+====================+==============+
| Message | Proto3StringField | 1 |
+--------------+--------------------+--------------+
| Name | Proto3StringField | 2 |
+--------------+--------------------+--------------+
| Age | Proto3IntField | 3 |
+--------------+--------------------+--------------+
| IsAdmin | Proto3BooleanField | 4 |
+--------------+--------------------+--------------+
| Weight | Proto3FloatField | 5 |
+--------------+--------------------+--------------+
| Test | Proto3StringField | 6 |
+--------------+--------------------+--------------+
| Test2 | Proto3StringField | 7 |
+--------------+--------------------+--------------+
| Test3 | Proto3StringField | 16 |
+--------------+--------------------+--------------+
| Test4 | Proto3StringField | 20 |
+--------------+--------------------+--------------+
| MessageCount | Proto3IntField | 8 |
+--------------+--------------------+--------------+
grpc.gateway.testing.ServerStreamingEchoRequest:
+-----------------+-------------------+--------------+
| Field Name | Field Type | Field Number |
+=================+===================+==============+
| Message | Proto3StringField | 1 |
+-----------------+-------------------+--------------+
| MessageCount | Proto3IntField | 2 |
+-----------------+-------------------+--------------+
| MessageInterval | Proto3IntField | 3 |
+-----------------+-------------------+--------------+
grpc.gateway.testing.ServerStreamingEchoResponse:
+------------+-------------------+--------------+
| Field Name | Field Type | Field Number |
+============+===================+==============+
| Message | Proto3StringField | 1 |
+------------+-------------------+--------------+
grpc.gateway.testing.ClientStreamingEchoRequest:
+------------+-------------------+--------------+
| Field Name | Field Type | Field Number |
+============+===================+==============+
| Message | Proto3StringField | 1 |
+------------+-------------------+--------------+
grpc.gateway.testing.ClientStreamingEchoResponse:
+--------------+----------------+--------------+
| Field Name | Field Type | Field Number |
+==============+================+==============+
| MessageCount | Proto3IntField | 1 |
+--------------+----------------+--------------+