{"id":1871,"date":"2021-11-17T16:01:31","date_gmt":"2021-11-17T13:01:31","guid":{"rendered":"https:\/\/macrosec.tech\/?p=1871"},"modified":"2022-04-26T14:55:16","modified_gmt":"2022-04-26T11:55:16","slug":"using-elastalert-to-alert-via-email-when-mimikatz-is-run","status":"publish","type":"post","link":"https:\/\/macrosec.tech\/index.php\/2021\/11\/17\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\/","title":{"rendered":"Using Elastalert to alert via email when Mimikatz is run."},"content":{"rendered":"<p><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-1 fusion-parallax-none nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-padding-right:50px;--awb-padding-left:50px;--awb-background-color:#686868;--awb-background-image:url(&quot;https:\/\/macrosec.tech\/wp-content\/uploads\/2020\/01\/85204.jpg&quot;);--awb-background-size:cover;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-0 fusion_builder_column_1_1 1_1 fusion-one-full fusion-column-first fusion-column-last\" style=\"--awb-padding-top:0%;--awb-padding-right:0%;--awb-padding-bottom:0%;--awb-padding-left:0%;--awb-bg-size:cover;--awb-margin-top:10px;--awb-margin-bottom:10px;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-column-wrapper-legacy\"><div class=\"fusion-column-content-centered\"><div class=\"fusion-column-content\"><div class=\"fusion-text fusion-text-1\"><h2 style=\"text-align: center; font-size: 40px;\"><strong><span style=\"text-decoration: underline;\">USING ELASTALERT TO ALERT VIA EMAIL WHEN MIMIKATZ IS RUN.<\/span><\/strong><\/h2>\n<\/div><div class=\"fusion-image-element fusion-image-align-center in-legacy-container\" style=\"text-align:center;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><div class=\"imageframe-align-center\"><span class=\" fusion-imageframe imageframe-none imageframe-1 hover-type-none\"><img decoding=\"async\" width=\"400\" height=\"400\" alt=\"Haystack - Hack The Box Machine\" title=\"Mimikatz-Alert\" src=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/Mimikatz-Alert.png\" class=\"img-responsive wp-image-1907\" srcset=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/Mimikatz-Alert-200x200.png 200w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/Mimikatz-Alert.png 400w\" sizes=\"(max-width: 800px) 100vw, 400px\" \/><\/span><\/div><\/div><\/div><\/div><div class=\"fusion-clearfix\"><\/div><\/div><\/div><\/div><\/div><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-2 nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-padding-top:30px;--awb-padding-right:50px;--awb-padding-left:50px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-1 fusion_builder_column_1_1 1_1 fusion-one-full fusion-column-first fusion-column-last\" style=\"--awb-bg-size:cover;--awb-margin-top:10px;--awb-margin-bottom:10px;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-column-wrapper-legacy\"><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-separator fusion-no-large-visibility fusion-full-width-sep\" style=\"margin-left: auto;margin-right: auto;margin-top:15px;margin-bottom:15px;width:100%;\"><\/div><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-text fusion-text-2\"><p style=\"font-size: 18px;\">This blog post was written by <a href=\"https:\/\/www.linkedin.com\/in\/dharmik-karania-160239b5\/\">Dharmik Karania <\/a><\/p>\n<\/div><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-separator fusion-clearfix\" style=\"float:left;margin-top:15px;margin-bottom:15px;width:100%;max-width:35%;\"><div class=\"fusion-separator-border sep-single sep-solid\" style=\"--awb-height:20px;--awb-amount:20px;--awb-sep-color:#b51616;border-color:#b51616;border-top-width:1px;\"><\/div><\/div><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-text fusion-text-3\"><h2 style=\"font-size: 24px; color: #b51616; text-align: left;\"><strong>Introduction<\/strong><\/h2>\n<p style=\"font-size: 20px;\">In this blog, I shall discuss how an alert can be sent via email when Mimikatz is run.<\/p>\n<p style=\"font-size: 20px;\">Mimikatz is a post-exploitation tool that is used to dump passwords from memory, along with hashes. This allows attackers to conduct various other attacks such as lateral movement more easily. When an attacker gains an initial foothold to a machine, they may run Mimikatz in order to retrieve passwords or passwords hashes. As blue teamers, it is crucial to setup mechanisms to detect attacks and take appropriate measures to safeguard information systems.<\/p>\n<h2 style=\"font-size: 24px; color: #b51616; text-align: left;\"><strong>Prerequisites:<\/strong><\/h2>\n<ol style=\"font-size: 20px;\">\n<li>ELK Setup<\/li>\n<li>Configure winlogbeat on Windows Machine<\/li>\n<\/ol>\n<h2 style=\"font-size: 24px; color: #b51616; text-align: left;\"><strong>Introduction to ELK<\/strong><\/h2>\n<p style=\"font-size: 20px;\">According to Elastic, &#8220;ELK&#8221; is the acronym for three open-source projects: Elasticsearch, Logstash, and Kibana. Elasticsearch is a search and analytics engine. Logstash is a server side data processing pipeline that ingests data from multiple sources simultaneously, transforms it, and then sends it to a &#8220;stash&#8221; like Elasticsearch. Kibana lets users visualize data with charts and graphs in Elasticsearch.<\/p>\n<p style=\"font-size: 20px;\">To setup ELK, you can either use the GitHub repository or setup manually. I have setup my stack manually. Once the ELK stack has been installed successfully, the next step is to install Elastalert.<\/p>\n<p style=\"font-size: 20px;\">To install and setup Elastalert, I shall run the following commands on the terminal window.<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">sudo apt-get install -y python<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">sudo apt-get install -y python-pip python-dev libffi-dev libssl-dev<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">git clone https:\/\/github.com\/Yelp\/elastalert.git<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">cd elastalert<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">sudo pip install &#8220;setuptools&gt;=11.3&#8221;<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">sudo pip install pyOpenSSL<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">sudo python setup.py install<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">sudo pip install &#8220;elasticsearch&gt;=5.0.0&#8221;<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">cp config.example.yaml config.yaml<\/p>\n<p style=\"font-size: 20px;\">The config.yaml file needs to be edited in order to update the es_host with the IP address of the elasticsearch server.<\/p>\n<\/div><div class=\"fusion-image-element fusion-image-align-center in-legacy-container\" style=\"text-align:center;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><div class=\"imageframe-align-center\"><span class=\" fusion-imageframe imageframe-none imageframe-2 hover-type-none\" style=\"border:5px solid #e2e0e0;\"><img decoding=\"async\" width=\"751\" height=\"491\" title=\"1\" src=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/1.png\" alt class=\"img-responsive wp-image-1879\" srcset=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/1-200x131.png 200w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/1-400x262.png 400w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/1-600x392.png 600w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/1.png 751w\" sizes=\"(max-width: 800px) 100vw, 751px\" \/><\/span><\/div><\/div><div class=\"fusion-text fusion-text-4\"><p>\u00a0<\/p>\n<\/div><div class=\"fusion-text fusion-text-5\"><p style=\"font-size: 20px;\">The next step is to create the Elastalert index by typing the command:<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">elastalert-create-index<\/p>\n<\/div><div class=\"fusion-image-element fusion-image-align-center in-legacy-container\" style=\"text-align:center;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><div class=\"imageframe-align-center\"><span class=\" fusion-imageframe imageframe-none imageframe-3 hover-type-none\" style=\"border:5px solid #e2e0e0;\"><img decoding=\"async\" width=\"1082\" height=\"306\" title=\"2\" src=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/2.png\" alt class=\"img-responsive wp-image-1881\" srcset=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/2-200x57.png 200w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/2-400x113.png 400w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/2-600x170.png 600w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/2-800x226.png 800w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/2.png 1082w\" sizes=\"(max-width: 800px) 100vw, 1082px\" \/><\/span><\/div><\/div><div class=\"fusion-text fusion-text-6\"><p>\u00a0<\/p>\n<\/div><div class=\"fusion-text fusion-text-7\"><h2 style=\"font-size: 24px; color: #b51616; text-align: left;\"><strong>Configuring Postfix Gmail SMTP.<\/strong><\/h2>\n<p style=\"font-size: 20px;\">To be able to receive alerts on Gmail, there are some configurations I will need to do on my ELK Server. First off, I will need to install Postfix and its dependencies by running the following command:<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">sudo apt-get install postfix mailutils libsasl2-2 ca-certificates libsasl2-modules<\/p>\n<p style=\"font-size: 20px;\">Once the installation is complete, we need to edit the main.cf file. The file is found at this location:<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">\/etc\/postfix\/main.cf<\/p>\n<p style=\"font-size: 20px;\">In the main.cf file, find the line which indicates inet_protocols and change it to ipv4.<br \/>\nAlso add the following lines of code in the file as shown below:<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">relayhost = [smtp.gmail.com]:587<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">smtp_sasl_auth_enable = yes<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">smtp_sasl_password_maps = hash:\/etc\/postfix\/sasl_passwd<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">smtp_sasl_security_options = noanonymous<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">smtp_tls_CApath = \/etc\/ssl\/certs<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">smtpd_tls_CApath = \/etc\/ssl\/certs<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">smtp_use_tls = yes<\/p>\n<\/div><div class=\"fusion-image-element fusion-image-align-center in-legacy-container\" style=\"text-align:center;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><div class=\"imageframe-align-center\"><span class=\" fusion-imageframe imageframe-none imageframe-4 hover-type-none\" style=\"border:5px solid #e2e0e0;\"><img decoding=\"async\" width=\"808\" height=\"656\" title=\"3\" src=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/3.png\" alt class=\"img-responsive wp-image-1883\" srcset=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/3-200x162.png 200w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/3-400x325.png 400w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/3-600x487.png 600w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/3-800x650.png 800w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/3.png 808w\" sizes=\"(max-width: 800px) 100vw, 808px\" \/><\/span><\/div><\/div><div class=\"fusion-text fusion-text-8\"><p>\u00a0<\/p>\n<\/div><div class=\"fusion-text fusion-text-9\"><p style=\"font-size: 20px;\">We now need to create a sasl_password file by typing the command:<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">Sudo gedit \/etc\/postfix\/sasl_passwd<\/p>\n<p style=\"font-size: 20px;\">In the sasl_passwd file, type the following line of code:<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">[smtp.gmail.com]:587 karaniadharmik100@gmail.com:qpdm abcd efgh ijkl<\/p>\n<h2 style=\"font-size: 24px; color: #b51616; text-align: left;\"><strong>Note:<\/strong><\/h2>\n<p style=\"font-size: 20px;\">The email address is the email address you want the alerts to be sent to.<\/p>\n<p style=\"font-size: 20px;\">In order to use Gmail to send alerts, we need to enable two-factor authentication. Furthermore, we need to generate an App Password. The app password is the 12 characters seen above (abcd efgh ijkl)<\/p>\n<\/div><div class=\"fusion-image-element fusion-image-align-center in-legacy-container\" style=\"text-align:center;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><div class=\"imageframe-align-center\"><span class=\" fusion-imageframe imageframe-none imageframe-5 hover-type-none\" style=\"border:5px solid #e2e0e0;\"><img decoding=\"async\" width=\"778\" height=\"112\" title=\"4\" src=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/4.png\" alt class=\"img-responsive wp-image-1886\" srcset=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/4-200x29.png 200w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/4-400x58.png 400w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/4-600x86.png 600w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/4.png 778w\" sizes=\"(max-width: 800px) 100vw, 778px\" \/><\/span><\/div><\/div><div class=\"fusion-text fusion-text-10\"><p>\u00a0<\/p>\n<\/div><div class=\"fusion-text fusion-text-11\"><p style=\"font-size: 20px;\">We then run the following commands in the terminal.<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">sudo chmod 400 \/etc\/postfix\/sasl_passwd<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">sudo postmap \/etc\/postfix\/sasl_passwd<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">sudo systemctl restart postfix<\/p>\n<p style=\"font-size: 20px;\">This completes the setup of Elastalert and Postfix Gmail SMTP.<\/p>\n<\/div><div class=\"fusion-text fusion-text-12\"><h2 style=\"font-size: 24px; color: #b51616; text-align: left;\"><strong>Creating the Mimikatz rule<\/strong><\/h2>\n<p style=\"font-size: 20px;\">I have created the following rule to detect Mimikatz and alert via email when it is run:<\/p>\n<\/div><div class=\"fusion-image-element fusion-image-align-center in-legacy-container\" style=\"text-align:center;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><div class=\"imageframe-align-center\"><span class=\" fusion-imageframe imageframe-none imageframe-6 hover-type-none\" style=\"border:5px solid #e2e0e0;\"><img decoding=\"async\" width=\"620\" height=\"516\" title=\"5\" src=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/5.png\" alt class=\"img-responsive wp-image-1887\" srcset=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/5-200x166.png 200w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/5-400x333.png 400w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/5-600x499.png 600w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/5.png 620w\" sizes=\"(max-width: 800px) 100vw, 620px\" \/><\/span><\/div><\/div><div class=\"fusion-text fusion-text-13\"><p>\u00a0<\/p>\n<\/div><div class=\"fusion-text fusion-text-14\"><p style=\"font-size: 20px;\">I save this and we can run Elastalert using the following command:<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">Python3 -m elastalert.elastalert &#8211;verbose &#8211;rule example_rules\/Mimikatz.yaml<\/p>\n<p style=\"font-size: 20px;\">It runs as shown below:<\/p>\n<\/div><div class=\"fusion-image-element fusion-image-align-center in-legacy-container\" style=\"text-align:center;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><div class=\"imageframe-align-center\"><span class=\" fusion-imageframe imageframe-none imageframe-7 hover-type-none\" style=\"border:5px solid #e2e0e0;\"><img decoding=\"async\" width=\"1312\" height=\"112\" title=\"6\" src=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/6.png\" alt class=\"img-responsive wp-image-1889\" srcset=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/6-200x17.png 200w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/6-400x34.png 400w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/6-600x51.png 600w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/6-800x68.png 800w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/6-1200x102.png 1200w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/6.png 1312w\" sizes=\"(max-width: 800px) 100vw, 1200px\" \/><\/span><\/div><\/div><div class=\"fusion-text fusion-text-15\"><p>\u00a0<\/p>\n<\/div><div class=\"fusion-text fusion-text-16\"><p style=\"font-size: 20px;\">I then run Mimikatz on my Windows machine where I have configured winlogbeat. It detects and says \u201c2 query hits \u2026 1 alerts sent\u201d.<\/p>\n<\/div><div class=\"fusion-image-element fusion-image-align-center in-legacy-container\" style=\"text-align:center;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><div class=\"imageframe-align-center\"><span class=\" fusion-imageframe imageframe-none imageframe-8 hover-type-none\" style=\"border:5px solid #e2e0e0;\"><img decoding=\"async\" width=\"1327\" height=\"166\" title=\"7\" src=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/7.png\" alt class=\"img-responsive wp-image-1890\" srcset=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/7-200x25.png 200w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/7-400x50.png 400w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/7-600x75.png 600w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/7-800x100.png 800w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/7-1200x150.png 1200w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/7.png 1327w\" sizes=\"(max-width: 800px) 100vw, 1200px\" \/><\/span><\/div><\/div><div class=\"fusion-text fusion-text-17\"><p>\u00a0<\/p>\n<\/div><div class=\"fusion-text fusion-text-18\"><p style=\"font-size: 20px;\">When I check my email, I receive the following alert.<\/p>\n<\/div><div class=\"fusion-image-element fusion-image-align-center in-legacy-container\" style=\"text-align:center;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><div class=\"imageframe-align-center\"><span class=\" fusion-imageframe imageframe-none imageframe-9 hover-type-none\" style=\"border:5px solid #e2e0e0;\"><img decoding=\"async\" width=\"1328\" height=\"677\" title=\"8\" src=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/8.png\" alt class=\"img-responsive wp-image-1891\" srcset=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/8-200x102.png 200w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/8-400x204.png 400w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/8-600x306.png 600w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/8-800x408.png 800w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/8-1200x612.png 1200w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/8.png 1328w\" sizes=\"(max-width: 800px) 100vw, 1200px\" \/><\/span><\/div><\/div><div class=\"fusion-text fusion-text-19\"><p>\u00a0<\/p>\n<\/div><div class=\"fusion-text fusion-text-20\"><h2 style=\"font-size: 24px; color: #b51616; text-align: left;\"><strong>References<\/strong><\/h2>\n<p style=\"font-size: 20px;\"><a href=\"https:\/\/github.com\/justmeandopensource\/elk\/blob\/master\/docs\/elastic-kibana-filebeat-elastalert-notes.md\">https:\/\/github.com\/justmeandopensource\/elk\/blob\/master\/docs\/elastic-kibana-filebeat-elastalert-notes.md<\/a><\/p>\n<p style=\"font-size: 20px;\"><a href=\"https:\/\/www.hackingarticles.in\/threat-hunting-log-monitoring-lab-setup-with-elk\/\">https:\/\/www.hackingarticles.in\/threat-hunting-log-monitoring-lab-setup-with-elk\/<\/a><\/p>\n<p style=\"font-size: 20px;\"><a href=\"https:\/\/kifarunix.com\/send-windows-logs-to-elastic-stack-using-winlogbeat-and-sysmon\/\">https:\/\/kifarunix.com\/send-windows-logs-to-elastic-stack-using-winlogbeat-and-sysmon\/<\/a><\/p>\n<p style=\"font-size: 20px;\"><a href=\"https:\/\/github.com\/justmeandopensource\/elk\/blob\/master\/docs\/elastic-kibana-filebeat-elastalert-notes.md\">https:\/\/github.com\/justmeandopensource\/elk\/blob\/master\/docs\/elastic-kibana-filebeat-elastalert-notes.md<\/a><\/p>\n<p style=\"font-size: 20px;\"><a href=\"https:\/\/www.elastic.co\/what-is\/elk-stack\">https:\/\/www.elastic.co\/what-is\/elk-stack<\/a><\/p>\n<\/div><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-separator fusion-full-width-sep\" style=\"margin-left: auto;margin-right: auto;width:100%;\"><div class=\"fusion-separator-border sep-single sep-solid\" style=\"--awb-height:20px;--awb-amount:20px;border-color:#3e3e3e;border-top-width:1px;\"><\/div><\/div><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-text fusion-text-21\"><h2 style=\"font-size: 16px; color: #b51616; text-align: left;\"><strong>Disclaimer<\/strong><\/h2>\n<p style=\"font-size: 10px;\">The MacroSec blogs are solely for informational and educational purposes. Any actions and or activities related to the material contained within this website are solely your responsibility. The misuse of the information on this website can result in criminal charges brought against the persons in question. The authors and MacroSec will not be held responsible in the event any criminal charges be brought against any individuals misusing the information in this website to break the law.<\/p>\n<\/div><div class=\"fusion-clearfix\"><\/div><\/div><\/div><\/div><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":5,"featured_media":1907,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","footnotes":""},"categories":[12,10,8,13],"tags":[],"class_list":["post-1871","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-defensive-slug","category-offensive-security","category-pentesting","category-red-teaming"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using Elastalert to alert via email when Mimikatz is run. &#8212; MacroSEC<\/title>\n<meta name=\"description\" content=\"In this blog, I shall discuss how an alert can be sent via email when Mimikatz is run. Mimikatz is a post-exploitation tool that is used to dump passwords from memory, along with hashes. This allows attackers to conduct various other attacks such as lateral movement more easily. When an attacker gains an initial foothold to a machine, they may run Mimikatz in order to retrieve passwords or passwords hashes. As blue teamers, it is crucial to setup mechanisms to detect attacks and take appropriate measures to safeguard information systems. According to Elastic, &quot;ELK&quot; is the acronym for three open-source projects: Elasticsearch, Logstash, and Kibana. Elasticsearch is a search and analytics engine. Logstash is a server side data processing pipeline that ingests data from multiple sources simultaneously, transforms it, and then sends it to a &quot;stash&quot; like Elasticsearch. Kibana lets users visualize data with charts and graphs in Elasticsearch. To setup ELK, you can either use the GitHub repository or setup manually. I have setup my stack manually. Once the ELK stack has been installed successfully, the next step is to install Elastalert. To install and setup Elastalert, I shall run the following commands on the terminal window.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/macrosec.tech\/index.php\/2021\/11\/17\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using Elastalert to alert via email when Mimikatz is run. &#8212; MacroSEC\" \/>\n<meta property=\"og:description\" content=\"In this blog, I shall discuss how an alert can be sent via email when Mimikatz is run. Mimikatz is a post-exploitation tool that is used to dump passwords from memory, along with hashes. This allows attackers to conduct various other attacks such as lateral movement more easily. When an attacker gains an initial foothold to a machine, they may run Mimikatz in order to retrieve passwords or passwords hashes. As blue teamers, it is crucial to setup mechanisms to detect attacks and take appropriate measures to safeguard information systems. According to Elastic, &quot;ELK&quot; is the acronym for three open-source projects: Elasticsearch, Logstash, and Kibana. Elasticsearch is a search and analytics engine. Logstash is a server side data processing pipeline that ingests data from multiple sources simultaneously, transforms it, and then sends it to a &quot;stash&quot; like Elasticsearch. Kibana lets users visualize data with charts and graphs in Elasticsearch. To setup ELK, you can either use the GitHub repository or setup manually. I have setup my stack manually. Once the ELK stack has been installed successfully, the next step is to install Elastalert. To install and setup Elastalert, I shall run the following commands on the terminal window.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/macrosec.tech\/index.php\/2021\/11\/17\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\/\" \/>\n<meta property=\"og:site_name\" content=\"MacroSEC\" \/>\n<meta property=\"article:published_time\" content=\"2021-11-17T13:01:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-26T11:55:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/Mimikatz-Alert.png\" \/>\n\t<meta property=\"og:image:width\" content=\"400\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Dharmik Karania\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dharmik Karania\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"18 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/11\\\/17\\\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/11\\\/17\\\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\\\/\"},\"author\":{\"name\":\"Dharmik Karania\",\"@id\":\"https:\\\/\\\/macrosec.tech\\\/#\\\/schema\\\/person\\\/5d4c800b7e603d391fc1db5b09133e25\"},\"headline\":\"Using Elastalert to alert via email when Mimikatz is run.\",\"datePublished\":\"2021-11-17T13:01:31+00:00\",\"dateModified\":\"2022-04-26T11:55:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/11\\\/17\\\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\\\/\"},\"wordCount\":4272,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/macrosec.tech\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/11\\\/17\\\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/macrosec.tech\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/Mimikatz-Alert.png\",\"articleSection\":[\"Defensive Security\",\"Offensive Security\",\"Penetration Testing\",\"Red Teaming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/11\\\/17\\\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/11\\\/17\\\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\\\/\",\"url\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/11\\\/17\\\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\\\/\",\"name\":\"Using Elastalert to alert via email when Mimikatz is run. &#8212; MacroSEC\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/macrosec.tech\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/11\\\/17\\\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/11\\\/17\\\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/macrosec.tech\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/Mimikatz-Alert.png\",\"datePublished\":\"2021-11-17T13:01:31+00:00\",\"dateModified\":\"2022-04-26T11:55:16+00:00\",\"description\":\"In this blog, I shall discuss how an alert can be sent via email when Mimikatz is run. Mimikatz is a post-exploitation tool that is used to dump passwords from memory, along with hashes. This allows attackers to conduct various other attacks such as lateral movement more easily. When an attacker gains an initial foothold to a machine, they may run Mimikatz in order to retrieve passwords or passwords hashes. As blue teamers, it is crucial to setup mechanisms to detect attacks and take appropriate measures to safeguard information systems. According to Elastic, \\\"ELK\\\" is the acronym for three open-source projects: Elasticsearch, Logstash, and Kibana. Elasticsearch is a search and analytics engine. Logstash is a server side data processing pipeline that ingests data from multiple sources simultaneously, transforms it, and then sends it to a \\\"stash\\\" like Elasticsearch. Kibana lets users visualize data with charts and graphs in Elasticsearch. To setup ELK, you can either use the GitHub repository or setup manually. I have setup my stack manually. Once the ELK stack has been installed successfully, the next step is to install Elastalert. To install and setup Elastalert, I shall run the following commands on the terminal window.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/11\\\/17\\\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/11\\\/17\\\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/11\\\/17\\\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\\\/#primaryimage\",\"url\":\"https:\\\/\\\/macrosec.tech\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/Mimikatz-Alert.png\",\"contentUrl\":\"https:\\\/\\\/macrosec.tech\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/Mimikatz-Alert.png\",\"width\":400,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/11\\\/17\\\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/macrosec.tech\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using Elastalert to alert via email when Mimikatz is run.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/macrosec.tech\\\/#website\",\"url\":\"https:\\\/\\\/macrosec.tech\\\/\",\"name\":\"MacroSEC\",\"description\":\"Your Cybersecurity Partner - Kenya\",\"publisher\":{\"@id\":\"https:\\\/\\\/macrosec.tech\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/macrosec.tech\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/macrosec.tech\\\/#organization\",\"name\":\"MacroSec Ltd\",\"url\":\"https:\\\/\\\/macrosec.tech\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/macrosec.tech\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/macrosec.tech\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/MobileIcon_Retine.png\",\"contentUrl\":\"https:\\\/\\\/macrosec.tech\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/MobileIcon_Retine.png\",\"width\":400,\"height\":107,\"caption\":\"MacroSec Ltd\"},\"image\":{\"@id\":\"https:\\\/\\\/macrosec.tech\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/macrosec.tech\\\/#\\\/schema\\\/person\\\/5d4c800b7e603d391fc1db5b09133e25\",\"name\":\"Dharmik Karania\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2ad5f76a88ad63937e5cbdf80605c372cf663716add095d320f7a27bf084809e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2ad5f76a88ad63937e5cbdf80605c372cf663716add095d320f7a27bf084809e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2ad5f76a88ad63937e5cbdf80605c372cf663716add095d320f7a27bf084809e?s=96&d=mm&r=g\",\"caption\":\"Dharmik Karania\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using Elastalert to alert via email when Mimikatz is run. &#8212; MacroSEC","description":"In this blog, I shall discuss how an alert can be sent via email when Mimikatz is run. Mimikatz is a post-exploitation tool that is used to dump passwords from memory, along with hashes. This allows attackers to conduct various other attacks such as lateral movement more easily. When an attacker gains an initial foothold to a machine, they may run Mimikatz in order to retrieve passwords or passwords hashes. As blue teamers, it is crucial to setup mechanisms to detect attacks and take appropriate measures to safeguard information systems. According to Elastic, \"ELK\" is the acronym for three open-source projects: Elasticsearch, Logstash, and Kibana. Elasticsearch is a search and analytics engine. Logstash is a server side data processing pipeline that ingests data from multiple sources simultaneously, transforms it, and then sends it to a \"stash\" like Elasticsearch. Kibana lets users visualize data with charts and graphs in Elasticsearch. To setup ELK, you can either use the GitHub repository or setup manually. I have setup my stack manually. Once the ELK stack has been installed successfully, the next step is to install Elastalert. To install and setup Elastalert, I shall run the following commands on the terminal window.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/macrosec.tech\/index.php\/2021\/11\/17\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\/","og_locale":"en_US","og_type":"article","og_title":"Using Elastalert to alert via email when Mimikatz is run. &#8212; MacroSEC","og_description":"In this blog, I shall discuss how an alert can be sent via email when Mimikatz is run. Mimikatz is a post-exploitation tool that is used to dump passwords from memory, along with hashes. This allows attackers to conduct various other attacks such as lateral movement more easily. When an attacker gains an initial foothold to a machine, they may run Mimikatz in order to retrieve passwords or passwords hashes. As blue teamers, it is crucial to setup mechanisms to detect attacks and take appropriate measures to safeguard information systems. According to Elastic, \"ELK\" is the acronym for three open-source projects: Elasticsearch, Logstash, and Kibana. Elasticsearch is a search and analytics engine. Logstash is a server side data processing pipeline that ingests data from multiple sources simultaneously, transforms it, and then sends it to a \"stash\" like Elasticsearch. Kibana lets users visualize data with charts and graphs in Elasticsearch. To setup ELK, you can either use the GitHub repository or setup manually. I have setup my stack manually. Once the ELK stack has been installed successfully, the next step is to install Elastalert. To install and setup Elastalert, I shall run the following commands on the terminal window.","og_url":"https:\/\/macrosec.tech\/index.php\/2021\/11\/17\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\/","og_site_name":"MacroSEC","article_published_time":"2021-11-17T13:01:31+00:00","article_modified_time":"2022-04-26T11:55:16+00:00","og_image":[{"width":400,"height":400,"url":"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/Mimikatz-Alert.png","type":"image\/png"}],"author":"Dharmik Karania","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Dharmik Karania","Est. reading time":"18 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/macrosec.tech\/index.php\/2021\/11\/17\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\/#article","isPartOf":{"@id":"https:\/\/macrosec.tech\/index.php\/2021\/11\/17\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\/"},"author":{"name":"Dharmik Karania","@id":"https:\/\/macrosec.tech\/#\/schema\/person\/5d4c800b7e603d391fc1db5b09133e25"},"headline":"Using Elastalert to alert via email when Mimikatz is run.","datePublished":"2021-11-17T13:01:31+00:00","dateModified":"2022-04-26T11:55:16+00:00","mainEntityOfPage":{"@id":"https:\/\/macrosec.tech\/index.php\/2021\/11\/17\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\/"},"wordCount":4272,"commentCount":0,"publisher":{"@id":"https:\/\/macrosec.tech\/#organization"},"image":{"@id":"https:\/\/macrosec.tech\/index.php\/2021\/11\/17\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\/#primaryimage"},"thumbnailUrl":"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/Mimikatz-Alert.png","articleSection":["Defensive Security","Offensive Security","Penetration Testing","Red Teaming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/macrosec.tech\/index.php\/2021\/11\/17\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/macrosec.tech\/index.php\/2021\/11\/17\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\/","url":"https:\/\/macrosec.tech\/index.php\/2021\/11\/17\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\/","name":"Using Elastalert to alert via email when Mimikatz is run. &#8212; MacroSEC","isPartOf":{"@id":"https:\/\/macrosec.tech\/#website"},"primaryImageOfPage":{"@id":"https:\/\/macrosec.tech\/index.php\/2021\/11\/17\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\/#primaryimage"},"image":{"@id":"https:\/\/macrosec.tech\/index.php\/2021\/11\/17\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\/#primaryimage"},"thumbnailUrl":"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/Mimikatz-Alert.png","datePublished":"2021-11-17T13:01:31+00:00","dateModified":"2022-04-26T11:55:16+00:00","description":"In this blog, I shall discuss how an alert can be sent via email when Mimikatz is run. Mimikatz is a post-exploitation tool that is used to dump passwords from memory, along with hashes. This allows attackers to conduct various other attacks such as lateral movement more easily. When an attacker gains an initial foothold to a machine, they may run Mimikatz in order to retrieve passwords or passwords hashes. As blue teamers, it is crucial to setup mechanisms to detect attacks and take appropriate measures to safeguard information systems. According to Elastic, \"ELK\" is the acronym for three open-source projects: Elasticsearch, Logstash, and Kibana. Elasticsearch is a search and analytics engine. Logstash is a server side data processing pipeline that ingests data from multiple sources simultaneously, transforms it, and then sends it to a \"stash\" like Elasticsearch. Kibana lets users visualize data with charts and graphs in Elasticsearch. To setup ELK, you can either use the GitHub repository or setup manually. I have setup my stack manually. Once the ELK stack has been installed successfully, the next step is to install Elastalert. To install and setup Elastalert, I shall run the following commands on the terminal window.","breadcrumb":{"@id":"https:\/\/macrosec.tech\/index.php\/2021\/11\/17\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/macrosec.tech\/index.php\/2021\/11\/17\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/macrosec.tech\/index.php\/2021\/11\/17\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\/#primaryimage","url":"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/Mimikatz-Alert.png","contentUrl":"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/11\/Mimikatz-Alert.png","width":400,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/macrosec.tech\/index.php\/2021\/11\/17\/using-elastalert-to-alert-via-email-when-mimikatz-is-run\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/macrosec.tech\/"},{"@type":"ListItem","position":2,"name":"Using Elastalert to alert via email when Mimikatz is run."}]},{"@type":"WebSite","@id":"https:\/\/macrosec.tech\/#website","url":"https:\/\/macrosec.tech\/","name":"MacroSEC","description":"Your Cybersecurity Partner - Kenya","publisher":{"@id":"https:\/\/macrosec.tech\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/macrosec.tech\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/macrosec.tech\/#organization","name":"MacroSec Ltd","url":"https:\/\/macrosec.tech\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/macrosec.tech\/#\/schema\/logo\/image\/","url":"https:\/\/macrosec.tech\/wp-content\/uploads\/2018\/04\/MobileIcon_Retine.png","contentUrl":"https:\/\/macrosec.tech\/wp-content\/uploads\/2018\/04\/MobileIcon_Retine.png","width":400,"height":107,"caption":"MacroSec Ltd"},"image":{"@id":"https:\/\/macrosec.tech\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/macrosec.tech\/#\/schema\/person\/5d4c800b7e603d391fc1db5b09133e25","name":"Dharmik Karania","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/2ad5f76a88ad63937e5cbdf80605c372cf663716add095d320f7a27bf084809e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2ad5f76a88ad63937e5cbdf80605c372cf663716add095d320f7a27bf084809e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2ad5f76a88ad63937e5cbdf80605c372cf663716add095d320f7a27bf084809e?s=96&d=mm&r=g","caption":"Dharmik Karania"}}]}},"_links":{"self":[{"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/posts\/1871","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/comments?post=1871"}],"version-history":[{"count":5,"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/posts\/1871\/revisions"}],"predecessor-version":[{"id":1908,"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/posts\/1871\/revisions\/1908"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/media\/1907"}],"wp:attachment":[{"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/media?parent=1871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/categories?post=1871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/tags?post=1871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}