
हल्का macOS मैलवेयर विश्लेषण सैंडबॉक्स जो OpenBSM या Monitor.app के माध्यम से सिस्टम गतिविधि की निगरानी करता है, फ़ाइल, प्रक्रिया और नेटवर्क घटनाओं की विस्तृत रिपोर्ट और समयरेखा तैयार करता है।
"Norimaci" macOS के लिए एक सरल और हल्का मैलवेयर विश्लेषण सैंडबॉक्स है। यह उपकरण "Noriben" से प्रेरित था। Norimaci, Sysinternals Process Monitor (procmon) के बजाय macOS सिस्टम गतिविधि की निगरानी के लिए OpenBSM या Monitor.app की सुविधाओं का उपयोग करता है।
Norimaci में 3 Python स्क्रिप्ट शामिल हैं।
OpenBSM macOS पर गतिविधियों का ऑडिट करने के लिए एक ढांचा है। कृपया विवरण के लिए उनकी वेबसाइट देखें।
Monitor.app FireEye द्वारा बनाया गया एक मुफ्त उपकरण है। कृपया विवरण के लिए उनकी वेबसाइट देखें।
मेरे पूर्व सहकर्मी (@cci_forensics) ने यह नाम सुझाया।
"Norimaci" एक गढ़ा हुआ शब्द है जो "Noriben" और "Macintosh" को मिलाकर बना है। इसका उच्चारण "Norimaki" है, और यह जापानी में "のり巻き" को दर्शाता है। अंग्रेजी में इसका अर्थ "sushi roll" है।
Noriben एक जापानी शैली का लंच बॉक्स है जिसमें न्यूनतम सामग्री होती है। नोरिमाकी की सामग्री नोरिबेन के समान होती है (समुद्री शैवाल, चावल, और आपकी पसंद की अन्य चीजें)।
इसलिए, मैंने इस उपकरण का नाम "Norimaci" रखने का फैसला किया।
ध्यान दें कि Monitor.app केवल macOS 10.12 - 10.14 का समर्थन करता है। यदि आप macOS 10.15 या उसके बाद के संस्करण पर मैलवेयर निष्पादित करना चाहते हैं, तो आपको इसे स्थापित करने की आवश्यकता नहीं है। इसके बजाय आपको OpenBSM का उपयोग करना होगा।
यदि आप Monitor.app के साथ Norimaci का उपयोग करते हैं, तो आपको नीचे दिए गए पुस्तकालयों को उनके स्रोत भंडार या pip से स्थापित करना होगा।
मैलवेयर नमूनों को निष्पादित करने के लिए आपको एक macOS VM बनाना होगा। इसके अलावा, नकली इंटरनेट कनेक्शन के लिए एक और VM बनाने की अत्यधिक अनुशंसा की जाती है। क्योंकि, कई मैलवेयर अपने सर्वर (जैसे C2 सर्वर) से कनेक्ट करने का प्रयास करते हैं।
PolarProxy और INetSim नकली HTTP/HTTPS और DNS सेवाएं प्रदान करने के लिए बहुत उपयोगी उपकरण हैं। कृपया नकली इंटरनेट बनाने के लिए NETRESEC ब्लॉग देखें।
यदि आप सिस्टम गतिविधियों की निगरानी के लिए OpenBSM का उपयोग करते हैं, तो आपको /etc/security/audit_control फ़ाइल को नीचे दिए अनुसार संशोधित करना होगा। क्योंकि, OpenBSM डिफ़ॉल्ट रूप से केवल लॉगिन और प्रमाणीकरण के बारे में ऑडिट लॉग रिकॉर्ड करता है। लेकिन, Norimaci को विभिन्न प्रकार के ऑडिट लॉग (फ़ाइल निर्माण, फ़ाइल विलोपन, प्रक्रिया निष्पादन, नेटवर्किंग, आदि) की आवश्यकता होती है।
सेटिंग लागू करने के लिए संशोधन के बाद कंप्यूटर को पुनः प्रारंभ करना होगा।
#
# $P4: //depot/projects/trustedbsd/openbsm/etc/audit_control#8 $
#
dir:/var/audit
flags:lo,aa,fc,fd,pc,nt,ex <- edit here like this
minfree:5
naflags:lo,aa,fc,fd,pc,nt,ex <- edit here like this
policy:cnt,argv
filesz:2M
expire-after:10M
superuser-set-sflags-mask:has_authenticated,has_console_access
superuser-clear-sflags-mask:has_authenticated,has_console_access
member-set-sflags-mask:
member-clear-sflags-mask:has_authenticated
$ sudo python3 ./norimaci.py -m openbsm -o ./out/
Password:
--===[ Norimaci v0.1.0
--===[ Minoru Kobayashi [@unkn0wnbit]
[*] Launching OpenBSM agent...
[*] When runtime is complete, press CTRL+C to stop logging.
^C
[*] Termination of OpenBSM agent commencing... please wait
[*] Converting OpenBSM data ...
[*] Loading converted macOS activity data ...
[*] Saving report to: /Users/macforensics/tools/norimaci/out/Norimaci_14_Jan_20__15_55_093219.txt
[*] Saving timeline to: /Users/macforensics/tools/norimaci/out/Norimaci_14_Jan_20__15_55_093219_timeline.csv
नोट: Monitor.app macOS 10.15 पर नहीं चल सकता। लेकिन, यह macOS 10.14 या उससे पहले के संस्करणों पर ठीक काम करता है।
$ python3 ./norimaci.py -h
--===[ Norimaci v0.1.0
--===[ Minoru Kobayashi [@unkn0wnbit]
usage: norimaci.py [-h] [-m MONITOR] [-j JSON] [-bl OPENBSM_LOG] [-p PROCLIST]
[-ml MONITORAPP_LOG] [-o OUTPUT] [--force] [--debug]
Light weight sandbox which works with OpenBSM or Fireeye's Monitor.app
optional arguments:
-h, --help show this help message and exit
-m MONITOR, --monitor MONITOR
Specify a program to monitor macOS activity. You can
choose 'openbsm' or 'monitorapp'.
-j JSON, --json JSON Path to a JSON file which is converted by
'openbsmconv.py' or 'monitorappconv.py'.
-bl OPENBSM_LOG, --openbsm-log OPENBSM_LOG
Path to an OpenBSM log file.
-p PROCLIST, --proclist PROCLIST
Path to a process list file to process OpenBSM log
file. A file which has ".proclist" extnsion would be
used, if this option is not specified.
-ml MONITORAPP_LOG, --monitorapp-log MONITORAPP_LOG
Path to a Monitor.app data file.
-o OUTPUT, --output OUTPUT
Path to an output directory.
--force Enable to overwrite output files.
--debug Enable debug mode.
$ python3 ./openbsmconv.py -h
usage: openbsmconv.py [-h] [-f FILE] [-p PROCLIST] [-o OUT] [-c] [-rp]
[--with-failure] [--with-failure-socket] [--force]
[--debug]
Converts OpenBSM log file to JSON format.
optional arguments:
-h, --help show this help message and exit
-f FILE, --file FILE Path to a bsm log file
-p PROCLIST, --proclist PROCLIST
Path to a process list file
-o OUT, --out OUT Path to an output file
-c, --console Output JSON data to stdout.
-rp, --use-running-proclist
Use current running process list instead of a existing
process list file. And, the process list is saved to a
file which places in the same directory of '--file' or
to a file which specified '--proclist'.
--with-failure Output records which has a failure status too.
--with-failure-socket
Output records which has a failure status too (related
socket() syscall only).
--force Enable to overwrite an existing output file.
--debug Enable debug mode.
$ python3 ./monitorappconv.py -h
usage: monitorappconv.py [-h] [-f FILE] [-o OUT] [-c] [--force] [--debug]
Parses data of Fireeye Monitor.app and converts it to JSON format. Please note
that strings in JSON data are saved as UTF-8.
optional arguments:
-h, --help show this help message and exit
-f FILE, --file FILE Path to a saved data of Monitor.app.
-o OUT, --out OUT Path to an output file.
-c, --console Output JSON data to stdout.
--force Enable to overwrite an output file.
--debug Enable debug mode.
Norimaci के साथ macOS 10.15 Catalina पर AppleJeus.A का विश्लेषण करें। यह डेमो मूवी Japan Security Analyst Conference 2020 (JSAC2020) के लिए बनाई गई थी।

git clone https://github.com/mnrkbys/norimaci.git