
JMX गणना और हमला उपकरण।
beanshooter एक JMX गणना और आक्रमण उपकरण है, जो JMX एंडपॉइंट्स पर सामान्य कमजोरियों की पहचान करने में मदद करता है।
beanshooter एक maven प्रोजेक्ट है और इसकी स्थापना सीधी होनी चाहिए। maven स्थापित होने पर, एक निष्पादन योग्य .jar फ़ाइल बनाने के लिए निम्नलिखित कमांड निष्पादित करें:```console
[qtc@devbox ~]$ git clone https://github.com/qtc-de/beanshooter
[qtc@devbox ~]$ cd beanshooter
[qtc@devbox ~]$ mvn package
आप प्रीबिल्ट पैकेज का भी उपयोग कर सकते हैं जो [प्रत्येक रिलीज़](https://github.com/qtc-de/beanshooter/releases) के लिए बनाए जाते हैं। डेवलपमेंट ब्रांच के लिए प्रीबिल्ट पैकेज स्वचालित रूप से बनाए जाते हैं और *GitHub* [एक्शन पेज](https://github.com/qtc-de/beanshooter/actions) पर पाए जा सकते हैं। साथ ही *beanshooter* चलाने के लिए एक प्रीबिल्ट डॉकर इमेज [उपलब्ध है](#docker-image)।
*beanshooter* में *ysoserial* को निर्भरता के रूप में शामिल नहीं किया गया है। *ysoserial* समर्थन सक्षम करने के लिए, आपको या तो अपनी ``ysoserial.jar`` फ़ाइल का पथ अतिरिक्त तर्क के रूप में निर्दिष्ट करना होगा (उदाहरण के लिए ``--yso /opt/ysoserial.jar``) या प्रोजेक्ट बनाने से पहले [beanshooter कॉन्फ़िगरेशन फ़ाइल](https://github.com/qtc-de/beanshooter/blob/master/beanshooter/config.properties) में डिफ़ॉल्ट पथ बदलना होगा।
*beanshooter* *bash* के लिए स्वतः पूर्णता का समर्थन करता है। स्वतः पूर्णता का लाभ उठाने के लिए, आपके पास [completion-helpers](https://github.com/qtc-de/completion-helpers) प्रोजेक्ट स्थापित होना चाहिए। यदि सही ढंग से सेटअप किया गया है, तो [समापन स्क्रिप्ट](https://github.com/qtc-de/beanshooter/blob/master/resources/bash_completion.d/beanshooter) को अपने ``~/.bash_completion.d`` फ़ोल्डर में कॉपी करने से स्वतः पूर्णता सक्षम हो जाती है।```console
[qtc@devbox ~]$ cp resources/bash_completion.d/beanshooter ~/bash_completion.d/
बीनशूटर के विभिन्न संचालनों को दो समूहों में विभाजित किया जा सकता है: मूल संचालन और MBean संचालन। जबकि मूल संचालन किसी JMX एंडपॉइंट पर सामान्य संचालन करने के लिए उपयोग किए जाते हैं, MBean संचालन एक विशिष्ट MBean को लक्षित करते हैं जिसके साथ बातचीत की जा सके। अधिक जानकारी के लिए, निम्नलिखित अनुभागों में उपयोग उदाहरण देखें।```console [qtc@devbox ~]$ beanshooter -h usage: beanshooter [-h] ...
beanshooter v3.0.0 - a JMX enumeration and attacking tool
positional arguments:
Basic Operations attr set or get MBean attributes brute bruteforce JMX credentials deploy deploys the specified MBean on the JMX server enum enumerate the JMX service for common vulnerabilities info display method and attribute information on an MBean invoke invoke the specified method on the specified MBean list list available MBEans on the remote MBean server serial perform a deserialization attack stager start a stager server to deliver MBeans undeploy undeploys the specified MBEAN from the JMX server
MBean Operations diagnostic Diagnostic Command MBean hotspot HotSpot Diagnostic MBean mlet default JMX bean that can be used to load additional beans dynamically recorder jfr Flight Recorder MBean tomcat tomcat MemoryUserDatabaseMBean used for user management tonka general purpose bean for executing commands and uploading or download files
named arguments: -h, --help show this help message and exit
### मूल संचालन
---
मूल संचालन सामान्य प्रयोजन संचालन हैं जो JMX सेवा पर किए जा सकते हैं। ये आमतौर पर ऐसे संचालन होते हैं जो किसी विशिष्ट MBean को लक्ष्य नहीं करते या जो ऐसे MBean को लक्ष्य करते हैं जिसमें beanshooter द्वारा कोई अंतर्निहित समर्थन नहीं है।
#### Attr
`attr` कार्रवाई का उपयोग किसी निर्दिष्ट *MBean* पर गुणों को प्राप्त करने या सेट करने के लिए किया जा सकता है। उपलब्ध गुणों को प्राप्त करने के लिए, `info` कार्रवाई का उपयोग किया जाना चाहिए:```console
[qtc@devbox ~]$ beanshooter info 172.17.0.2 9010
...
[+] MBean Class: sun.management.MemoryImpl
[+] ObjectName: java.lang:type=Memory
[+]
[+] Attributes:
[+] Verbose (type: boolean , writable: true)
[+] ObjectPendingFinalizationCount (type: int , writable: false)
[+] HeapMemoryUsage (type: javax.management.openmbean.CompositeData , writable: false)
[+] NonHeapMemoryUsage (type: javax.management.openmbean.CompositeData , writable: false)
[+] ObjectName (type: javax.management.ObjectName , writable: false)
[+]
[+] Operations:
[+] void gc()
जब केवल विशेषता नाम निर्दिष्ट किया जाता है, beanshooter वर्तमान विशेषता मान प्राप्त करता है और प्रदर्शित करता है:```console [qtc@devbox ~]$ beanshooter attr 172.17.0.2 9010 java.lang:type=Memory Verbose false
जब कोई अतिरिक्त मान निर्दिष्ट किया जाता है, *beanshooter* संबंधित विशेषता सेट करने का प्रयास करता है। उन विशेषताओं के लिए जिनका प्रकार *String* से भिन्न है, `--type` विकल्प का उपयोग करके विशेषता प्रकार निर्दिष्ट करना आवश्यक है:```console
[qtc@devbox ~]$ beanshooter attr 172.17.0.2 9010 java.lang:type=Memory Verbose true --type boolean
[qtc@devbox ~]$ beanshooter attr 172.17.0.2 9010 java.lang:type=Memory Verbose
true